Lines Matching full:plane

50 static int lsdc_primary_atomic_check(struct drm_plane *plane,  in lsdc_primary_atomic_check()  argument
53 struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); in lsdc_primary_atomic_check()
69 static void lsdc_primary_atomic_update(struct drm_plane *plane, in lsdc_primary_atomic_update() argument
72 struct lsdc_primary *primary = to_lsdc_primary(plane); in lsdc_primary_atomic_update()
74 struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane); in lsdc_primary_atomic_update()
75 struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); in lsdc_primary_atomic_update()
89 static void lsdc_primary_atomic_disable(struct drm_plane *plane, in lsdc_primary_atomic_disable() argument
97 drm_dbg(plane->dev, "%s disabled\n", plane->name); in lsdc_primary_atomic_disable()
100 static int lsdc_plane_prepare_fb(struct drm_plane *plane, in lsdc_plane_prepare_fb() argument
115 drm_err(plane->dev, "bo %p reserve failed\n", lbo); in lsdc_plane_prepare_fb()
124 drm_err(plane->dev, "bo %p pin failed\n", lbo); in lsdc_plane_prepare_fb()
130 if (plane->type != DRM_PLANE_TYPE_CURSOR) in lsdc_plane_prepare_fb()
131 drm_dbg(plane->dev, in lsdc_plane_prepare_fb()
133 plane->name, lbo, gpu_vaddr, lsdc_bo_size(lbo)); in lsdc_plane_prepare_fb()
135 return drm_gem_plane_helper_prepare_fb(plane, new_state); in lsdc_plane_prepare_fb()
138 static void lsdc_plane_cleanup_fb(struct drm_plane *plane, in lsdc_plane_cleanup_fb() argument
152 drm_err(plane->dev, "%p reserve failed\n", lbo); in lsdc_plane_cleanup_fb()
162 if (plane->type != DRM_PLANE_TYPE_CURSOR) in lsdc_plane_cleanup_fb()
163 drm_dbg(plane->dev, "%s unpin\n", plane->name); in lsdc_plane_cleanup_fb()
174 static int lsdc_cursor_plane_atomic_async_check(struct drm_plane *plane, in lsdc_cursor_plane_atomic_async_check() argument
180 new_state = drm_atomic_get_new_plane_state(state, plane); in lsdc_cursor_plane_atomic_async_check()
182 if (!plane->state || !plane->state->fb) { in lsdc_cursor_plane_atomic_async_check()
183 drm_dbg(plane->dev, "%s: state is NULL\n", plane->name); in lsdc_cursor_plane_atomic_async_check()
188 drm_dbg(plane->dev, "unsupported cursor size: %ux%u\n", in lsdc_cursor_plane_atomic_async_check()
194 drm_dbg(plane->dev, "unsupported cursor size: %ux%u\n", in lsdc_cursor_plane_atomic_async_check()
203 if (plane->state->crtc != new_state->crtc || in lsdc_cursor_plane_atomic_async_check()
204 plane->state->src_w != new_state->src_w || in lsdc_cursor_plane_atomic_async_check()
205 plane->state->src_h != new_state->src_h || in lsdc_cursor_plane_atomic_async_check()
206 plane->state->crtc_w != new_state->crtc_w || in lsdc_cursor_plane_atomic_async_check()
207 plane->state->crtc_h != new_state->crtc_h) in lsdc_cursor_plane_atomic_async_check()
210 if (new_state->visible != plane->state->visible) in lsdc_cursor_plane_atomic_async_check()
213 return drm_atomic_helper_check_plane_state(plane->state, in lsdc_cursor_plane_atomic_async_check()
220 static void lsdc_cursor_plane_atomic_async_update(struct drm_plane *plane, in lsdc_cursor_plane_atomic_async_update() argument
223 struct lsdc_cursor *cursor = to_lsdc_cursor(plane); in lsdc_cursor_plane_atomic_async_update()
225 struct drm_framebuffer *old_fb = plane->state->fb; in lsdc_cursor_plane_atomic_async_update()
229 new_state = drm_atomic_get_new_plane_state(state, plane); in lsdc_cursor_plane_atomic_async_update()
231 new_fb = plane->state->fb; in lsdc_cursor_plane_atomic_async_update()
233 plane->state->crtc_x = new_state->crtc_x; in lsdc_cursor_plane_atomic_async_update()
234 plane->state->crtc_y = new_state->crtc_y; in lsdc_cursor_plane_atomic_async_update()
235 plane->state->crtc_h = new_state->crtc_h; in lsdc_cursor_plane_atomic_async_update()
236 plane->state->crtc_w = new_state->crtc_w; in lsdc_cursor_plane_atomic_async_update()
237 plane->state->src_x = new_state->src_x; in lsdc_cursor_plane_atomic_async_update()
238 plane->state->src_y = new_state->src_y; in lsdc_cursor_plane_atomic_async_update()
239 plane->state->src_h = new_state->src_h; in lsdc_cursor_plane_atomic_async_update()
240 plane->state->src_w = new_state->src_w; in lsdc_cursor_plane_atomic_async_update()
241 swap(plane->state->fb, new_state->fb); in lsdc_cursor_plane_atomic_async_update()
267 /* ls7a1000 cursor plane helpers */
269 static int ls7a1000_cursor_plane_atomic_check(struct drm_plane *plane, in ls7a1000_cursor_plane_atomic_check() argument
276 new_plane_state = drm_atomic_get_new_plane_state(state, plane); in ls7a1000_cursor_plane_atomic_check()
280 drm_dbg(plane->dev, "%s is not bind to a crtc\n", plane->name); in ls7a1000_cursor_plane_atomic_check()
285 drm_dbg(plane->dev, "unsupported cursor size: %ux%u\n", in ls7a1000_cursor_plane_atomic_check()
299 static void ls7a1000_cursor_plane_atomic_update(struct drm_plane *plane, in ls7a1000_cursor_plane_atomic_update() argument
302 struct lsdc_cursor *cursor = to_lsdc_cursor(plane); in ls7a1000_cursor_plane_atomic_update()
303 struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane); in ls7a1000_cursor_plane_atomic_update()
304 struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); in ls7a1000_cursor_plane_atomic_update()
321 static void ls7a1000_cursor_plane_atomic_disable(struct drm_plane *plane, in ls7a1000_cursor_plane_atomic_disable() argument
324 struct lsdc_cursor *cursor = to_lsdc_cursor(plane); in ls7a1000_cursor_plane_atomic_disable()
340 /* ls7a2000 cursor plane helpers */
342 static int ls7a2000_cursor_plane_atomic_check(struct drm_plane *plane, in ls7a2000_cursor_plane_atomic_check() argument
349 new_plane_state = drm_atomic_get_new_plane_state(state, plane); in ls7a2000_cursor_plane_atomic_check()
353 drm_dbg(plane->dev, "%s is not bind to a crtc\n", plane->name); in ls7a2000_cursor_plane_atomic_check()
358 drm_dbg(plane->dev, "unsupported cursor size: %ux%u\n", in ls7a2000_cursor_plane_atomic_check()
364 drm_dbg(plane->dev, "unsupported cursor size: %ux%u\n", in ls7a2000_cursor_plane_atomic_check()
380 static void ls7a2000_cursor_plane_atomic_update(struct drm_plane *plane, in ls7a2000_cursor_plane_atomic_update() argument
383 struct lsdc_cursor *cursor = to_lsdc_cursor(plane); in ls7a2000_cursor_plane_atomic_update()
384 struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane); in ls7a2000_cursor_plane_atomic_update()
385 struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); in ls7a2000_cursor_plane_atomic_update()
417 static void ls7a2000_cursor_plane_atomic_disable(struct drm_plane *plane, in ls7a2000_cursor_plane_atomic_disable() argument
420 struct lsdc_cursor *cursor = to_lsdc_cursor(plane); in ls7a2000_cursor_plane_atomic_disable()
460 /* Primary plane 0 hardware related ops */
506 /* Primary plane 1 hardware related ops */
568 * cursor 1 is attach to CRTC-1. Compositing the primary plane and cursor
569 * plane is automatically done by hardware, the cursor is alway on the top of
570 * the primary plane. In other word, z-order is fixed in hardware and cannot
575 /* cursor plane 0 (for pipe 0) related hardware ops */
613 /* cursor plane 1 (for pipe 1) related hardware ops */
705 * The unforgiving LS7A1000/LS2K1000 has only one hardware cursors plane
721 struct drm_plane *plane, in lsdc_primary_plane_init() argument
724 struct lsdc_primary *primary = to_lsdc_primary(plane); in lsdc_primary_plane_init()
727 ret = drm_universal_plane_init(ddev, plane, 1 << index, in lsdc_primary_plane_init()
733 "ls-primary-plane-%u", index); in lsdc_primary_plane_init()
737 drm_plane_helper_add(plane, &lsdc_primary_helper_funcs); in lsdc_primary_plane_init()
746 struct drm_plane *plane, in ls7a1000_cursor_plane_init() argument
749 struct lsdc_cursor *cursor = to_lsdc_cursor(plane); in ls7a1000_cursor_plane_init()
752 ret = drm_universal_plane_init(ddev, plane, 1 << index, in ls7a1000_cursor_plane_init()
758 "ls-cursor-plane-%u", index); in ls7a1000_cursor_plane_init()
765 drm_plane_helper_add(plane, &ls7a1000_cursor_plane_helper_funcs); in ls7a1000_cursor_plane_init()
771 struct drm_plane *plane, in ls7a2000_cursor_plane_init() argument
774 struct lsdc_cursor *cursor = to_lsdc_cursor(plane); in ls7a2000_cursor_plane_init()
777 ret = drm_universal_plane_init(ddev, plane, 1 << index, in ls7a2000_cursor_plane_init()
783 "ls-cursor-plane-%u", index); in ls7a2000_cursor_plane_init()
790 drm_plane_helper_add(plane, &ls7a2000_cursor_plane_helper_funcs); in ls7a2000_cursor_plane_init()