diff mbox series

drm/xe/hdcp: Add check to remove hdcp2 compatibilty

Message ID 20241022055655.1902-1-suraj.kandpal@intel.com (mailing list archive)
State New
Headers show
Series drm/xe/hdcp: Add check to remove hdcp2 compatibilty | expand

Commit Message

Kandpal, Suraj Oct. 22, 2024, 5:56 a.m. UTC
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.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 3 ++-
 drivers/gpu/drm/xe/display/xe_hdcp_gsc.c      | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Ankit Nautiyal Oct. 22, 2024, 6:03 a.m. UTC | #1
On 10/22/2024 11:26 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.
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>


> ---
>   drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 3 ++-
>   drivers/gpu/drm/xe/display/xe_hdcp_gsc.c      | 3 ++-
>   2 files changed, 4 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..e3c57f0b79c4 100644
> --- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
> +++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
> @@ -32,7 +32,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)
Ghimiray, Himal Prasad Oct. 22, 2024, 6:09 a.m. UTC | #2
On 22-10-2024 11:26, 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.

Add fixes.

> 
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 3 ++-
>   drivers/gpu/drm/xe/display/xe_hdcp_gsc.c      | 3 ++-
>   2 files changed, 4 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);
>   }


LGTM.
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>

>   
>   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..e3c57f0b79c4 100644
> --- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
> +++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
> @@ -32,7 +32,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)
Nilawar, Badal Oct. 22, 2024, 6:26 a.m. UTC | #3
-----Original Message-----
From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Suraj Kandpal
Sent: 22 October 2024 11:27
To: intel-xe@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
Cc: Kandpal, Suraj <suraj.kandpal@intel.com>
Subject: [PATCH] drm/xe/hdcp: Add check to remove hdcp2 compatibilty

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.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>

Could you please add fixes tag in commit message. 

Fixes: 89d030804831 ("drm/xe/hdcp: Fix condition for hdcp gsc cs requirement")
Fixes: 883631771038 ("drm/i915/mtl: Add HDCP GSC interface")

Regards,
Badal
---
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 3 ++-
 drivers/gpu/drm/xe/display/xe_hdcp_gsc.c      | 3 ++-
 2 files changed, 4 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..e3c57f0b79c4 100644
--- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
+++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
@@ -32,7 +32,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)
--
2.34.1
Jani Nikula Oct. 22, 2024, 7:44 a.m. UTC | #4
On Tue, 22 Oct 2024, "Nilawar, Badal" <badal.nilawar@intel.com> wrote:
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Suraj Kandpal
> Sent: 22 October 2024 11:27
> To: intel-xe@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> Cc: Kandpal, Suraj <suraj.kandpal@intel.com>
> Subject: [PATCH] drm/xe/hdcp: Add check to remove hdcp2 compatibilty
>
> 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.
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
>
> Could you please add fixes tag in commit message. 
>
> Fixes: 89d030804831 ("drm/xe/hdcp: Fix condition for hdcp gsc cs requirement")
> Fixes: 883631771038 ("drm/i915/mtl: Add HDCP GSC interface")
>
> Regards,
> Badal

Please quote your replies properly [1]. Your mail is really quite hard
to read [2].

BR,
Jani.

[1] https://subspace.kernel.org/etiquette.html#do-not-top-post-when-replying

[2] https://lore.kernel.org/all/BN9PR11MB5530247EFE733E0B4E16870AE54C2@BN9PR11MB5530.namprd11.prod.outlook.com/

> ---
>  drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 3 ++-
>  drivers/gpu/drm/xe/display/xe_hdcp_gsc.c      | 3 ++-
>  2 files changed, 4 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..e3c57f0b79c4 100644
> --- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
> +++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
> @@ -32,7 +32,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)
> --
> 2.34.1
>
Nilawar, Badal Oct. 22, 2024, 8:26 a.m. UTC | #5
On 22-10-2024 13:14, Jani Nikula wrote:
> On Tue, 22 Oct 2024, "Nilawar, Badal" <badal.nilawar@intel.com> wrote:
>> -----Original Message-----
>> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Suraj Kandpal
>> Sent: 22 October 2024 11:27
>> To: intel-xe@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
>> Cc: Kandpal, Suraj <suraj.kandpal@intel.com>
>> Subject: [PATCH] drm/xe/hdcp: Add check to remove hdcp2 compatibilty
>>
>> 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.
>>
>> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
>>
>> Could you please add fixes tag in commit message.
>>
>> Fixes: 89d030804831 ("drm/xe/hdcp: Fix condition for hdcp gsc cs requirement")
>> Fixes: 883631771038 ("drm/i915/mtl: Add HDCP GSC interface")
>>
>> Regards,
>> Badal
> 
> Please quote your replies properly [1]. Your mail is really quite hard
> to read [2].

