Lines Matching full:plane

19  * synchronization helpers, and plane state and framebuffer BO mappings
22 * Before scanout, a plane's framebuffer needs to be synchronized with
25 * struct &drm_plane_helper.prepare_fb . It sets the plane's fence from
54 * and provide struct drm_shadow_plane_state, which stores the plane's mapping
59 * These macros set up the plane and plane-helper callbacks to point to the
77 * from the plane state. Use to_drm_shadow_plane_state() to upcast from
82 * void driver_plane_atomic_update(struct drm_plane *plane,
85 * struct drm_plane_state *plane_state = plane->state;
120 * Plane Helpers
125 * @plane: Plane
126 * @state: Plane state the fence will be attached to
129 * attaches it to plane state for the atomic helper to wait on. This is
144 int drm_gem_plane_helper_prepare_fb(struct drm_plane *plane, struct drm_plane_state *state) in drm_gem_plane_helper_prepare_fb() argument
163 * @plane_state: Plane state
166 * from &drm_gem_object.resv and attaches it to plane state for the atomic
177 return drm_gem_plane_helper_prepare_fb(&pipe->plane, plane_state); in drm_gem_simple_display_pipe_prepare_fb()
186 * __drm_gem_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
187 * @plane: the plane
188 * @new_shadow_plane_state: the new shadow-buffered plane state
190 * This function duplicates shadow-buffered plane state. This is helpful for drivers
194 * Mappings are maintained during the atomic commit by the plane's prepare_fb
199 __drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane, in __drm_gem_duplicate_shadow_plane_state() argument
202 __drm_atomic_helper_plane_duplicate_state(plane, &new_shadow_plane_state->base); in __drm_gem_duplicate_shadow_plane_state()
207 * drm_gem_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
208 * @plane: the plane
216 * Mappings are maintained during the atomic commit by the plane's prepare_fb
221 * A pointer to a new plane state on success, or NULL otherwise.
224 drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane) in drm_gem_duplicate_shadow_plane_state() argument
226 struct drm_plane_state *plane_state = plane->state; in drm_gem_duplicate_shadow_plane_state()
235 __drm_gem_duplicate_shadow_plane_state(plane, new_shadow_plane_state); in drm_gem_duplicate_shadow_plane_state()
242 * __drm_gem_destroy_shadow_plane_state - cleans up shadow-buffered plane state
243 * @shadow_plane_state: the shadow-buffered plane state
245 * This function cleans up shadow-buffered plane state. Helpful for drivers that
255 * drm_gem_destroy_shadow_plane_state - deletes shadow-buffered plane state
256 * @plane: the plane
257 * @plane_state: the plane state of type struct drm_shadow_plane_state
263 void drm_gem_destroy_shadow_plane_state(struct drm_plane *plane, in drm_gem_destroy_shadow_plane_state() argument
275 * __drm_gem_reset_shadow_plane - resets a shadow-buffered plane
276 * @plane: the plane
277 * @shadow_plane_state: the shadow-buffered plane state
282 void __drm_gem_reset_shadow_plane(struct drm_plane *plane, in __drm_gem_reset_shadow_plane() argument
285 __drm_atomic_helper_plane_reset(plane, &shadow_plane_state->base); in __drm_gem_reset_shadow_plane()
290 * drm_gem_reset_shadow_plane - resets a shadow-buffered plane
291 * @plane: the plane
294 * shadow-buffered planes. It assumes the current plane state to be
298 void drm_gem_reset_shadow_plane(struct drm_plane *plane) in drm_gem_reset_shadow_plane() argument
302 if (plane->state) { in drm_gem_reset_shadow_plane()
303 drm_gem_destroy_shadow_plane_state(plane, plane->state); in drm_gem_reset_shadow_plane()
304 plane->state = NULL; /* must be set to NULL here */ in drm_gem_reset_shadow_plane()
310 __drm_gem_reset_shadow_plane(plane, shadow_plane_state); in drm_gem_reset_shadow_plane()
316 * @plane: the plane
317 * @plane_state: the plane state of type struct drm_shadow_plane_state
320 * maps all buffer objects of the plane's framebuffer into kernel address
329 int drm_gem_prepare_shadow_fb(struct drm_plane *plane, struct drm_plane_state *plane_state) in drm_gem_prepare_shadow_fb() argument
338 ret = drm_gem_plane_helper_prepare_fb(plane, plane_state); in drm_gem_prepare_shadow_fb()
348 * @plane: the plane
349 * @plane_state: the plane state of type struct drm_shadow_plane_state
352 * This function unmaps all buffer objects of the plane's framebuffer.
356 void drm_gem_cleanup_shadow_fb(struct drm_plane *plane, struct drm_plane_state *plane_state) in drm_gem_cleanup_shadow_fb() argument
371 * @plane_state: the plane state of type struct drm_shadow_plane_state
374 * maps all buffer objects of the plane's framebuffer into kernel address
386 return drm_gem_prepare_shadow_fb(&pipe->plane, plane_state); in drm_gem_simple_kms_prepare_shadow_fb()
393 * @plane_state: the plane state of type struct drm_shadow_plane_state
396 * This function unmaps all buffer objects of the plane's framebuffer.
403 drm_gem_cleanup_shadow_fb(&pipe->plane, plane_state); in drm_gem_simple_kms_cleanup_shadow_fb()
408 * drm_gem_simple_kms_reset_shadow_plane - resets a shadow-buffered plane
416 drm_gem_reset_shadow_plane(&pipe->plane); in drm_gem_simple_kms_reset_shadow_plane()
421 * drm_gem_simple_kms_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
426 * buffers. Mappings are maintained during the atomic commit by the plane's prepare_fb
430 * A pointer to a new plane state on success, or NULL otherwise.
435 return drm_gem_duplicate_shadow_plane_state(&pipe->plane); in drm_gem_simple_kms_duplicate_shadow_plane_state()
440 * drm_gem_simple_kms_destroy_shadow_plane_state - resets shadow-buffered plane state
442 * @plane_state: the plane state of type struct drm_shadow_plane_state
451 drm_gem_destroy_shadow_plane_state(&pipe->plane, plane_state); in drm_gem_simple_kms_destroy_shadow_plane_state()