Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm: Fix HDCP failures when SRM fw is missing
@ 2020-04-14 18:48 Sean Paul
  2020-04-14 19:02 ` [Intel-gfx] [PATCH v2] " Sean Paul
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Sean Paul @ 2020-04-14 18:48 UTC (permalink / raw)
  To: dri-devel, ramalingam.c
  Cc: David Airlie, intel-gfx, Maxime Ripard, Sean Paul, stable,
	Thomas Zimmermann

From: Sean Paul <seanpaul@chromium.org>

The SRM cleanup in 79643fddd6eb2 ("drm/hdcp: optimizing the srm
handling") inadvertently altered the behavior of HDCP auth when
the SRM firmware is missing. Before that patch, missing SRM was
interpreted as the device having no revoked keys. With that patch,
if the SRM fw file is missing we reject _all_ keys.

This patch fixes that regression by returning success if the file
cannot be found.

Fixes: 79643fddd6eb ("drm/hdcp: optimizing the srm handling")
Cc: stable@vger.kernel.org
Cc: Ramalingam C <ramalingam.c@intel.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/drm_hdcp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_hdcp.c b/drivers/gpu/drm/drm_hdcp.c
index 7f386adcf872..3c36005d367b 100644
--- a/drivers/gpu/drm/drm_hdcp.c
+++ b/drivers/gpu/drm/drm_hdcp.c
@@ -241,8 +241,10 @@ static int drm_hdcp_request_srm(struct drm_device *drm_dev,
 
 	ret = request_firmware_direct(&fw, (const char *)fw_name,
 				      drm_dev->dev);
-	if (ret < 0)
+	if (ret < 0) {
+		ret = 0;
 		goto exit;
+	}
 
 	if (fw->size && fw->data)
 		ret = drm_hdcp_srm_update(fw->data, fw->size, revoked_ksv_list,
-- 
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-05-05 18:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-14 18:48 [Intel-gfx] [PATCH] drm: Fix HDCP failures when SRM fw is missing Sean Paul
2020-04-14 19:02 ` [Intel-gfx] [PATCH v2] " Sean Paul
2020-04-29 13:50   ` Ramalingam C
2020-04-29 13:58     ` Sean Paul
2020-04-29 14:22       ` Ramalingam C
2020-04-29 14:46         ` Sean Paul
2020-04-29 16:20           ` Ramalingam C
2020-05-05 18:02             ` Sean Paul
2020-04-15  1:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Fix HDCP failures when SRM fw is missing (rev2) Patchwork
2020-04-15  1:39 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2020-04-15  1:46 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox