aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorAntti Koskipaa <antti.koskipaa@linux.intel.com>2014-02-04 07:22:24 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-02-04 18:46:08 -0500
commita57c774ab2b849b9f53ec01308186355aa4227e5 (patch)
tree74aa11dd570fb82c935f5d1559e14b2417fc4648 /drivers/gpu/drm/i915/i915_drv.h
parent8c99e57d3926959dd940e834da6fa707601ba7e5 (diff)
drm/i915: Reorganize display pipe register accesses
RFCv2: Reorganize array indexing so that full offsets can be used as is. It makes grepping for registers in i915_reg.h much easier. Also move offset arrays to intel_device_info. v1: Fixed offsets for VLV, proper eDP handling v2: Fixed BCLRPAT, PIPESRC, PIPECONF and DSP* macros. v3: Added EDP pipe comment, removed redundant offset arrays for MSA_MISC and DDI_FUNC_CTL. v4: Rename patch and report object size increase. v5: Change location of commas, add PIPE_EDP into enum pipe v6: Insert PIPE_EDP_OFFSET into pipe offset array v7: Set I915_MAX_PIPES back to 3, change more registers accessors to use the new macros, get rid of _PIPE_INC and add dev_priv as a parameter where required by the new macros. Upcoming hardware will not have the various display pipe register ranges evenly spaced in memory. Change register address calculations into array lookups. Tested on SNB, VLV, IVB, Gen2 and HSW w/eDP. I left the UMS cruft untouched. Size differences: text data bss dec hex filename 596431 4634 56 601121 92c21 i915.ko (new) 593199 4634 56 597889 91f81 i915.ko (old) Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> 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.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index e908c9910640..728b9c3f0421 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -58,7 +58,8 @@ enum pipe {
58 PIPE_A = 0, 58 PIPE_A = 0,
59 PIPE_B, 59 PIPE_B,
60 PIPE_C, 60 PIPE_C,
61 I915_MAX_PIPES 61 _PIPE_EDP,
62 I915_MAX_PIPES = _PIPE_EDP
62}; 63};
63#define pipe_name(p) ((p) + 'A') 64#define pipe_name(p) ((p) + 'A')
64 65
@@ -66,7 +67,8 @@ enum transcoder {
66 TRANSCODER_A = 0, 67 TRANSCODER_A = 0,
67 TRANSCODER_B, 68 TRANSCODER_B,
68 TRANSCODER_C, 69 TRANSCODER_C,
69 TRANSCODER_EDP = 0xF, 70 TRANSCODER_EDP,
71 I915_MAX_TRANSCODERS
70}; 72};
71#define transcoder_name(t) ((t) + 'A') 73#define transcoder_name(t) ((t) + 'A')
72 74
@@ -531,6 +533,12 @@ struct intel_device_info {
531 u8 gen; 533 u8 gen;
532 u8 ring_mask; /* Rings supported by the HW */ 534 u8 ring_mask; /* Rings supported by the HW */
533 DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG, SEP_SEMICOLON); 535 DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG, SEP_SEMICOLON);
536 /* Register offsets for the various display pipes and transcoders */
537 int pipe_offsets[I915_MAX_TRANSCODERS];
538 int trans_offsets[I915_MAX_TRANSCODERS];
539 int dpll_offsets[I915_MAX_PIPES];
540 int dpll_md_offsets[I915_MAX_PIPES];
541 int palette_offsets[I915_MAX_PIPES];
534}; 542};
535 543
536#undef DEFINE_FLAG 544#undef DEFINE_FLAG