Lines Matching full:plane

30 static void mtk_plane_reset(struct drm_plane *plane)  in mtk_plane_reset()  argument
34 if (plane->state) { in mtk_plane_reset()
35 __drm_atomic_helper_plane_destroy_state(plane->state); in mtk_plane_reset()
37 state = to_mtk_plane_state(plane->state); in mtk_plane_reset()
45 __drm_atomic_helper_plane_reset(plane, &state->base); in mtk_plane_reset()
47 state->base.plane = plane; in mtk_plane_reset()
52 static struct drm_plane_state *mtk_plane_duplicate_state(struct drm_plane *plane) in mtk_plane_duplicate_state() argument
54 struct mtk_plane_state *old_state = to_mtk_plane_state(plane->state); in mtk_plane_duplicate_state()
61 __drm_atomic_helper_plane_duplicate_state(plane, &state->base); in mtk_plane_duplicate_state()
63 WARN_ON(state->base.plane != plane); in mtk_plane_duplicate_state()
70 static bool mtk_plane_format_mod_supported(struct drm_plane *plane, in mtk_plane_format_mod_supported() argument
96 static void mtk_plane_destroy_state(struct drm_plane *plane, in mtk_plane_destroy_state() argument
103 static int mtk_plane_atomic_async_check(struct drm_plane *plane, in mtk_plane_atomic_async_check() argument
107 plane); in mtk_plane_atomic_async_check()
111 if (plane != new_plane_state->crtc->cursor) in mtk_plane_atomic_async_check()
114 if (!plane->state) in mtk_plane_atomic_async_check()
117 if (!plane->state->fb) in mtk_plane_atomic_async_check()
120 ret = mtk_crtc_plane_check(new_plane_state->crtc, plane, in mtk_plane_atomic_async_check()
127 return drm_atomic_helper_check_plane_state(plane->state, crtc_state, in mtk_plane_atomic_async_check()
187 /* The data plane is offset by 1 additional block. */ in mtk_plane_update_new_state()
215 static void mtk_plane_atomic_async_update(struct drm_plane *plane, in mtk_plane_atomic_async_update() argument
219 plane); in mtk_plane_atomic_async_update()
220 struct mtk_plane_state *new_plane_state = to_mtk_plane_state(plane->state); in mtk_plane_atomic_async_update()
222 plane->state->crtc_x = new_state->crtc_x; in mtk_plane_atomic_async_update()
223 plane->state->crtc_y = new_state->crtc_y; in mtk_plane_atomic_async_update()
224 plane->state->crtc_h = new_state->crtc_h; in mtk_plane_atomic_async_update()
225 plane->state->crtc_w = new_state->crtc_w; in mtk_plane_atomic_async_update()
226 plane->state->src_x = new_state->src_x; in mtk_plane_atomic_async_update()
227 plane->state->src_y = new_state->src_y; in mtk_plane_atomic_async_update()
228 plane->state->src_h = new_state->src_h; in mtk_plane_atomic_async_update()
229 plane->state->src_w = new_state->src_w; in mtk_plane_atomic_async_update()
230 plane->state->dst.x1 = new_state->dst.x1; in mtk_plane_atomic_async_update()
231 plane->state->dst.y1 = new_state->dst.y1; in mtk_plane_atomic_async_update()
234 swap(plane->state->fb, new_state->fb); in mtk_plane_atomic_async_update()
237 mtk_crtc_async_update(new_state->crtc, plane, state); in mtk_plane_atomic_async_update()
250 static int mtk_plane_atomic_check(struct drm_plane *plane, in mtk_plane_atomic_check() argument
254 plane); in mtk_plane_atomic_check()
265 ret = mtk_crtc_plane_check(new_plane_state->crtc, plane, in mtk_plane_atomic_check()
282 static void mtk_plane_atomic_disable(struct drm_plane *plane, in mtk_plane_atomic_disable() argument
286 plane); in mtk_plane_atomic_disable()
293 static void mtk_plane_atomic_update(struct drm_plane *plane, in mtk_plane_atomic_update() argument
297 plane); in mtk_plane_atomic_update()
304 mtk_plane_atomic_disable(plane, state); in mtk_plane_atomic_update()
321 int mtk_plane_init(struct drm_device *dev, struct drm_plane *plane, in mtk_plane_init() argument
329 DRM_ERROR("no formats for plane\n"); in mtk_plane_init()
333 err = drm_universal_plane_init(dev, plane, possible_crtcs, in mtk_plane_init()
337 DRM_ERROR("failed to initialize plane\n"); in mtk_plane_init()
349 * plane fed to this function will always have plane_idx zero. in mtk_plane_init()
351 err = drm_plane_create_zpos_immutable_property(plane, plane_idx); in mtk_plane_init()
353 DRM_ERROR("Failed to create zpos property for plane %u\n", plane_idx); in mtk_plane_init()
358 err = drm_plane_create_rotation_property(plane, in mtk_plane_init()
365 err = drm_plane_create_alpha_property(plane); in mtk_plane_init()
370 err = drm_plane_create_blend_mode_property(plane, blend_modes); in mtk_plane_init()
375 drm_plane_helper_add(plane, &mtk_plane_helper_funcs); in mtk_plane_init()