All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>, harry.wentland@amd.com
Subject: [PATCH 4/5] drm/amd/display: Load srm before enabling HDCP
Date: Thu, 16 Jan 2020 15:29:44 -0500	[thread overview]
Message-ID: <20200116202945.21801-5-Bhawanpreet.Lakha@amd.com> (raw)
In-Reply-To: <20200116202945.21801-1-Bhawanpreet.Lakha@amd.com>

[Why]
we need to load SRM before we start HDCP. For S3 case the sysfs call will be
after we already enabled HDCP

[How]
Set srm before starting HDCP

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
index a191c84ad8eb..129696e997b6 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
@@ -136,6 +136,13 @@ void hdcp_update_display(struct hdcp_workqueue *hdcp_work,
 		hdcp_w->link.adjust.hdcp2.force_type = MOD_HDCP_FORCE_TYPE_0;
 
 		if (enable_encryption) {
+			/* Explicitly set the saved SRM as sysfs call will be after we already enabled hdcp
+			 * (s3 resume case)
+			 */
+			if (hdcp_work->srm_size > 0)
+				psp_set_srm(hdcp_work->hdcp.config.psp.handle, hdcp_work->srm, hdcp_work->srm_size,
+					    &hdcp_work->srm_version);
+
 			display->adjust.disable = 0;
 			if (content_type == DRM_MODE_HDCP_CONTENT_TYPE0)
 				hdcp_w->link.adjust.hdcp2.force_type = MOD_HDCP_FORCE_TYPE_0;
-- 
2.17.1

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

  parent reply	other threads:[~2020-01-16 20:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 20:29 [PATCH 0/5] HDCP SRM interface Bhawanpreet Lakha
2020-01-16 20:29 ` [PATCH 1/5] drm/amd/display: Pass amdgpu_device instead of psp_context Bhawanpreet Lakha
2020-01-16 20:29 ` [PATCH 2/5] drm/amd/display: update psp interface header Bhawanpreet Lakha
2020-01-22 16:10   ` Harry Wentland
2020-01-16 20:29 ` [PATCH 3/5] drm/amd/display: Add sysfs interface for set/get srm Bhawanpreet Lakha
2020-01-17 19:23   ` Alex Deucher
2020-01-17 19:29     ` Bhawanpreet Lakha
2020-01-22 19:03   ` Harry Wentland
2020-01-16 20:29 ` Bhawanpreet Lakha [this message]
2020-01-16 20:29 ` [PATCH 5/5] drm/amd/display: call psp set/get interfaces Bhawanpreet Lakha
2020-01-22 19:25   ` Harry Wentland
2020-01-22 16:11 ` [PATCH 0/5] HDCP SRM interface Harry Wentland
2020-01-22 16:23   ` Alex Deucher
2020-01-22 16:44     ` Bhawanpreet Lakha
2020-01-22 19:27       ` Harry Wentland
2020-01-22 19:49         ` Deucher, Alexander

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=20200116202945.21801-5-Bhawanpreet.Lakha@amd.com \
    --to=bhawanpreet.lakha@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    /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.