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 <ch...@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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to