Lines Matching full:plane

22  * synchronization helpers, and plane state and framebuffer BO mappings
25 * Before scanout, a plane's framebuffer needs to be synchronized with
28 * struct &drm_plane_helper.prepare_fb . It sets the plane's fence from
49 * and provide struct drm_shadow_plane_state, which stores the plane's mapping
54 * These macros set up the plane and plane-helper callbacks to point to the
72 * from the plane state. Use to_drm_shadow_plane_state() to upcast from
77 * void driver_plane_atomic_update(struct drm_plane *plane,
80 * struct drm_plane_state *plane_state = plane->state;
115 * Plane Helpers
120 * @plane: Plane
121 * @state: Plane state the fence will be attached to
124 * attaches it to plane state for the atomic helper to wait on. This is
136 int drm_gem_plane_helper_prepare_fb(struct drm_plane *plane, in drm_gem_plane_helper_prepare_fb() argument
157 * obeys both implicit and explicit fences for plane updates, then it in drm_gem_plane_helper_prepare_fb()
206 * __drm_gem_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
207 * @plane: the plane
208 * @new_shadow_plane_state: the new shadow-buffered plane state
210 * This function duplicates shadow-buffered plane state. This is helpful for drivers
214 * Mappings are maintained during the atomic commit by the plane's prepare_fb
219 __drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane, in __drm_gem_duplicate_shadow_plane_state() argument
222 struct drm_plane_state *plane_state = plane->state; in __drm_gem_duplicate_shadow_plane_state()
226 __drm_atomic_helper_plane_duplicate_state(plane, &new_shadow_plane_state->base); in __drm_gem_duplicate_shadow_plane_state()
234 * drm_gem_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
235 * @plane: the plane
243 * Mappings are maintained during the atomic commit by the plane's prepare_fb
248 * A pointer to a new plane state on success, or NULL otherwise.
251 drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane) in drm_gem_duplicate_shadow_plane_state() argument
253 struct drm_plane_state *plane_state = plane->state; in drm_gem_duplicate_shadow_plane_state()
262 __drm_gem_duplicate_shadow_plane_state(plane, new_shadow_plane_state); in drm_gem_duplicate_shadow_plane_state()
269 * __drm_gem_destroy_shadow_plane_state - cleans up shadow-buffered plane state
270 * @shadow_plane_state: the shadow-buffered plane state
272 * This function cleans up shadow-buffered plane state. Helpful for drivers that
283 * drm_gem_destroy_shadow_plane_state - deletes shadow-buffered plane state
284 * @plane: the plane
285 * @plane_state: the plane state of type struct drm_shadow_plane_state
291 void drm_gem_destroy_shadow_plane_state(struct drm_plane *plane, in drm_gem_destroy_shadow_plane_state() argument
303 * __drm_gem_reset_shadow_plane - resets a shadow-buffered plane
304 * @plane: the plane
305 * @shadow_plane_state: the shadow-buffered plane state
310 void __drm_gem_reset_shadow_plane(struct drm_plane *plane, in __drm_gem_reset_shadow_plane() argument
314 __drm_atomic_helper_plane_reset(plane, &shadow_plane_state->base); in __drm_gem_reset_shadow_plane()
317 __drm_atomic_helper_plane_reset(plane, NULL); in __drm_gem_reset_shadow_plane()
323 * drm_gem_reset_shadow_plane - resets a shadow-buffered plane
324 * @plane: the plane
327 * shadow-buffered planes. It assumes the current plane state to be
331 void drm_gem_reset_shadow_plane(struct drm_plane *plane) in drm_gem_reset_shadow_plane() argument
335 if (plane->state) { in drm_gem_reset_shadow_plane()
336 drm_gem_destroy_shadow_plane_state(plane, plane->state); in drm_gem_reset_shadow_plane()
337 plane->state = NULL; /* must be set to NULL here */ in drm_gem_reset_shadow_plane()
341 __drm_gem_reset_shadow_plane(plane, shadow_plane_state); in drm_gem_reset_shadow_plane()
347 * @plane: the plane
348 * @plane_state: the plane state of type struct drm_shadow_plane_state
351 * maps all buffer objects of the plane's framebuffer into kernel address
360 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
374 * @plane: the plane
375 * @plane_state: the plane state of type struct drm_shadow_plane_state
382 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
397 * @plane_state: the plane state of type struct drm_shadow_plane_state
410 return drm_gem_begin_shadow_fb_access(&pipe->plane, plane_state); in drm_gem_simple_kms_begin_shadow_fb_access()
417 * @plane_state: the plane state of type struct drm_shadow_plane_state
428 drm_gem_end_shadow_fb_access(&pipe->plane, plane_state); in drm_gem_simple_kms_end_shadow_fb_access()
433 * drm_gem_simple_kms_reset_shadow_plane - resets a shadow-buffered plane
441 drm_gem_reset_shadow_plane(&pipe->plane); in drm_gem_simple_kms_reset_shadow_plane()
446 * drm_gem_simple_kms_duplicate_shadow_plane_state - duplicates shadow-buffered plane state
451 * buffers. Mappings are maintained during the atomic commit by the plane's prepare_fb
455 * A pointer to a new plane state on success, or NULL otherwise.
460 return drm_gem_duplicate_shadow_plane_state(&pipe->plane); in drm_gem_simple_kms_duplicate_shadow_plane_state()
465 * drm_gem_simple_kms_destroy_shadow_plane_state - resets shadow-buffered plane state
467 * @plane_state: the plane state of type struct drm_shadow_plane_state
476 drm_gem_destroy_shadow_plane_state(&pipe->plane, plane_state); in drm_gem_simple_kms_destroy_shadow_plane_state()