Lines Matching full:plane

21  * synchronization helpers, and plane state and framebuffer BO mappings
24 * Before scanout, a plane's framebuffer needs to be synchronized with
27 * struct &drm_plane_helper.prepare_fb . It sets the plane's fence from
48 * and provide struct drm_shadow_plane_state, which stores the plane's mapping
53 * These macros set up the plane and plane-helper callbacks to point to the
71 * from the plane state. Use to_drm_shadow_plane_state() to upcast from
76 * void driver_plane_atomic_update(struct drm_plane *plane,
79 * struct drm_plane_state *plane_state = plane->state;
114 * Plane Helpers
119 * @plane: Plane
120 * @state: Plane state the fence will be attached to
123 * attaches it to plane state for the atomic helper to wait on. This is
135 int drm_gem_plane_helper_prepare_fb(struct drm_plane *plane, in drm_gem_plane_helper_prepare_fb() argument
156 * obeys both implicit and explicit fences for plane updates, then it in drm_gem_plane_helper_prepare_fb()
205 * __drm_gem_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
206 * @plane: the plane
207 * @new_shadow_plane_state: the new shadow-buffered plane state
209 * This function duplicates shadow-buffered plane state. This is helpful for drivers
213 * Mappings are maintained during the atomic commit by the plane's prepare_fb
218 __drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane, in __drm_gem_duplicate_shadow_plane_state() argument
221 struct drm_plane_state *plane_state = plane->state; in __drm_gem_duplicate_shadow_plane_state()
225 __drm_atomic_helper_plane_duplicate_state(plane, &new_shadow_plane_state->base); in __drm_gem_duplicate_shadow_plane_state()
233 * drm_gem_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
234 * @plane: the plane
242 * Mappings are maintained during the atomic commit by the plane's prepare_fb
247 * A pointer to a new plane state on success, or NULL otherwise.
250 drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane) in drm_gem_duplicate_shadow_plane_state() argument
252 struct drm_plane_state *plane_state = plane->state; in drm_gem_duplicate_shadow_plane_state()
261 __drm_gem_duplicate_shadow_plane_state(plane, new_shadow_plane_state); in drm_gem_duplicate_shadow_plane_state()
268 * __drm_gem_destroy_shadow_plane_state - cleans up shadow-buffered plane state
269 * @shadow_plane_state: the shadow-buffered plane state
271 * This function cleans up shadow-buffered plane state. Helpful for drivers that
282 * drm_gem_destroy_shadow_plane_state - deletes shadow-buffered plane state
283 * @plane: the plane
284 * @plane_state: the plane state of type struct drm_shadow_plane_state
290 void drm_gem_destroy_shadow_plane_state(struct drm_plane *plane, in drm_gem_destroy_shadow_plane_state() argument
302 * __drm_gem_reset_shadow_plane - resets a shadow-buffered plane
303 * @plane: the plane
304 * @shadow_plane_state: the shadow-buffered plane state
309 void __drm_gem_reset_shadow_plane(struct drm_plane *plane, in __drm_gem_reset_shadow_plane() argument
312 __drm_atomic_helper_plane_reset(plane, &shadow_plane_state->base); in __drm_gem_reset_shadow_plane()
318 * drm_gem_reset_shadow_plane - resets a shadow-buffered plane
319 * @plane: the plane
322 * shadow-buffered planes. It assumes the current plane state to be
326 void drm_gem_reset_shadow_plane(struct drm_plane *plane) in drm_gem_reset_shadow_plane() argument
330 if (plane->state) { in drm_gem_reset_shadow_plane()
331 drm_gem_destroy_shadow_plane_state(plane, plane->state); in drm_gem_reset_shadow_plane()
332 plane->state = NULL; /* must be set to NULL here */ in drm_gem_reset_shadow_plane()
338 __drm_gem_reset_shadow_plane(plane, shadow_plane_state); in drm_gem_reset_shadow_plane()
344 * @plane: the plane
345 * @plane_state: the plane state of type struct drm_shadow_plane_state
348 * maps all buffer objects of the plane's framebuffer into kernel address
357 int drm_gem_begin_shadow_fb_access(struct drm_plane *plane, struct drm_plane_state *plane_state) in drm_gem_begin_shadow_fb_access() argument
371 * @plane: the plane
372 * @plane_state: the plane state of type struct drm_shadow_plane_state
379 void drm_gem_end_shadow_fb_access(struct drm_plane *plane, struct drm_plane_state *plane_state) in drm_gem_end_shadow_fb_access() argument
394 * @plane_state: the plane state of type struct drm_shadow_plane_state
407 return drm_gem_begin_shadow_fb_access(&pipe->plane, plane_state); in drm_gem_simple_kms_begin_shadow_fb_access()
414 * @plane_state: the plane state of type struct drm_shadow_plane_state
425 drm_gem_end_shadow_fb_access(&pipe->plane, plane_state); in drm_gem_simple_kms_end_shadow_fb_access()
430 * drm_gem_simple_kms_reset_shadow_plane - resets a shadow-buffered plane
438 drm_gem_reset_shadow_plane(&pipe->plane); in drm_gem_simple_kms_reset_shadow_plane()
443 * drm_gem_simple_kms_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
448 * buffers. Mappings are maintained during the atomic commit by the plane's prepare_fb
452 * A pointer to a new plane state on success, or NULL otherwise.
457 return drm_gem_duplicate_shadow_plane_state(&pipe->plane); in drm_gem_simple_kms_duplicate_shadow_plane_state()
462 * drm_gem_simple_kms_destroy_shadow_plane_state - resets shadow-buffered plane state
464 * @plane_state: the plane state of type struct drm_shadow_plane_state
473 drm_gem_destroy_shadow_plane_state(&pipe->plane, plane_state); in drm_gem_simple_kms_destroy_shadow_plane_state()