[Intel-gfx] [PATCH 3/9] drm/i915: Use plane->state->fb instead of plane->fb in intel_plane_restore()

Matt Roper matthew.d.roper at intel.com
Tue Mar 10 10:01:47 PDT 2015


On Tue, Mar 10, 2015 at 01:15:23PM +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> plane->fb is not as reliable as plane->state->fb so let's convert
> intel_plane_restore() over the the new way of thinking as well.
> 
> Cc: Matt Roper <matthew.d.roper at intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_sprite.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 7051da7..a828736 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -1361,10 +1361,10 @@ out_unlock:
>  
>  int intel_plane_restore(struct drm_plane *plane)
>  {
> -	if (!plane->crtc || !plane->fb)
> +	if (!plane->crtc || !plane->state->fb)
>  		return 0;
>  
> -	return plane->funcs->update_plane(plane, plane->crtc, plane->fb,
> +	return plane->funcs->update_plane(plane, plane->crtc, plane->state->fb,

While we're at it, should we s/plane->crtc/plane->state->crtc/ as well?

Otherwise, 1-3 are

Reviewed-by: Matt Roper <matthew.d.roper at intel.com>

>  				  plane->state->crtc_x, plane->state->crtc_y,
>  				  plane->state->crtc_w, plane->state->crtc_h,
>  				  plane->state->src_x, plane->state->src_y,
> -- 
> 2.0.5
> 

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795


More information about the Intel-gfx mailing list