diff mbox series

[v4] drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color

Message ID 20190403060342.27306-1-aditya.swarup@intel.com (mailing list archive)
State New, archived
Headers show
Series [v4] drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color | expand

Commit Message

Aditya Swarup April 3, 2019, 6:03 a.m. UTC
From: Clinton Taylor <Clinton.A.Taylor@intel.com>

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.

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>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

kernel test robot April 3, 2019, 2 p.m. UTC | #1
Hi Aditya,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on next-20190403]
[cannot apply to v5.1-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Aditya-Swarup/drm-i915-icl-Set-GCP_COLOR_INDICATION-only-for-10-12-bit-deep-color/20190403-201049
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-8) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/i915/intel_hdmi.c: In function 'intel_hdmi_compute_gcp_infoframe':
>> drivers/gpu//drm/i915/intel_hdmi.c:970:6: error: expected ')' before 'crtc_state'
         crtc_state->pipe_bpp > 24)
         ^~~~~~~~~~

vim +970 drivers/gpu//drm/i915/intel_hdmi.c

   952	
   953	static void intel_hdmi_compute_gcp_infoframe(struct intel_encoder *encoder,
   954						     struct intel_crtc_state *crtc_state,
   955						     struct drm_connector_state *conn_state)
   956	{
   957		struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
   958	
   959		if (IS_G4X(dev_priv) || !crtc_state->has_infoframe)
   960			return;
   961	
   962		crtc_state->infoframes.enable |=
   963			intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GENERAL_CONTROL);
   964	
   965		/* Indicate color depth whenever the sink supports deep color
   966		 * Also, 8bpc + color depth indication is no longer supported
   967		 * for HSW+ platforms.
   968		 * */
   969		if (hdmi_sink_is_deep_color(conn_state)
 > 970		    crtc_state->pipe_bpp > 24)
   971			crtc_state->infoframes.gcp |= GCP_COLOR_INDICATION;
   972	
   973		/* Enable default_phase whenever the display mode is suitably aligned */
   974		if (gcp_default_phase_possible(crtc_state->pipe_bpp,
   975					       &crtc_state->base.adjusted_mode))
   976			crtc_state->infoframes.gcp |= GCP_DEFAULT_PHASE_ENABLE;
   977	}
   978	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 5ccb305a6e1c..4617cbdbc1fe 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -962,8 +962,12 @@  static void intel_hdmi_compute_gcp_infoframe(struct intel_encoder *encoder,
 	crtc_state->infoframes.enable |=
 		intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GENERAL_CONTROL);
 
-	/* Indicate color depth whenever the sink supports deep color */
-	if (hdmi_sink_is_deep_color(conn_state))
+	/* Indicate color depth whenever the sink supports deep color
+	 * Also, 8bpc + color depth indication is no longer supported
+	 * for HSW+ platforms.
+	 * */
+	if (hdmi_sink_is_deep_color(conn_state)
+	    crtc_state->pipe_bpp > 24)
 		crtc_state->infoframes.gcp |= GCP_COLOR_INDICATION;
 
 	/* Enable default_phase whenever the display mode is suitably aligned */