[Intel-gfx] [PATCH 4/6] drm/i915: Kill RMW from ILK reset code

Jesse Barnes jbarnes at virtuousgeek.org
Tue May 20 20:37:03 CEST 2014


On Mon, 19 May 2014 19:23:25 +0300
ville.syrjala at linux.intel.com wrote:

> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> All the other bits in the GDSR register are read-only, so we don't have
> to preserve them when we perform a GPU reset.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_uncore.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 008d30b..5c29cfe 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -993,22 +993,17 @@ static int i965_do_reset(struct drm_device *dev)
>  static int ironlake_do_reset(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> -	u32 gdrst;
>  	int ret;
>  
> -	gdrst = I915_READ(MCHBAR_MIRROR_BASE + ILK_GDSR);
> -	gdrst &= ~ILK_GRDOM_MASK;
>  	I915_WRITE(MCHBAR_MIRROR_BASE + ILK_GDSR,
> -		   gdrst | ILK_GRDOM_RENDER | ILK_GRDOM_RESET_ENABLE);
> +		   ILK_GRDOM_RENDER | ILK_GRDOM_RESET_ENABLE);
>  	ret = wait_for((I915_READ(MCHBAR_MIRROR_BASE + ILK_GDSR) &
>  			ILK_GRDOM_RESET_ENABLE) == 0, 500);
>  	if (ret)
>  		return ret;
>  
> -	gdrst = I915_READ(MCHBAR_MIRROR_BASE + ILK_GDSR);
> -	gdrst &= ~ILK_GRDOM_MASK;
>  	I915_WRITE(MCHBAR_MIRROR_BASE + ILK_GDSR,
> -		   gdrst | ILK_GRDOM_MEDIA | ILK_GRDOM_RESET_ENABLE);
> +		   ILK_GRDOM_MEDIA | ILK_GRDOM_RESET_ENABLE);
>  	return wait_for((I915_READ(MCHBAR_MIRROR_BASE + ILK_GDSR) &
>  			 ILK_GRDOM_RESET_ENABLE) == 0, 500);
>  }

Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list