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 __drm_atomic_helper_plane_duplicate_state(plane, &new_shadow_plane_state->base); in __drm_gem_duplicate_shadow_plane_state()
226 * drm_gem_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
227 * @plane: the plane
235 * Mappings are maintained during the atomic commit by the plane's prepare_fb
240 * A pointer to a new plane state on success, or NULL otherwise.
243 drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane) in drm_gem_duplicate_shadow_plane_state() argument
245 struct drm_plane_state *plane_state = plane->state; in drm_gem_duplicate_shadow_plane_state()
254 __drm_gem_duplicate_shadow_plane_state(plane, new_shadow_plane_state); in drm_gem_duplicate_shadow_plane_state()
261 * __drm_gem_destroy_shadow_plane_state - cleans up shadow-buffered plane state
262 * @shadow_plane_state: the shadow-buffered plane state
264 * This function cleans up shadow-buffered plane state. Helpful for drivers that
274 * drm_gem_destroy_shadow_plane_state - deletes shadow-buffered plane state
275 * @plane: the plane
276 * @plane_state: the plane state of type struct drm_shadow_plane_state
282 void drm_gem_destroy_shadow_plane_state(struct drm_plane *plane, in drm_gem_destroy_shadow_plane_state() argument
294 * __drm_gem_reset_shadow_plane - resets a shadow-buffered plane
295 * @plane: the plane
296 * @shadow_plane_state: the shadow-buffered plane state
301 void __drm_gem_reset_shadow_plane(struct drm_plane *plane, in __drm_gem_reset_shadow_plane() argument
304 __drm_atomic_helper_plane_reset(plane, &shadow_plane_state->base); in __drm_gem_reset_shadow_plane()
309 * drm_gem_reset_shadow_plane - resets a shadow-buffered plane
310 * @plane: the plane
313 * shadow-buffered planes. It assumes the current plane state to be
317 void drm_gem_reset_shadow_plane(struct drm_plane *plane) in drm_gem_reset_shadow_plane() argument
321 if (plane->state) { in drm_gem_reset_shadow_plane()
322 drm_gem_destroy_shadow_plane_state(plane, plane->state); in drm_gem_reset_shadow_plane()
323 plane->state = NULL; /* must be set to NULL here */ in drm_gem_reset_shadow_plane()
329 __drm_gem_reset_shadow_plane(plane, shadow_plane_state); in drm_gem_reset_shadow_plane()
335 * @plane: the plane
336 * @plane_state: the plane state of type struct drm_shadow_plane_state
339 * maps all buffer objects of the plane's framebuffer into kernel address
348 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
362 * @plane: the plane
363 * @plane_state: the plane state of type struct drm_shadow_plane_state
370 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
385 * @plane_state: the plane state of type struct drm_shadow_plane_state
398 return drm_gem_begin_shadow_fb_access(&pipe->plane, plane_state); in drm_gem_simple_kms_begin_shadow_fb_access()
405 * @plane_state: the plane state of type struct drm_shadow_plane_state
416 drm_gem_end_shadow_fb_access(&pipe->plane, plane_state); in drm_gem_simple_kms_end_shadow_fb_access()
421 * drm_gem_simple_kms_reset_shadow_plane - resets a shadow-buffered plane
429 drm_gem_reset_shadow_plane(&pipe->plane); in drm_gem_simple_kms_reset_shadow_plane()
434 * drm_gem_simple_kms_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
439 * buffers. Mappings are maintained during the atomic commit by the plane's prepare_fb
443 * A pointer to a new plane state on success, or NULL otherwise.
448 return drm_gem_duplicate_shadow_plane_state(&pipe->plane); in drm_gem_simple_kms_duplicate_shadow_plane_state()
453 * drm_gem_simple_kms_destroy_shadow_plane_state - resets shadow-buffered plane state
455 * @plane_state: the plane state of type struct drm_shadow_plane_state
464 drm_gem_destroy_shadow_plane_state(&pipe->plane, plane_state); in drm_gem_simple_kms_destroy_shadow_plane_state()