• Ville Syrjälä's avatar
    drm/i915: Fix RGB color range property for PCH platforms · 3685a8f3
    Ville Syrjälä authored
    The RGB color range select bit on the DP/SDVO/HDMI registers
    disappeared when PCH was introduced, and instead a new PIPECONF bit
    was added that performs the same function.
    
    Add a new INTEL_MODE_LIMITED_COLOR_RANGE private mode flag, and set
    it in the encoder mode_fixup if limited color range is requested.
    Set the the PIPECONF bit 13 based on the flag.
    
    Experimentation showed that simply toggling the bit while the pipe is
    active doesn't work. We need to restart the pipe, which luckily already
    happens.
    
    The DP/SDVO/HDMI bit 8 is marked MBZ in the docs, so avoid setting it,
    although it doesn't seem to do any harm in practice.
    
    TODO:
    - the PIPECONF bit too seems to have disappeared from HSW. Need a
      volunteer to test if it's just a documentation issue or if it's really
      gone. If the bit is gone and no easy replacement is found, then I suppose
      we may need to use the pipe CSC unit to perform the range compression.
    
    v2: Use mode private_flags instead of intel_encoder virtual functions
    v3: Moved the intel_dp color_range handling after bpc check to help
        later patches
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46800Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    3685a8f3
i915_reg.h 167 KB