I responded via Outlook because this email wasn't visible in 
Thunderbird. I hope my comments are understood.

Thanks,
Badal

> 
> BR,
> Jani.
> 
> [1] https://subspace.kernel.org/etiquette.html#do-not-top-post-when-replying
> 
> [2] https://lore.kernel.org/all/BN9PR11MB5530247EFE733E0B4E16870AE54C2@BN9PR11MB5530.namprd11.prod.outlook.com/
> 
>> ---
>>   drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 3 ++-
>>   drivers/gpu/drm/xe/display/xe_hdcp_gsc.c      | 3 ++-
>>   2 files changed, 4 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..e3c57f0b79c4 100644
>> --- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
>> +++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
>> @@ -32,7 +32,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)
>> --
>> 2.34.1
>>
>
kernel test robot Oct. 22, 2024, 10:04 p.m. UTC | #6
Hi Suraj,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on next-20241022]
[cannot apply to drm-xe/drm-xe-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.12-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Suraj-Kandpal/drm-xe-hdcp-Add-check-to-remove-hdcp2-compatibilty/20241022-135748
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
patch link:    https://lore.kernel.org/r/20241022055655.1902-1-suraj.kandpal%40intel.com
patch subject: [PATCH] drm/xe/hdcp: Add check to remove hdcp2 compatibilty
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20241023/202410230526.VIha5RQI-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241023/202410230526.VIha5RQI-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410230526.VIha5RQI-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/display/intel_display_core.h:20,
                    from drivers/gpu/drm/xe/xe_device_types.h:31,
                    from drivers/gpu/drm/xe/xe_vm_types.h:16,
                    from drivers/gpu/drm/xe/xe_bo.h:13,
                    from drivers/gpu/drm/xe/display/xe_hdcp_gsc.c:13:
   drivers/gpu/drm/xe/display/xe_hdcp_gsc.c: In function 'intel_hdcp_gsc_cs_required':
>> drivers/gpu/drm/i915/display/intel_display_device.h:199:33: error: implicit declaration of function 'IP_VER' [-Werror=implicit-function-declaration]
     199 | #define DISPLAY_VER_FULL(i915)  IP_VER(DISPLAY_RUNTIME_INFO(i915)->ip.ver, \
         |                                 ^~~~~~
   drivers/gpu/drm/xe/display/xe_hdcp_gsc.c:36:17: note: in expansion of macro 'DISPLAY_VER_FULL'
      36 |                 DISPLAY_VER_FULL(display) != IP_VER(14, 1);
         |                 ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for GET_FREE_REGION
   Depends on [n]: SPARSEMEM [=n]
   Selected by [m]:
   - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]


vim +/IP_VER +199 drivers/gpu/drm/i915/display/intel_display_device.h

5e72e75d30fcff Jani Nikula 2023-10-03  197  
5e72e75d30fcff Jani Nikula 2023-10-03  198  #define DISPLAY_VER(i915)	(DISPLAY_RUNTIME_INFO(i915)->ip.ver)
5e72e75d30fcff Jani Nikula 2023-10-03 @199  #define DISPLAY_VER_FULL(i915)	IP_VER(DISPLAY_RUNTIME_INFO(i915)->ip.ver, \
5e72e75d30fcff Jani Nikula 2023-10-03  200  				       DISPLAY_RUNTIME_INFO(i915)->ip.rel)
5e72e75d30fcff Jani Nikula 2023-10-03  201  #define IS_DISPLAY_VER(i915, from, until) \
5e72e75d30fcff Jani Nikula 2023-10-03  202  	(DISPLAY_VER(i915) >= (from) && DISPLAY_VER(i915) <= (until))
5e72e75d30fcff Jani Nikula 2023-10-03  203
diff mbox series

Patch

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..e3c57f0b79c4 100644
--- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
+++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
@@ -32,7 +32,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)