OSDN Git Service

drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color
authorClinton Taylor <Clinton.A.Taylor@intel.com>
Mon, 29 Apr 2019 23:08:11 +0000 (16:08 -0700)
committerJani Nikula <jani.nikula@intel.com>
Tue, 7 May 2019 11:20:22 +0000 (14:20 +0300)
commit05d9c8783bb29ddcfeceb50fe21d5f5dc7c814ca
tree081df514bc1daa0d517851aa227cbc19ee45aff9
parentdc58958d08bb60004d20af7842f5894f83c928c1
drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color

v2: Fix commit msg to reflect why issue occurs(Jani)
Set GCP_COLOR_INDICATION only when we set 10/12 bit deep color.

Changing settings from 10/12 bit deep color to 8 bit(& vice versa)
doesn't work correctly using xrandr max bpc property. When we
connect a monitor which supports deep color, the highest deep color
setting is selected; which sets GCP_COLOR_INDICATION. When we change
the setting to 8 bit color, we still set GCP_COLOR_INDICATION which
doesn't allow the switch back to 8 bit color.

v3,4: Add comments & drop changes in intel_hdmi_compute_config(Ville)
Since HSW+, GCP_COLOR_INDICATION is not required for 8bpc.

Drop the changes in intel_hdmi_compute_config as desired_bpp
is needed to change values for pipe_bpp based on bw_constrained flag.

v5: Fix missing logical && in condition for setting GCP_COLOR_INDICATION.

v6: Fix comment formatting (Ville)

v7: Add reviewed by Ville

v8: Set GCP_COLOR_INDICATION based on spec:
For Gen 7.5 or later platforms, indicate color depth only for deep
color modes. Bspec: 8135,7751,50524

Pre DDI platforms, indicate color depth if deep color is supported
by sink. Bspec: 7854

Exception: CHERRYVIEW behaves like Pre DDI platforms.
Bspec: 15975

Check pipe_bpp is less than bpp * 3 in hdmi_deep_color_possible,
to not set 12 bit deep color for every modeset. This fixes the issue
where 12 bit color was selected even when user selected 10 bit.(Ville)

v9: Maintain a consistent behavior for all platforms and support
GCP_COLOR_INDICATION only when we are in deep color mode. Remove
hdmi_sink_is_deep_color() - no longer needed as checking pipe_bpp > 24
takes care of the deep color mode scenario.

Separate patch for fixing switch from 12 bit to 10 bit deep color
mode.

Co-developed-by: Aditya Swarup <aditya.swarup@intel.com>
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com>
Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190429230811.9983-1-aditya.swarup@intel.com
drivers/gpu/drm/i915/intel_hdmi.c