Lines Matching refs:plane

39 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 int mdp5_plane_disable(struct drm_plane *plane) in mdp5_plane_disable() argument
61 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_disable()
62 struct mdp5_kms *mdp5_kms = get_kms(plane); in mdp5_plane_disable()
75 static void mdp5_plane_destroy(struct drm_plane *plane) in mdp5_plane_destroy() argument
77 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_destroy()
79 drm_plane_helper_disable(plane); in mdp5_plane_destroy()
80 drm_plane_cleanup(plane); in mdp5_plane_destroy()
86 void mdp5_plane_install_properties(struct drm_plane *plane, in mdp5_plane_install_properties() argument
92 int mdp5_plane_set_property(struct drm_plane *plane, in mdp5_plane_set_property() argument
99 static void mdp5_plane_reset(struct drm_plane *plane) in mdp5_plane_reset() argument
103 if (plane->state && plane->state->fb) in mdp5_plane_reset()
104 drm_framebuffer_unreference(plane->state->fb); in mdp5_plane_reset()
106 kfree(to_mdp5_plane_state(plane->state)); in mdp5_plane_reset()
109 if (plane->type == DRM_PLANE_TYPE_PRIMARY) { in mdp5_plane_reset()
112 mdp5_state->zpos = 1 + drm_plane_index(plane); in mdp5_plane_reset()
114 mdp5_state->base.plane = plane; in mdp5_plane_reset()
116 plane->state = &mdp5_state->base; in mdp5_plane_reset()
120 mdp5_plane_duplicate_state(struct drm_plane *plane) in mdp5_plane_duplicate_state() argument
124 if (WARN_ON(!plane->state)) in mdp5_plane_duplicate_state()
127 mdp5_state = kmemdup(to_mdp5_plane_state(plane->state), in mdp5_plane_duplicate_state()
139 static void mdp5_plane_destroy_state(struct drm_plane *plane, in mdp5_plane_destroy_state() argument
158 static int mdp5_plane_prepare_fb(struct drm_plane *plane, in mdp5_plane_prepare_fb() argument
162 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_prepare_fb()
163 struct mdp5_kms *mdp5_kms = get_kms(plane); in mdp5_plane_prepare_fb()
169 static void mdp5_plane_cleanup_fb(struct drm_plane *plane, in mdp5_plane_cleanup_fb() argument
173 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_cleanup_fb()
174 struct mdp5_kms *mdp5_kms = get_kms(plane); in mdp5_plane_cleanup_fb()
180 static int mdp5_plane_atomic_check(struct drm_plane *plane, in mdp5_plane_atomic_check() argument
183 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_atomic_check()
184 struct drm_plane_state *old_state = plane->state; in mdp5_plane_atomic_check()
217 static void mdp5_plane_atomic_update(struct drm_plane *plane, in mdp5_plane_atomic_update() argument
220 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_atomic_update()
221 struct drm_plane_state *state = plane->state; in mdp5_plane_atomic_update()
227 mdp5_plane_disable(plane); in mdp5_plane_atomic_update()
231 ret = mdp5_plane_mode_set(plane, in mdp5_plane_atomic_update()
242 set_scanout_locked(plane, state->fb); in mdp5_plane_atomic_update()
254 static void set_scanout_locked(struct drm_plane *plane, in set_scanout_locked() argument
257 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in set_scanout_locked()
258 struct mdp5_kms *mdp5_kms = get_kms(plane); in set_scanout_locked()
278 plane->fb = fb; in set_scanout_locked()
430 static int mdp5_plane_mode_set(struct drm_plane *plane, in mdp5_plane_mode_set() argument
437 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_mode_set()
438 struct mdp5_kms *mdp5_kms = get_kms(plane); in mdp5_plane_mode_set()
572 set_scanout_locked(plane, fb); in mdp5_plane_mode_set()
579 void mdp5_plane_complete_flip(struct drm_plane *plane) in mdp5_plane_complete_flip() argument
581 struct mdp5_kms *mdp5_kms = get_kms(plane); in mdp5_plane_complete_flip()
582 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_complete_flip()
589 to_mdp5_plane_state(plane->state)->pending = false; in mdp5_plane_complete_flip()
592 enum mdp5_pipe mdp5_plane_pipe(struct drm_plane *plane) in mdp5_plane_pipe() argument
594 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_pipe()
598 uint32_t mdp5_plane_get_flush(struct drm_plane *plane) in mdp5_plane_get_flush() argument
600 struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); in mdp5_plane_get_flush()
609 struct drm_plane *plane = NULL; in mdp5_plane_init() local
620 plane = &mdp5_plane->base; in mdp5_plane_init()
633 ret = drm_universal_plane_init(dev, plane, 0xff, &mdp5_plane_funcs, in mdp5_plane_init()
639 drm_plane_helper_add(plane, &mdp5_plane_helper_funcs); in mdp5_plane_init()
641 mdp5_plane_install_properties(plane, &plane->base); in mdp5_plane_init()
643 return plane; in mdp5_plane_init()
646 if (plane) in mdp5_plane_init()
647 mdp5_plane_destroy(plane); in mdp5_plane_init()