Commit 4c0119dd authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915: Reject YCbCr output with degamma+gamma on pre-icl



Since the pipe CSC sits between the degamma and gamma LUTs there
is no way to make us it for RGB->YCbCr conversion when both LUTs
are also active. Simply reject such combos.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-10-ville.syrjala@linux.intel.com


Reviewed-by: default avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
parent 6d5e733f
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -1556,7 +1556,14 @@ static int ivb_color_check(struct intel_crtc_state *crtc_state)
	if (crtc_state->output_format != INTEL_OUTPUT_FORMAT_RGB &&
	    crtc_state->hw.ctm) {
		drm_dbg_kms(&i915->drm,
			    "YCBCR and CTM together are not possible\n");
			    "YCbCr and CTM together are not possible\n");
		return -EINVAL;
	}

	if (crtc_state->output_format != INTEL_OUTPUT_FORMAT_RGB &&
	    crtc_state->hw.degamma_lut && crtc_state->hw.gamma_lut) {
		drm_dbg_kms(&i915->drm,
			    "YCbCr and degamma+gamma together are not possible\n");
		return -EINVAL;
	}

@@ -1622,7 +1629,14 @@ static int glk_color_check(struct intel_crtc_state *crtc_state)
	if (crtc_state->output_format != INTEL_OUTPUT_FORMAT_RGB &&
	    crtc_state->hw.ctm) {
		drm_dbg_kms(&i915->drm,
			    "YCBCR and CTM together are not possible\n");
			    "YCbCr and CTM together are not possible\n");
		return -EINVAL;
	}

	if (crtc_state->output_format != INTEL_OUTPUT_FORMAT_RGB &&
	    crtc_state->hw.degamma_lut && crtc_state->hw.gamma_lut) {
		drm_dbg_kms(&i915->drm,
			    "YCbCr and degamma+gamma together are not possible\n");
		return -EINVAL;
	}