aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2011-02-07 15:26:52 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2011-02-07 16:17:15 -0500
commit9db4a9c7b2a3bd5b4952846bc0c2f58daa80ddd7 (patch)
tree3d0d27e1115a5fae8984fbf2069d8720e5e6ee8e /drivers/gpu/drm/i915/i915_drv.h
parent8d7e3de1e019238211fa06e109437a13cae62004 (diff)
drm/i915: cleanup per-pipe reg usage
We had some conversions over to the _PIPE macros, but didn't get everything. So hide the per-pipe regs with an _ (still used in a few places for legacy) and add a few _PIPE based macros, then make sure everyone uses them. [update: remove usage of non-existent no-op macro] [update 2: keep modesetting suspend/resume code, update to new reg names] Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [ickle: stylistic cleanups for checkpatch and taste] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index bdfda0b8c604..f9e9f9840dea 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -50,17 +50,22 @@
50enum pipe { 50enum pipe {
51 PIPE_A = 0, 51 PIPE_A = 0,
52 PIPE_B, 52 PIPE_B,
53 PIPE_C,
54 I915_MAX_PIPES
53}; 55};
56#define pipe_name(p) ((p) + 'A')
54 57
55enum plane { 58enum plane {
56 PLANE_A = 0, 59 PLANE_A = 0,
57 PLANE_B, 60 PLANE_B,
61 PLANE_C,
58}; 62};
59 63#define plane_name(p) ((p) + 'A')
60#define I915_NUM_PIPE 2
61 64
62#define I915_GEM_GPU_DOMAINS (~(I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT)) 65#define I915_GEM_GPU_DOMAINS (~(I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT))
63 66
67#define for_each_pipe(p) for ((p) = 0; (p) < dev_priv->num_pipe; (p)++)
68
64/* Interface history: 69/* Interface history:
65 * 70 *
66 * 1.1: Original. 71 * 1.1: Original.
@@ -143,8 +148,7 @@ struct intel_display_error_state;
143struct drm_i915_error_state { 148struct drm_i915_error_state {
144 u32 eir; 149 u32 eir;
145 u32 pgtbl_er; 150 u32 pgtbl_er;
146 u32 pipeastat; 151 u32 pipestat[I915_MAX_PIPES];
147 u32 pipebstat;
148 u32 ipeir; 152 u32 ipeir;
149 u32 ipehr; 153 u32 ipehr;
150 u32 instdone; 154 u32 instdone;