aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-07-19 15:36:53 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-25 09:22:05 -0400
commit6af5d92f909796cb706f3b9efefd75cb0f5afcff (patch)
treede568838b3531ec9c4b1055f41bb294b1817f189 /drivers/gpu/drm/i915/i915_drv.h
parent907b28c56ea40629aa6595ddfa414ec2fc7da41c (diff)
drm/i915: Use a private interface for register access within GT
The GT functions for enabling register access also need to occasionally write to and read from registers. To avoid the potential recursion as we modify the public interface to be stricter, introduce a private register access API for the GT functions. v2: Rebase v3: Rebase onto uncore v4: Use raw interfaces consistently so that we only use the low-level readN functions from a single location. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index a55315a8d5a3..cf40bb16bb37 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2133,22 +2133,20 @@ void intel_sbi_write(struct drm_i915_private *dev_priv, u16 reg, u32 value,
2133int vlv_gpu_freq(int ddr_freq, int val); 2133int vlv_gpu_freq(int ddr_freq, int val);
2134int vlv_freq_opcode(int ddr_freq, int val); 2134int vlv_freq_opcode(int ddr_freq, int val);
2135 2135
2136#define __i915_read(x, y) \ 2136#define __i915_read(x) \
2137 u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg); 2137 u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg);
2138 2138__i915_read(8)
2139__i915_read(8, b) 2139__i915_read(16)
2140__i915_read(16, w) 2140__i915_read(32)
2141__i915_read(32, l) 2141__i915_read(64)
2142__i915_read(64, q)
2143#undef __i915_read 2142#undef __i915_read
2144 2143
2145#define __i915_write(x, y) \ 2144#define __i915_write(x) \
2146 void i915_write##x(struct drm_i915_private *dev_priv, u32 reg, u##x val); 2145 void i915_write##x(struct drm_i915_private *dev_priv, u32 reg, u##x val);
2147 2146__i915_write(8)
2148__i915_write(8, b) 2147__i915_write(16)
2149__i915_write(16, w) 2148__i915_write(32)
2150__i915_write(32, l) 2149__i915_write(64)
2151__i915_write(64, q)
2152#undef __i915_write 2150#undef __i915_write
2153 2151
2154#define I915_READ8(reg) i915_read8(dev_priv, (reg)) 2152#define I915_READ8(reg) i915_read8(dev_priv, (reg))