All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suraj Kandpal <suraj.kandpal@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: chaitanya.kumar.borah@intel.com, Suraj Kandpal <suraj.kandpal@intel.com>
Subject: [PATCH 2/2] drm/i915/hdcp: Fix get remote hdcp capability function
Date: Wed, 27 Mar 2024 10:14:23 +0530	[thread overview]
Message-ID: <20240327044422.240398-4-suraj.kandpal@intel.com> (raw)
In-Reply-To: <20240327044422.240398-2-suraj.kandpal@intel.com>

HDCP 1.x capability needs to be checked even if setup is not
HDCP 2.x capable.

Fixes: 813cca96e4ac ("drm/i915/hdcp: Add new remote capability check shim function")
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
index b98a87883fef..7f52043b0f9f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
@@ -688,7 +688,7 @@ int intel_dp_hdcp_get_remote_capability(struct intel_connector *connector,
 {
 	struct drm_i915_private *i915 = to_i915(connector->base.dev);
 	struct drm_dp_aux *aux = &connector->port->aux;
-	u8 bcaps;
+	u8 bcaps = 0;
 	int ret;
 
 	if (!intel_encoder_is_mst(connector->encoder))
@@ -696,15 +696,14 @@ int intel_dp_hdcp_get_remote_capability(struct intel_connector *connector,
 
 	ret =  _intel_dp_hdcp2_get_capability(aux, hdcp2_capable);
 	if (ret)
-		return ret;
+		drm_dbg_kms(&i915->drm,
+			    "HDCP2 DPCD capability read failed err: %d\n", ret);
 
 	ret = intel_dp_hdcp_read_bcaps(aux, i915, &bcaps);
-	if (ret)
-		return ret;
 
 	*hdcp_capable = bcaps & DP_BCAPS_HDCP_CAPABLE;
 
-	return 0;
+	return ret;
 }
 
 static const struct intel_hdcp_shim intel_dp_hdcp_shim = {
-- 
2.43.2


  parent reply	other threads:[~2024-03-27  4:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  4:44 [PATCH 0/2] Fix UBSAN warning in hdcp_info Suraj Kandpal
2024-03-27  4:44 ` [PATCH 1/2] drm/i915/display: Initialize capability variables Suraj Kandpal
2024-03-28 10:22   ` Borah, Chaitanya Kumar
2024-03-27  4:44 ` Suraj Kandpal [this message]
2024-03-28 10:26   ` [PATCH 2/2] drm/i915/hdcp: Fix get remote hdcp capability function Borah, Chaitanya Kumar
2024-03-28 10:51     ` Borah, Chaitanya Kumar
2024-03-27  5:52 ` ✗ Fi.CI.SPARSE: warning for Fix UBSAN warning in hdcp_info Patchwork
2024-03-27  6:05 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-04-01  3:01 [PATCH 0/2] " Suraj Kandpal
2024-04-01  3:01 ` [PATCH 2/2] drm/i915/hdcp: Fix get remote hdcp capability function Suraj Kandpal
2024-04-01  5:42   ` Borah, Chaitanya Kumar
2024-04-01  5:56   ` Suraj Kandpal
2024-04-01  9:50     ` Borah, Chaitanya Kumar
2024-04-01  9:25   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240327044422.240398-4-suraj.kandpal@intel.com \
    --to=suraj.kandpal@intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.