summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUma Shankar <uma.shankar@intel.com>2020-12-01 02:17:28 +0530
committerUma Shankar <uma.shankar@intel.com>2020-12-02 01:22:31 +0530
commit55b1f9ddf41d369f2d480596822c6d17817a8d78 (patch)
tree66f74157d768b569047f0e82e92c18b0f70eb786
parent9559c0d13b6b35abc2659bdd3024849d552e3c4e (diff)
drm/i915/display: Add a WARN for invalid output range and format
Add a WARN to rule out an invalid output range and format combination. This is to align the lspcon code with compute_avi_infoframes. Signed-off-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201130204738.2443-6-uma.shankar@intel.com
-rw-r--r--drivers/gpu/drm/i915/display/intel_lspcon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
index 7cb65e0f241e..9552dfc55e20 100644
--- a/drivers/gpu/drm/i915/display/intel_lspcon.c
+++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
@@ -523,6 +523,10 @@ void lspcon_set_infoframes(struct intel_encoder *encoder,
else
frame.avi.colorspace = HDMI_COLORSPACE_RGB;
+ /* nonsense combination */
+ drm_WARN_ON(encoder->base.dev, crtc_state->limited_color_range &&
+ crtc_state->output_format != INTEL_OUTPUT_FORMAT_RGB);
+
if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_RGB) {
drm_hdmi_avi_infoframe_quant_range(&frame.avi,
conn_state->connector,