[Intel-gfx] [PATCH 1/3] drm/i915: Use helper for setting plane->state->fb

Daniel Vetter daniel at ffwll.ch
Mon Nov 28 07:20:05 UTC 2016


On Fri, Nov 25, 2016 at 03:32:29PM +0000, Chris Wilson wrote:
> We are told not to set plane_state->fb directly, but use
> drm_atomic_set_fb_for_plane() instead. Using the helper, means one less
> piece of code that needs fixing should the interface change...
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 77c4ff9efbe3..8630de472f9a 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2732,11 +2732,7 @@ update_state_fb(struct drm_plane *plane)
>  	if (plane->fb == plane->state->fb)
>  		return;
>  
> -	if (plane->state->fb)
> -		drm_framebuffer_unreference(plane->state->fb);
> -	plane->state->fb = plane->fb;
> -	if (plane->state->fb)
> -		drm_framebuffer_reference(plane->state->fb);
> +	drm_atomic_set_fb_for_plane(plane->state, plane->fb);
>  }
>  
>  static void
> -- 
> 2.10.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list