Lines Matching refs:plane

38 static int mdp5_plane_mode_set(struct drm_plane *plane,
45 static void set_scanout_locked(struct drm_plane *plane,
48 static struct mdp5_kms *get_kms(struct drm_plane *plane) in get_kms() argument
50 struct msm_drm_private *priv = plane->dev->dev_private; in get_kms()
59 static void mdp5_plane_destroy(struct drm_plane *plane) in mdp5_plane_destroy() argument
61 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_destroy()
63 drm_plane_helper_disable(plane); in mdp5_plane_destroy()
64 drm_plane_cleanup(plane); in mdp5_plane_destroy()
70 struct drm_plane *plane) in mdp5_plane_install_rotation_property() argument
72 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_install_rotation_property()
84 drm_object_attach_property(&plane->base, in mdp5_plane_install_rotation_property()
90 static void mdp5_plane_install_properties(struct drm_plane *plane, in mdp5_plane_install_properties() argument
93 struct drm_device *dev = plane->dev; in mdp5_plane_install_properties()
110 drm_object_attach_property(&plane->base, prop, init_val); \ in mdp5_plane_install_properties()
124 mdp5_plane_install_rotation_property(dev, plane); in mdp5_plane_install_properties()
131 static int mdp5_plane_atomic_set_property(struct drm_plane *plane, in mdp5_plane_atomic_set_property() argument
135 struct drm_device *dev = plane->dev; in mdp5_plane_atomic_set_property()
159 static int mdp5_plane_atomic_get_property(struct drm_plane *plane, in mdp5_plane_atomic_get_property() argument
163 struct drm_device *dev = plane->dev; in mdp5_plane_atomic_get_property()
187 static void mdp5_plane_reset(struct drm_plane *plane) in mdp5_plane_reset() argument
191 if (plane->state && plane->state->fb) in mdp5_plane_reset()
192 drm_framebuffer_unreference(plane->state->fb); in mdp5_plane_reset()
194 kfree(to_mdp5_plane_state(plane->state)); in mdp5_plane_reset()
201 if (plane->type == DRM_PLANE_TYPE_PRIMARY) in mdp5_plane_reset()
204 mdp5_state->zpos = STAGE0 + drm_plane_index(plane); in mdp5_plane_reset()
206 mdp5_state->base.plane = plane; in mdp5_plane_reset()
208 plane->state = &mdp5_state->base; in mdp5_plane_reset()
212 mdp5_plane_duplicate_state(struct drm_plane *plane) in mdp5_plane_duplicate_state() argument
216 if (WARN_ON(!plane->state)) in mdp5_plane_duplicate_state()
219 mdp5_state = kmemdup(to_mdp5_plane_state(plane->state), in mdp5_plane_duplicate_state()
231 static void mdp5_plane_destroy_state(struct drm_plane *plane, in mdp5_plane_destroy_state() argument
252 static int mdp5_plane_prepare_fb(struct drm_plane *plane, in mdp5_plane_prepare_fb() argument
255 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_prepare_fb()
256 struct mdp5_kms *mdp5_kms = get_kms(plane); in mdp5_plane_prepare_fb()
266 static void mdp5_plane_cleanup_fb(struct drm_plane *plane, in mdp5_plane_cleanup_fb() argument
269 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_cleanup_fb()
270 struct mdp5_kms *mdp5_kms = get_kms(plane); in mdp5_plane_cleanup_fb()
280 static int mdp5_plane_atomic_check(struct drm_plane *plane, in mdp5_plane_atomic_check() argument
283 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_atomic_check()
284 struct drm_plane_state *old_state = plane->state; in mdp5_plane_atomic_check()
295 dev_err(plane->dev->dev, in mdp5_plane_atomic_check()
304 dev_err(plane->dev->dev, in mdp5_plane_atomic_check()
316 dev_err(plane->dev->dev, in mdp5_plane_atomic_check()
351 static void mdp5_plane_atomic_update(struct drm_plane *plane, in mdp5_plane_atomic_update() argument
354 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_atomic_update()
355 struct drm_plane_state *state = plane->state; in mdp5_plane_atomic_update()
364 ret = mdp5_plane_mode_set(plane, in mdp5_plane_atomic_update()
375 set_scanout_locked(plane, state->fb); in mdp5_plane_atomic_update()
387 static void set_scanout_locked(struct drm_plane *plane, in set_scanout_locked() argument
390 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in set_scanout_locked()
391 struct mdp5_kms *mdp5_kms = get_kms(plane); in set_scanout_locked()
411 plane->fb = fb; in set_scanout_locked()
501 static int calc_scalex_steps(struct drm_plane *plane, in calc_scalex_steps() argument
505 struct mdp5_kms *mdp5_kms = get_kms(plane); in calc_scalex_steps()
526 static int calc_scaley_steps(struct drm_plane *plane, in calc_scaley_steps() argument
530 struct mdp5_kms *mdp5_kms = get_kms(plane); in calc_scaley_steps()
665 static int mdp5_plane_mode_set(struct drm_plane *plane, in mdp5_plane_mode_set() argument
672 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_mode_set()
673 struct drm_plane_state *pstate = plane->state; in mdp5_plane_mode_set()
674 struct mdp5_kms *mdp5_kms = get_kms(plane); in mdp5_plane_mode_set()
724 ret = calc_scalex_steps(plane, pix_format, src_w, crtc_w, phasex_step); in mdp5_plane_mode_set()
728 ret = calc_scaley_steps(plane, pix_format, src_h, crtc_h, phasey_step); in mdp5_plane_mode_set()
826 set_scanout_locked(plane, fb); in mdp5_plane_mode_set()
833 void mdp5_plane_complete_flip(struct drm_plane *plane) in mdp5_plane_complete_flip() argument
835 struct mdp5_kms *mdp5_kms = get_kms(plane); in mdp5_plane_complete_flip()
836 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_complete_flip()
844 to_mdp5_plane_state(plane->state)->pending = false; in mdp5_plane_complete_flip()
847 enum mdp5_pipe mdp5_plane_pipe(struct drm_plane *plane) in mdp5_plane_pipe() argument
849 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_pipe()
853 uint32_t mdp5_plane_get_flush(struct drm_plane *plane) in mdp5_plane_get_flush() argument
855 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_get_flush()
861 void mdp5_plane_complete_commit(struct drm_plane *plane, in mdp5_plane_complete_commit() argument
864 struct mdp5_kms *mdp5_kms = get_kms(plane); in mdp5_plane_complete_commit()
865 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_complete_commit()
868 if (!plane_enabled(plane->state) && mdp5_kms->smp) { in mdp5_plane_complete_commit()
879 struct drm_plane *plane = NULL; in mdp5_plane_init() local
890 plane = &mdp5_plane->base; in mdp5_plane_init()
905 ret = drm_universal_plane_init(dev, plane, 0xff, &mdp5_plane_funcs, in mdp5_plane_init()
911 drm_plane_helper_add(plane, &mdp5_plane_helper_funcs); in mdp5_plane_init()
913 mdp5_plane_install_properties(plane, &plane->base); in mdp5_plane_init()
915 return plane; in mdp5_plane_init()
918 if (plane) in mdp5_plane_init()
919 mdp5_plane_destroy(plane); in mdp5_plane_init()