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
56 * and provide struct drm_shadow_plane_state, which stores the plane's mapping
61 * These macros set up the plane and plane-helper callbacks to point to the
79 * from the plane state. Use to_drm_shadow_plane_state() to upcast from
84 * void driver_plane_atomic_update(struct drm_plane *plane,
87 * struct drm_plane_state *plane_state = plane->state;
122 * Plane Helpers
127 * @plane: Plane
128 * @state: Plane state the fence will be attached to
131 * attaches it to plane state for the atomic helper to wait on. This is
143 int drm_gem_plane_helper_prepare_fb(struct drm_plane *plane, in drm_gem_plane_helper_prepare_fb() argument
164 * obeys both implicit and explicit fences for plane updates, then it in drm_gem_plane_helper_prepare_fb()
211 * @plane_state: Plane state
214 * from &drm_gem_object.resv and attaches them to the plane state for the atomic
225 return drm_gem_plane_helper_prepare_fb(&pipe->plane, plane_state); in drm_gem_simple_display_pipe_prepare_fb()
234 * __drm_gem_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
235 * @plane: the plane
236 * @new_shadow_plane_state: the new shadow-buffered plane state
238 * This function duplicates shadow-buffered plane state. This is helpful for drivers
242 * Mappings are maintained during the atomic commit by the plane's prepare_fb
247 __drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane, in __drm_gem_duplicate_shadow_plane_state() argument
250 __drm_atomic_helper_plane_duplicate_state(plane, &new_shadow_plane_state->base); in __drm_gem_duplicate_shadow_plane_state()
255 * drm_gem_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
256 * @plane: the plane
264 * Mappings are maintained during the atomic commit by the plane's prepare_fb
269 * A pointer to a new plane state on success, or NULL otherwise.
272 drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane) in drm_gem_duplicate_shadow_plane_state() argument
274 struct drm_plane_state *plane_state = plane->state; in drm_gem_duplicate_shadow_plane_state()
283 __drm_gem_duplicate_shadow_plane_state(plane, new_shadow_plane_state); in drm_gem_duplicate_shadow_plane_state()
290 * __drm_gem_destroy_shadow_plane_state - cleans up shadow-buffered plane state
291 * @shadow_plane_state: the shadow-buffered plane state
293 * This function cleans up shadow-buffered plane state. Helpful for drivers that
303 * drm_gem_destroy_shadow_plane_state - deletes shadow-buffered plane state
304 * @plane: the plane
305 * @plane_state: the plane state of type struct drm_shadow_plane_state
311 void drm_gem_destroy_shadow_plane_state(struct drm_plane *plane, in drm_gem_destroy_shadow_plane_state() argument
323 * __drm_gem_reset_shadow_plane - resets a shadow-buffered plane
324 * @plane: the plane
325 * @shadow_plane_state: the shadow-buffered plane state
330 void __drm_gem_reset_shadow_plane(struct drm_plane *plane, in __drm_gem_reset_shadow_plane() argument
333 __drm_atomic_helper_plane_reset(plane, &shadow_plane_state->base); in __drm_gem_reset_shadow_plane()
338 * drm_gem_reset_shadow_plane - resets a shadow-buffered plane
339 * @plane: the plane
342 * shadow-buffered planes. It assumes the current plane state to be
346 void drm_gem_reset_shadow_plane(struct drm_plane *plane) in drm_gem_reset_shadow_plane() argument
350 if (plane->state) { in drm_gem_reset_shadow_plane()
351 drm_gem_destroy_shadow_plane_state(plane, plane->state); in drm_gem_reset_shadow_plane()
352 plane->state = NULL; /* must be set to NULL here */ in drm_gem_reset_shadow_plane()
358 __drm_gem_reset_shadow_plane(plane, shadow_plane_state); in drm_gem_reset_shadow_plane()
364 * @plane: the plane
365 * @plane_state: the plane state of type struct drm_shadow_plane_state
368 * maps all buffer objects of the plane's framebuffer into kernel address
377 int drm_gem_prepare_shadow_fb(struct drm_plane *plane, struct drm_plane_state *plane_state) in drm_gem_prepare_shadow_fb() argument
386 ret = drm_gem_plane_helper_prepare_fb(plane, plane_state); in drm_gem_prepare_shadow_fb()
396 * @plane: the plane
397 * @plane_state: the plane state of type struct drm_shadow_plane_state
400 * This function unmaps all buffer objects of the plane's framebuffer.
404 void drm_gem_cleanup_shadow_fb(struct drm_plane *plane, struct drm_plane_state *plane_state) in drm_gem_cleanup_shadow_fb() argument
419 * @plane_state: the plane state of type struct drm_shadow_plane_state
422 * maps all buffer objects of the plane's framebuffer into kernel address
434 return drm_gem_prepare_shadow_fb(&pipe->plane, plane_state); in drm_gem_simple_kms_prepare_shadow_fb()
441 * @plane_state: the plane state of type struct drm_shadow_plane_state
444 * This function unmaps all buffer objects of the plane's framebuffer.
451 drm_gem_cleanup_shadow_fb(&pipe->plane, plane_state); in drm_gem_simple_kms_cleanup_shadow_fb()
456 * drm_gem_simple_kms_reset_shadow_plane - resets a shadow-buffered plane
464 drm_gem_reset_shadow_plane(&pipe->plane); in drm_gem_simple_kms_reset_shadow_plane()
469 * drm_gem_simple_kms_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
474 * buffers. Mappings are maintained during the atomic commit by the plane's prepare_fb
478 * A pointer to a new plane state on success, or NULL otherwise.
483 return drm_gem_duplicate_shadow_plane_state(&pipe->plane); in drm_gem_simple_kms_duplicate_shadow_plane_state()
488 * drm_gem_simple_kms_destroy_shadow_plane_state - resets shadow-buffered plane state
490 * @plane_state: the plane state of type struct drm_shadow_plane_state
499 drm_gem_destroy_shadow_plane_state(&pipe->plane, plane_state); in drm_gem_simple_kms_destroy_shadow_plane_state()