diff options
Diffstat (limited to 'drivers/gpu/drm/drm_plane_helper.c')
| -rw-r--r-- | drivers/gpu/drm/drm_plane_helper.c | 12 | 
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c index f88f68161519..621f17643bb0 100644 --- a/drivers/gpu/drm/drm_plane_helper.c +++ b/drivers/gpu/drm/drm_plane_helper.c @@ -440,6 +440,7 @@ out:   * @src_y: y offset of @fb for panning   * @src_w: width of source rectangle in @fb   * @src_h: height of source rectangle in @fb + * @ctx: lock acquire context, not used here   *   * Provides a default plane update handler using the atomic plane update   * functions. It is fully left to the driver to check plane constraints and @@ -455,7 +456,8 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,  			    int crtc_x, int crtc_y,  			    unsigned int crtc_w, unsigned int crtc_h,  			    uint32_t src_x, uint32_t src_y, -			    uint32_t src_w, uint32_t src_h) +			    uint32_t src_w, uint32_t src_h, +			    struct drm_modeset_acquire_ctx *ctx)  {  	struct drm_plane_state *plane_state; @@ -489,6 +491,7 @@ EXPORT_SYMBOL(drm_plane_helper_update);  /**   * drm_plane_helper_disable() - Transitional helper for plane disable   * @plane: plane to disable + * @ctx: lock acquire context, not used here   *   * Provides a default plane disable handler using the atomic plane update   * functions. It is fully left to the driver to check plane constraints and @@ -499,9 +502,11 @@ EXPORT_SYMBOL(drm_plane_helper_update);   * RETURNS:   * Zero on success, error code on failure   */ -int drm_plane_helper_disable(struct drm_plane *plane) +int drm_plane_helper_disable(struct drm_plane *plane, +			     struct drm_modeset_acquire_ctx *ctx)  {  	struct drm_plane_state *plane_state; +	struct drm_framebuffer *old_fb;  	/* crtc helpers love to call disable functions for already disabled hw  	 * functions. So cope with that. */ @@ -521,8 +526,9 @@ int drm_plane_helper_disable(struct drm_plane *plane)  	plane_state->plane = plane;  	plane_state->crtc = NULL; +	old_fb = plane_state->fb;  	drm_atomic_set_fb_for_plane(plane_state, NULL); -	return drm_plane_helper_commit(plane, plane_state, plane->fb); +	return drm_plane_helper_commit(plane, plane_state, old_fb);  }  EXPORT_SYMBOL(drm_plane_helper_disable);  |