Lines Matching refs:plane

34 static void mtk_plane_reset(struct drm_plane *plane)  in mtk_plane_reset()  argument
38 if (plane->state) { in mtk_plane_reset()
39 __drm_atomic_helper_plane_destroy_state(plane->state); in mtk_plane_reset()
41 state = to_mtk_plane_state(plane->state); in mtk_plane_reset()
47 plane->state = &state->base; in mtk_plane_reset()
50 state->base.plane = plane; in mtk_plane_reset()
54 static struct drm_plane_state *mtk_plane_duplicate_state(struct drm_plane *plane) in mtk_plane_duplicate_state() argument
56 struct mtk_plane_state *old_state = to_mtk_plane_state(plane->state); in mtk_plane_duplicate_state()
63 __drm_atomic_helper_plane_duplicate_state(plane, &state->base); in mtk_plane_duplicate_state()
65 WARN_ON(state->base.plane != plane); in mtk_plane_duplicate_state()
72 static void mtk_drm_plane_destroy_state(struct drm_plane *plane, in mtk_drm_plane_destroy_state() argument
79 static int mtk_plane_atomic_async_check(struct drm_plane *plane, in mtk_plane_atomic_async_check() argument
83 plane); in mtk_plane_atomic_async_check()
87 if (plane != new_plane_state->crtc->cursor) in mtk_plane_atomic_async_check()
90 if (!plane->state) in mtk_plane_atomic_async_check()
93 if (!plane->state->fb) in mtk_plane_atomic_async_check()
96 ret = mtk_drm_crtc_plane_check(new_plane_state->crtc, plane, in mtk_plane_atomic_async_check()
107 return drm_atomic_helper_check_plane_state(plane->state, crtc_state, in mtk_plane_atomic_async_check()
142 static void mtk_plane_atomic_async_update(struct drm_plane *plane, in mtk_plane_atomic_async_update() argument
146 plane); in mtk_plane_atomic_async_update()
147 struct mtk_plane_state *new_plane_state = to_mtk_plane_state(plane->state); in mtk_plane_atomic_async_update()
149 plane->state->crtc_x = new_state->crtc_x; in mtk_plane_atomic_async_update()
150 plane->state->crtc_y = new_state->crtc_y; in mtk_plane_atomic_async_update()
151 plane->state->crtc_h = new_state->crtc_h; in mtk_plane_atomic_async_update()
152 plane->state->crtc_w = new_state->crtc_w; in mtk_plane_atomic_async_update()
153 plane->state->src_x = new_state->src_x; in mtk_plane_atomic_async_update()
154 plane->state->src_y = new_state->src_y; in mtk_plane_atomic_async_update()
155 plane->state->src_h = new_state->src_h; in mtk_plane_atomic_async_update()
156 plane->state->src_w = new_state->src_w; in mtk_plane_atomic_async_update()
157 swap(plane->state->fb, new_state->fb); in mtk_plane_atomic_async_update()
162 mtk_drm_crtc_async_update(new_state->crtc, plane, state); in mtk_plane_atomic_async_update()
174 static int mtk_plane_atomic_check(struct drm_plane *plane, in mtk_plane_atomic_check() argument
178 plane); in mtk_plane_atomic_check()
189 ret = mtk_drm_crtc_plane_check(new_plane_state->crtc, plane, in mtk_plane_atomic_check()
206 static void mtk_plane_atomic_disable(struct drm_plane *plane, in mtk_plane_atomic_disable() argument
210 plane); in mtk_plane_atomic_disable()
217 static void mtk_plane_atomic_update(struct drm_plane *plane, in mtk_plane_atomic_update() argument
221 plane); in mtk_plane_atomic_update()
228 mtk_plane_atomic_disable(plane, state); in mtk_plane_atomic_update()
245 int mtk_plane_init(struct drm_device *dev, struct drm_plane *plane, in mtk_plane_init() argument
251 err = drm_universal_plane_init(dev, plane, possible_crtcs, in mtk_plane_init()
260 err = drm_plane_create_rotation_property(plane, in mtk_plane_init()
267 drm_plane_helper_add(plane, &mtk_plane_helper_funcs); in mtk_plane_init()