lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191016095757.4919-1-jian-hong@endlessm.com>
Date:   Wed, 16 Oct 2019 17:57:58 +0800
From:   Jian-Hong Pan <jian-hong@...lessm.com>
To:     Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Ville Syrjälä 
        <ville.syrjala@...ux.intel.com>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Ramalingam C <ramalingam.c@...el.com>,
        Uma Shankar <uma.shankar@...el.com>
Cc:     intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, linux@...lessm.com,
        Jian-Hong Pan <jian-hong@...lessm.com>
Subject: [PATCH] drm/i915/hdmi: enable resolution 3840x2160 for type 1 HDMI

Type 1 HDMI may be version 1.3 or upper, which supports higher max TMDS
clock for higher resolutions, like 3840x2160. This patch sets max TMDS
clock according to the chip, if the adapter is type 1 HDMI.

Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=112018
Fixes: b1ba124d8e95 ("drm/i915: Respect DP++ adaptor TMDS clock limit")
Signed-off-by: Jian-Hong Pan <jian-hong@...lessm.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index e02f0faecf02..74e4426ffcad 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -2454,6 +2454,7 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_hdmi *hdmi = intel_attached_hdmi(connector);
+	struct intel_encoder *encoder = &hdmi_to_dig_port(hdmi)->base;
 	enum port port = hdmi_to_dig_port(hdmi)->base.port;
 	struct i2c_adapter *adapter =
 		intel_gmbus_get_adapter(dev_priv, hdmi->ddc_bus);
@@ -2488,8 +2489,16 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 		return;
 
 	hdmi->dp_dual_mode.type = type;
-	hdmi->dp_dual_mode.max_tmds_clock =
-		drm_dp_dual_mode_max_tmds_clock(type, adapter);
+	/* Type 1 HDMI may be version 1.3 or upper, which supports higher max
+	 * TMDS clock for higher resolutions, like 3840x2160. So, set it
+	 * according to the chip, if the adapter is type 1 HDMI.
+	 */
+	if (type == DRM_DP_DUAL_MODE_TYPE1_HDMI)
+		hdmi->dp_dual_mode.max_tmds_clock =
+			intel_hdmi_source_max_tmds_clock(encoder);
+	else
+		hdmi->dp_dual_mode.max_tmds_clock =
+			drm_dp_dual_mode_max_tmds_clock(type, adapter);
 
 	DRM_DEBUG_KMS("DP dual mode adaptor (%s) detected (max TMDS clock: %d kHz)\n",
 		      drm_dp_get_dual_mode_type_name(type),
-- 
2.23.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