From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>,
"Kandpal, Suraj" <suraj.kandpal@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: RE: [PATCH] drm/i915/hdcp: Add the loop only for DP encoders
Date: Tue, 29 Oct 2024 12:54:02 +0200 [thread overview]
Message-ID: <87h68vnprp.fsf@intel.com> (raw)
In-Reply-To: <SJ1PR11MB6129CCEF0FD3585991A07693B94B2@SJ1PR11MB6129.namprd11.prod.outlook.com>
On Tue, 29 Oct 2024, "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com> wrote:
>> -----Original Message-----
>> From: Kandpal, Suraj <suraj.kandpal@intel.com>
>> Sent: Tuesday, October 29, 2024 2:23 PM
>> To: intel-xe@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
>> Cc: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>; Kandpal,
>> Suraj <suraj.kandpal@intel.com>
>> Subject: [PATCH] drm/i915/hdcp: Add the loop only for DP encoders
>>
>> Add the loop on the first read and write only for DP/DPMST encoders as this
>> issue is only observed here no need to burden other encoders with extra
>> retries.
>
> It would make the motivation of the patch clearer if we describe "this issue" here.
Ditto for "the loop".
>
>>
>> Fixes: 9d5a05f86d2f ("drm/i915/hdcp: Retry first read and writes to
>> downstream")
>> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
>> ---
>> drivers/gpu/drm/i915/display/intel_hdcp.c | 12 ++++++++++--
>> 1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c
>> b/drivers/gpu/drm/i915/display/intel_hdcp.c
>> index ed6aa87403e2..fcfb5a9f303a 100644
>> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
>> @@ -1503,6 +1503,8 @@ static int hdcp2_deauthenticate_port(struct
>> intel_connector *connector) static int
>> hdcp2_authentication_key_exchange(struct intel_connector *connector) {
>> struct intel_display *display = to_intel_display(connector);
>> + struct intel_digital_port *dig_port =
>> + intel_attached_dig_port(connector);
>> struct intel_hdcp *hdcp = &connector->hdcp;
>> union {
>> struct hdcp2_ake_init ake_init;
>> @@ -1513,12 +1515,18 @@ static int
>> hdcp2_authentication_key_exchange(struct intel_connector *connector)
>> } msgs;
>> const struct intel_hdcp_shim *shim = hdcp->shim;
>> size_t size;
>> - int ret, i;
>> + int ret, i, max_retries;
>>
>> /* Init for seq_num */
>> hdcp->seq_num_v = 0;
>> hdcp->seq_num_m = 0;
>>
>> + if (intel_encoder_is_dp(&dig_port->base) ||
>> + intel_encoder_is_mst(&dig_port->base))
>> + max_retries = 10;
>> + else
>> + max_retries = 1;
>> +
>> ret = hdcp2_prepare_ake_init(connector, &msgs.ake_init);
>> if (ret < 0)
>> return ret;
>> @@ -1536,7 +1544,7 @@ static int
>> hdcp2_authentication_key_exchange(struct intel_connector *connector)
>> * authentication. The values of 10 and delay of 50ms was decided
>> based
>> * on multiple trial and errors.
>> */
>
> Perhaps this comment can use an update too.
>
> Functionally LGTM.
>
> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
>
>> - for (i = 0; i < 10; i++) {
>> + for (i = 0; i < max_retries; i++) {
>> if (!intel_hdcp2_get_capability(connector)) {
>> msleep(50);
>> continue;
>> --
>> 2.34.1
>
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-10-29 10:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 8:53 [PATCH] drm/i915/hdcp: Add the loop only for DP encoders Suraj Kandpal
2024-10-29 8:58 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-29 8:59 ` ✓ CI.checkpatch: " Patchwork
2024-10-29 9:00 ` ✓ CI.KUnit: " Patchwork
2024-10-29 9:11 ` ✓ CI.Build: " Patchwork
2024-10-29 9:14 ` ✓ CI.Hooks: " Patchwork
2024-10-29 9:15 ` ✗ CI.checksparse: warning " Patchwork
2024-10-29 9:43 ` ✗ CI.BAT: failure " Patchwork
2024-10-29 10:47 ` [PATCH] " Borah, Chaitanya Kumar
2024-10-29 10:54 ` Jani Nikula [this message]
2024-10-29 10:47 ` ✗ CI.FULL: failure for " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-10-30 2:53 [PATCH] " Suraj Kandpal
2024-10-30 4:49 ` Borah, Chaitanya Kumar
2024-10-30 10:21 ` Jani Nikula
2024-10-30 10:28 ` Kandpal, Suraj
2024-10-30 10:28 ` Kandpal, Suraj
2024-10-30 10:31 ` Jani Nikula
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=87h68vnprp.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=chaitanya.kumar.borah@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=suraj.kandpal@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).