[Intel-gfx] [PATCH 12/36] drm/i915: Merge sbi read/write into a single accessor

Sagar Arun Kamble sagar.a.kamble at intel.com
Fri Mar 16 03:39:56 UTC 2018



On 3/14/2018 3:07 PM, Chris Wilson wrote:
> Since intel_sideband_read and intel_sideband_write differ by only a
> couple of lines (depending on whether we feed the value in or out),
> merge the two into a single common accessor.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
<snip>
> -u32 vlv_flisdsi_read(struct drm_i915_private *dev_priv, u32 reg)
vlv_flisdsi_read declaration can be removed from sideband.h
> +void intel_sbi_write(struct drm_i915_private *dev_priv, u16 reg, u32 value,
> +		     enum intel_sbi_destination destination)
>   {
> -	u32 val = 0;
> -	vlv_sideband_rw(dev_priv, DPIO_DEVFN, IOSF_PORT_FLISDSI, SB_CRRDDA_NP,
> -			reg, &val);
> -	return val;
> +	intel_sbi_rw(dev_priv, reg, destination, &value, false);
>   }
>   
>   void vlv_flisdsi_write(struct drm_i915_private *dev_priv, u32 reg, u32 val)

-- 
Thanks,
Sagar



More information about the Intel-gfx mailing list