• Antti Koskipaa's avatar
    drm/i915: Reorganize display pipe register accesses · a57c774a
    Antti Koskipaa authored
    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: default avatarAntti Koskipaa <antti.koskipaa@linux.intel.com>
    Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Tested-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    a57c774a
intel_hdmi.c 37.6 KB