diff mbox series

[11/42] drm/xe/lnl: Add IS_LUNARLAKE

Message ID 20230823170740.1180212-12-lucas.demarchi@intel.com (mailing list archive)
State New, archived
Headers show
Series Enable Lunar Lake display | expand

Commit Message

Lucas De Marchi Aug. 23, 2023, 5:07 p.m. UTC
From: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>

Add IS_LUNARLAKE in the compat-i915-headers. That macro, to be used by
the xe driver, checks for the platform, whereas the macro on the i915
side is always false.

Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
---
 drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Matt Roper Aug. 23, 2023, 5:55 p.m. UTC | #1
On Wed, Aug 23, 2023 at 10:07:09AM -0700, Lucas De Marchi wrote:
> From: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> 
> Add IS_LUNARLAKE in the compat-i915-headers. That macro, to be used by
> the xe driver, checks for the platform, whereas the macro on the i915
> side is always false.

Stepping back, do we really need this macro?  Most display code should
be matching on the display IP rather than the platform going forward.
Looking at this series, I only see this used for fake PCH and GMBUS,
both of which I think could probably be checking the display IP rather
than the platform.


Matt

> 
> Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> ---
>  drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> index d64d34181790..38b64ff6b9ea 100644
> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> @@ -79,6 +79,7 @@ static inline struct drm_i915_private *kdev_to_i915(struct device *kdev)
>  #define IS_DG2(dev_priv)	IS_PLATFORM(dev_priv, XE_DG2)
>  #define IS_PONTEVECCHIO(dev_priv) IS_PLATFORM(dev_priv, XE_PVC)
>  #define IS_METEORLAKE(dev_priv) IS_PLATFORM(dev_priv, XE_METEORLAKE)
> +#define IS_LUNARLAKE(dev_priv) IS_PLATFORM(dev_priv, XE_LUNARLAKE)
>  
>  #define IS_HSW_ULT(dev_priv) (dev_priv && 0)
>  #define IS_BDW_ULT(dev_priv) (dev_priv && 0)
> -- 
> 2.40.1
>
Lucas De Marchi Aug. 24, 2023, 3:32 p.m. UTC | #2
On Wed, Aug 23, 2023 at 10:55:34AM -0700, Matt Roper wrote:
>On Wed, Aug 23, 2023 at 10:07:09AM -0700, Lucas De Marchi wrote:
>> From: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
>>
>> Add IS_LUNARLAKE in the compat-i915-headers. That macro, to be used by
>> the xe driver, checks for the platform, whereas the macro on the i915
>> side is always false.
>
>Stepping back, do we really need this macro?  Most display code should
>be matching on the display IP rather than the platform going forward.
>Looking at this series, I only see this used for fake PCH and GMBUS,
>both of which I think could probably be checking the display IP rather
>than the platform.

I tweaked a few patches to check IP rather than platform and reworded
the commit messages. But there are still a few patches needing that. If
we move them all and make sure we will not need, then I can drop this
patch.  I will take a look for next iteration

thanks
Lucas De Marchi

>
>
>Matt
>
>>
>> Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
>> ---
>>  drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>> index d64d34181790..38b64ff6b9ea 100644
>> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>> +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>> @@ -79,6 +79,7 @@ static inline struct drm_i915_private *kdev_to_i915(struct device *kdev)
>>  #define IS_DG2(dev_priv)	IS_PLATFORM(dev_priv, XE_DG2)
>>  #define IS_PONTEVECCHIO(dev_priv) IS_PLATFORM(dev_priv, XE_PVC)
>>  #define IS_METEORLAKE(dev_priv) IS_PLATFORM(dev_priv, XE_METEORLAKE)
>> +#define IS_LUNARLAKE(dev_priv) IS_PLATFORM(dev_priv, XE_LUNARLAKE)
>>
>>  #define IS_HSW_ULT(dev_priv) (dev_priv && 0)
>>  #define IS_BDW_ULT(dev_priv) (dev_priv && 0)
>> --
>> 2.40.1
>>
>
>-- 
>Matt Roper
>Graphics Software Engineer
>Linux GPU Platform Enablement
>Intel Corporation
diff mbox series

Patch

diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
index d64d34181790..38b64ff6b9ea 100644
--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
+++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
@@ -79,6 +79,7 @@  static inline struct drm_i915_private *kdev_to_i915(struct device *kdev)
 #define IS_DG2(dev_priv)	IS_PLATFORM(dev_priv, XE_DG2)
 #define IS_PONTEVECCHIO(dev_priv) IS_PLATFORM(dev_priv, XE_PVC)
 #define IS_METEORLAKE(dev_priv) IS_PLATFORM(dev_priv, XE_METEORLAKE)
+#define IS_LUNARLAKE(dev_priv) IS_PLATFORM(dev_priv, XE_LUNARLAKE)
 
 #define IS_HSW_ULT(dev_priv) (dev_priv && 0)
 #define IS_BDW_ULT(dev_priv) (dev_priv && 0)