From b79a6a548c1eb4f8d66fcc7977c7ce33b6dfed9b Mon Sep 17 00:00:00 2001 From: Ahung Cheng Date: Tue, 14 Jan 2020 17:59:43 +0800 Subject: drivers: video: tegra: fix AVI RGB quantization The HDMI 2.0 Specification (section 7.3) recommends that the AVI Q field is always set to either Limited or Full regardless of the EDID QS bit. Remove the default value (Q=0) as well as the checking for QS bit. Bug 2805930 Change-Id: Id757e546583336c8dd48aca169a5e1feca864563 Signed-off-by: Ahung Cheng (cherry picked from commit f64c72c28c31f671199feb429e7770c177b48058) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2318701 Reviewed-by: automaticguardword Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Prafull Suryawanshi Reviewed-by: Naveen Kumar S Reviewed-by: Bibek Basu Reviewed-by: Ujwal Patel Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/video/tegra/dc/hdmi2.0.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/video/tegra/dc/hdmi2.0.c b/drivers/video/tegra/dc/hdmi2.0.c index 5863e5996..dc7be64c0 100644 --- a/drivers/video/tegra/dc/hdmi2.0.c +++ b/drivers/video/tegra/dc/hdmi2.0.c @@ -1,7 +1,7 @@ /* * hdmi2.0.c: hdmi2.0 driver. * - * Copyright (c) 2014-2019, NVIDIA CORPORATION, All rights reserved. + * Copyright (c) 2014-2020, NVIDIA CORPORATION, All rights reserved. * Author: Animesh Kishore * * This software is licensed under the terms of the GNU General Public @@ -2070,7 +2070,6 @@ static u32 tegra_hdmi_get_ex_colorimetry(struct tegra_hdmi *hdmi) static u32 tegra_hdmi_get_rgb_quant(struct tegra_hdmi *hdmi) { u32 vmode = hdmi->dc->mode.vmode; - u32 hdmi_quant = HDMI_AVI_RGB_QUANT_DEFAULT; /* * For seamless HDMI, read Q0/Q1 from bootloader @@ -2095,14 +2094,8 @@ static u32 tegra_hdmi_get_rgb_quant(struct tegra_hdmi *hdmi) } } - dev_info(&hdmi->dc->ndev->dev, "hdmi: get RGB quant from EDID.\n"); - if (tegra_edid_is_rgb_quantization_selectable(hdmi->edid)) { - if (vmode & FB_VMODE_LIMITED_RANGE) - hdmi_quant = HDMI_AVI_RGB_QUANT_LIMITED; - else - hdmi_quant = HDMI_AVI_RGB_QUANT_FULL; - } - return hdmi_quant; + return (vmode & FB_VMODE_LIMITED_RANGE) ? HDMI_AVI_RGB_QUANT_LIMITED : + HDMI_AVI_RGB_QUANT_FULL; } static u32 tegra_hdmi_get_ycc_quant(struct tegra_hdmi *hdmi) -- cgit v1.2.2