Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: "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>
Cc: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
	"Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
Subject: Re: [PATCH] drm/xe/hdcp: Add check to remove hdcp2 compatibility
Date: Fri, 25 Oct 2024 08:04:57 -0700	[thread overview]
Message-ID: <906191eb-f17d-4a89-ac63-aec08fb1f66e@intel.com> (raw)
In-Reply-To: <SN7PR11MB67501BD53C3641C4BB1E9E58E34F2@SN7PR11MB6750.namprd11.prod.outlook.com>




On 10/24/2024 6:21 PM, Kandpal, Suraj wrote:
>
>> -----Original Message-----
>> From: Ceraolo Spurio, Daniele <daniele.ceraolospurio@intel.com>
>> Sent: Thursday, October 24, 2024 9:03 PM
>> To: Kandpal, Suraj <suraj.kandpal@intel.com>; intel-xe@lists.freedesktop.org;
>> intel-gfx@lists.freedesktop.org
>> Cc: Nautiyal, Ankit K <ankit.k.nautiyal@intel.com>; Ghimiray, Himal Prasad
>> <himal.prasad.ghimiray@intel.com>
>> Subject: Re: [PATCH] drm/xe/hdcp: Add check to remove hdcp2 compatibility
>>
>>
>>
>>
>> On 10/22/2024 12:29 AM, Suraj Kandpal wrote:
>>> Add check to remove HDCP2 compatibility from BMG as it does not have
>>> GSC which ends up causing warning when we try to get reference of GSC
>>> FW.
>>>
>>> Fixes: 89d030804831 ("drm/xe/hdcp: Fix condition for hdcp gsc cs
>>> requirement")
>>> Fixes: 883631771038 ("drm/i915/mtl: Add HDCP GSC interface")
>>> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
>>> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>>> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
>>> ---
>>>    drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 3 ++-
>>>    drivers/gpu/drm/xe/display/xe_hdcp_gsc.c      | 4 +++-
>>>    2 files changed, 5 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
>>> b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
>>> index 55965844d829..2c1d0ee8cec2 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
>>> +++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
>>> @@ -21,7 +21,8 @@ struct intel_hdcp_gsc_message {
>>>
>>>    bool intel_hdcp_gsc_cs_required(struct intel_display *display)
>>>    {
>>> -	return DISPLAY_VER(display) >= 14;
>>> +	return DISPLAY_VER(display) >= 14 &&
>>> +		DISPLAY_VER_FULL(display) != IP_VER(14, 1);
>>>    }
>>>
>>>    bool intel_hdcp_gsc_check_status(struct intel_display *display) diff
>>> --git a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
>>> b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
>>> index 231677129a35..efa3441c249c 100644
>>> --- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
>>> +++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
>>> @@ -8,6 +8,7 @@
>>>    #include <linux/delay.h>
>>>
>>>    #include "abi/gsc_command_header_abi.h"
>>> +#include "i915_drv.h"
>>>    #include "intel_hdcp_gsc.h"
>>>    #include "intel_hdcp_gsc_message.h"
>>>    #include "xe_bo.h"
>>> @@ -32,7 +33,8 @@ struct intel_hdcp_gsc_message {
>>>
>>>    bool intel_hdcp_gsc_cs_required(struct intel_display *display)
>>>    {
>>> -	return DISPLAY_VER(display) >= 14;
>>> +	return DISPLAY_VER(display) >= 14 &&
>>> +		DISPLAY_VER_FULL(display) != IP_VER(14, 1);
>> I don't think this is the correct check or the correct location. BMG does
>> require the GSC for HDCP, so intel_hdcp_gsc_cs_required() should still return
>> true; it's just that we've decided not to support GSC FW loading on the
>> platform, so we can't support HDCP2.x. Also note that the this might change
>> and/or it might apply to other platform in the future, so any check needs to
>> be done based on GSC support and not platform/display ID.
>>
>> IMO when intel_hdcp_gsc_cs_required() returns true, the caller should check
>> if the GSC FW is defined (or if the GSCCS is available) and if it is not return
>> that hdcp2 is not supported due to unmet prerequsites and fallback to 1.4
>> without printing any errors.
>>
> Here is the thing before this I thought that should have worked too but after hdcp_gsc_cs_required()
> We call intel_hdcp_gsc_check_status() which has the following check
>
> if (!gsc && !xe_uc_fw_is_enabled(&gsc->fw)) {

This check seems incorrect to me. Shouldn't it be an OR instead of an 
AND? It is an OR in the i915 code.

>                  drm_dbg_kms(&xe->drm,
>                              "GSC Components not ready for HDCP2.x\n");
>                  return false;
>   }
>
> And this should have returned from here but it does not it goes ahead and tries to get a xe_pm_runtime()
> Which causes it to shout out loud which is currently causing a lot of noise in CI

See comment above about possible issue. But even if that is not the bug, 
if this function should return and it is not then we should fix this, 
not hack the intel_hdcp_gsc_cs_required() function.

Daniele

>
> Regards,
> Suraj Kandpal
>
>> Daniele
>>
>>>    }
>>>
>>>    bool intel_hdcp_gsc_check_status(struct intel_display *display)


  reply	other threads:[~2024-10-25 15:05 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22  5:56 [PATCH] drm/xe/hdcp: Add check to remove hdcp2 compatibilty Suraj Kandpal
2024-10-22  6:02 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-22  6:02 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-22  6:03 ` ✓ CI.KUnit: success " Patchwork
2024-10-22  6:03 ` [PATCH] " Nautiyal, Ankit K
2024-10-22  6:08 ` ✗ CI.Build: failure for " Patchwork
2024-10-22  6:09 ` [PATCH] " Ghimiray, Himal Prasad
2024-10-22  6:26 ` Nilawar, Badal
2024-10-22  7:44   ` Jani Nikula
2024-10-22  8:26     ` Nilawar, Badal
2024-10-22  6:38 ` ✓ CI.Patch_applied: success for drm/xe/hdcp: Add check to remove hdcp2 compatibilty (rev2) Patchwork
2024-10-22  6:38 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-22  6:39 ` ✓ CI.KUnit: success " Patchwork
2024-10-22  6:44 ` ✗ CI.Build: failure " Patchwork
2024-10-22  7:29 ` [PATCH] drm/xe/hdcp: Add check to remove hdcp2 compatibility Suraj Kandpal
2024-10-22  7:46   ` Jani Nikula
2024-10-22  8:53     ` Kandpal, Suraj
2024-10-24  7:58       ` Jani Nikula
2024-10-22  8:22   ` Ghimiray, Himal Prasad
2024-10-23 19:45   ` Matt Roper
2024-10-24  2:42     ` Kandpal, Suraj
2024-10-24 15:33   ` Daniele Ceraolo Spurio
2024-10-25  1:21     ` Kandpal, Suraj
2024-10-25 15:04       ` Daniele Ceraolo Spurio [this message]
2024-10-25 15:59         ` Kandpal, Suraj
2024-10-25 16:08   ` [PATCH] drm/xe/hdcp: Fix gsc structure check in fw check status Suraj Kandpal
2024-10-25 16:12     ` Matt Roper
2024-10-28 12:03     ` Jani Nikula
2024-10-22  7:34 ` ✓ CI.Patch_applied: success for drm/xe/hdcp: Add check to remove hdcp2 compatibilty (rev3) Patchwork
2024-10-22  7:34 ` ✓ CI.checkpatch: " Patchwork
2024-10-22  7:35 ` ✓ CI.KUnit: " Patchwork
2024-10-22  7:47 ` ✓ CI.Build: " Patchwork
2024-10-22  7:49 ` ✓ CI.Hooks: " Patchwork
2024-10-22  7:51 ` ✗ CI.checksparse: warning " Patchwork
2024-10-22  8:16 ` ✓ CI.BAT: success " Patchwork
2024-10-22 11:12 ` ✗ CI.FULL: failure " Patchwork
2024-10-22 22:04 ` [PATCH] drm/xe/hdcp: Add check to remove hdcp2 compatibilty kernel test robot
2024-10-25 16:22 ` ✓ CI.Patch_applied: success for drm/xe/hdcp: Add check to remove hdcp2 compatibilty (rev4) Patchwork
2024-10-25 16:22 ` ✓ CI.checkpatch: " Patchwork
2024-10-25 16:23 ` ✓ CI.KUnit: " Patchwork
2024-10-25 16:35 ` ✓ CI.Build: " Patchwork
2024-10-25 16:37 ` ✓ CI.Hooks: " Patchwork
2024-10-25 16:39 ` ✓ CI.checksparse: " Patchwork
2024-10-25 17:02 ` ✓ CI.BAT: " Patchwork
2024-10-27  5:41 ` ✗ CI.FULL: failure " Patchwork
2024-10-28  4:19 ` ✓ CI.Patch_applied: success for drm/xe/hdcp: Add check to remove hdcp2 compatibilty (rev5) Patchwork
2024-10-28  4:19 ` ✓ CI.checkpatch: " Patchwork
2024-10-28  4:20 ` ✓ CI.KUnit: " Patchwork
2024-10-28  4:32 ` ✓ CI.Build: " Patchwork
2024-10-28  4:34 ` ✓ CI.Hooks: " Patchwork
2024-10-28  4:36 ` ✓ CI.checksparse: " Patchwork
2024-10-28  4:59 ` ✓ CI.BAT: " Patchwork
2024-10-28  5:53 ` ✗ CI.FULL: failure " Patchwork

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=906191eb-f17d-4a89-ac63-aec08fb1f66e@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=himal.prasad.ghimiray@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