Lines Matching refs:plane

49 static int lsdc_primary_atomic_check(struct drm_plane *plane,
52 struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane);
68 static void lsdc_primary_atomic_update(struct drm_plane *plane,
71 struct lsdc_primary *primary = to_lsdc_primary(plane);
73 struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane);
74 struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane);
88 static void lsdc_primary_atomic_disable(struct drm_plane *plane,
96 drm_dbg(plane->dev, "%s disabled\n", plane->name);
99 static int lsdc_plane_prepare_fb(struct drm_plane *plane,
114 drm_err(plane->dev, "bo %p reserve failed\n", lbo);
123 drm_err(plane->dev, "bo %p pin failed\n", lbo);
129 if (plane->type != DRM_PLANE_TYPE_CURSOR)
130 drm_dbg(plane->dev,
132 plane->name, lbo, gpu_vaddr, lsdc_bo_size(lbo));
134 return drm_gem_plane_helper_prepare_fb(plane, new_state);
137 static void lsdc_plane_cleanup_fb(struct drm_plane *plane,
151 drm_err(plane->dev, "%p reserve failed\n", lbo);
161 if (plane->type != DRM_PLANE_TYPE_CURSOR)
162 drm_dbg(plane->dev, "%s unpin\n", plane->name);
173 static int lsdc_cursor_plane_atomic_async_check(struct drm_plane *plane,
179 new_state = drm_atomic_get_new_plane_state(state, plane);
181 if (!plane->state || !plane->state->fb) {
182 drm_dbg(plane->dev, "%s: state is NULL\n", plane->name);
187 drm_dbg(plane->dev, "unsupported cursor size: %ux%u\n",
193 drm_dbg(plane->dev, "unsupported cursor size: %ux%u\n",
202 if (plane->state->crtc != new_state->crtc ||
203 plane->state->src_w != new_state->src_w ||
204 plane->state->src_h != new_state->src_h ||
205 plane->state->crtc_w != new_state->crtc_w ||
206 plane->state->crtc_h != new_state->crtc_h)
209 if (new_state->visible != plane->state->visible)
212 return drm_atomic_helper_check_plane_state(plane->state,
219 static void lsdc_cursor_plane_atomic_async_update(struct drm_plane *plane,
222 struct lsdc_cursor *cursor = to_lsdc_cursor(plane);
224 struct drm_framebuffer *old_fb = plane->state->fb;
228 new_state = drm_atomic_get_new_plane_state(state, plane);
230 new_fb = plane->state->fb;
232 plane->state->crtc_x = new_state->crtc_x;
233 plane->state->crtc_y = new_state->crtc_y;
234 plane->state->crtc_h = new_state->crtc_h;
235 plane->state->crtc_w = new_state->crtc_w;
236 plane->state->src_x = new_state->src_x;
237 plane->state->src_y = new_state->src_y;
238 plane->state->src_h = new_state->src_h;
239 plane->state->src_w = new_state->src_w;
240 swap(plane->state->fb, new_state->fb);
266 /* ls7a1000 cursor plane helpers */
268 static int ls7a1000_cursor_plane_atomic_check(struct drm_plane *plane,
275 new_plane_state = drm_atomic_get_new_plane_state(state, plane);
279 drm_dbg(plane->dev, "%s is not bind to a crtc\n", plane->name);
284 drm_dbg(plane->dev, "unsupported cursor size: %ux%u\n",
298 static void ls7a1000_cursor_plane_atomic_update(struct drm_plane *plane,
301 struct lsdc_cursor *cursor = to_lsdc_cursor(plane);
302 struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane);
303 struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane);
320 static void ls7a1000_cursor_plane_atomic_disable(struct drm_plane *plane,
323 struct lsdc_cursor *cursor = to_lsdc_cursor(plane);
339 /* ls7a2000 cursor plane helpers */
341 static int ls7a2000_cursor_plane_atomic_check(struct drm_plane *plane,
348 new_plane_state = drm_atomic_get_new_plane_state(state, plane);
352 drm_dbg(plane->dev, "%s is not bind to a crtc\n", plane->name);
357 drm_dbg(plane->dev, "unsupported cursor size: %ux%u\n",
363 drm_dbg(plane->dev, "unsupported cursor size: %ux%u\n",
379 static void ls7a2000_cursor_plane_atomic_update(struct drm_plane *plane,
382 struct lsdc_cursor *cursor = to_lsdc_cursor(plane);
383 struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane);
384 struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane);
416 static void ls7a2000_cursor_plane_atomic_disable(struct drm_plane *plane,
419 struct lsdc_cursor *cursor = to_lsdc_cursor(plane);
459 /* Primary plane 0 hardware related ops */
505 /* Primary plane 1 hardware related ops */
567 * cursor 1 is attach to CRTC-1. Compositing the primary plane and cursor
568 * plane is automatically done by hardware, the cursor is alway on the top of
569 * the primary plane. In other word, z-order is fixed in hardware and cannot
574 /* cursor plane 0 (for pipe 0) related hardware ops */
612 /* cursor plane 1 (for pipe 1) related hardware ops */
704 * The unforgiving LS7A1000/LS2K1000 has only one hardware cursors plane
720 struct drm_plane *plane,
723 struct lsdc_primary *primary = to_lsdc_primary(plane);
726 ret = drm_universal_plane_init(ddev, plane, 1 << index,
732 "ls-primary-plane-%u", index);
736 drm_plane_helper_add(plane, &lsdc_primary_helper_funcs);
745 struct drm_plane *plane,
748 struct lsdc_cursor *cursor = to_lsdc_cursor(plane);
751 ret = drm_universal_plane_init(ddev, plane, 1 << index,
757 "ls-cursor-plane-%u", index);
764 drm_plane_helper_add(plane, &ls7a1000_cursor_plane_helper_funcs);
770 struct drm_plane *plane,
773 struct lsdc_cursor *cursor = to_lsdc_cursor(plane);
776 ret = drm_universal_plane_init(ddev, plane, 1 << index,
782 "ls-cursor-plane-%u", index);
789 drm_plane_helper_add(plane, &ls7a2000_cursor_plane_helper_funcs);