diff mbox series

drm/i915/display: Maintain alphabetical order for HAS_AS_SDP and HAS_CMRR

Message ID 20250311135925.1523852-1-ankit.k.nautiyal@intel.com (mailing list archive)
State New
Headers show
Series drm/i915/display: Maintain alphabetical order for HAS_AS_SDP and HAS_CMRR | expand

Commit Message

Ankit Nautiyal March 11, 2025, 1:59 p.m. UTC
Reorder the macros HAS_AS_SDP and HAS_CMRR as per alphabetical order.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_device.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jani Nikula March 11, 2025, 6:08 p.m. UTC | #1
On Tue, 11 Mar 2025, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
> Reorder the macros HAS_AS_SDP and HAS_CMRR as per alphabetical order.
>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_device.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
> index 717286981687..332647c4ca81 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> @@ -142,10 +142,12 @@ struct intel_display_platforms {
>  	func(supports_tv);
>  
>  #define HAS_4TILE(__display)		((__display)->platform.dg2 || DISPLAY_VER(__display) >= 14)
> +#define HAS_AS_SDP(__display)		(DISPLAY_VER(__display) >= 13)
>  #define HAS_ASYNC_FLIPS(__display)	(DISPLAY_VER(__display) >= 5)

Y comes before _ in asciibetical order.

BR,
Jani.

>  #define HAS_BIGJOINER(__display)	(DISPLAY_VER(__display) >= 11 && HAS_DSC(__display))
>  #define HAS_CDCLK_CRAWL(__display)	(DISPLAY_INFO(__display)->has_cdclk_crawl)
>  #define HAS_CDCLK_SQUASH(__display)	(DISPLAY_INFO(__display)->has_cdclk_squash)
> +#define HAS_CMRR(__display)		(DISPLAY_VER(__display) >= 20)
>  #define HAS_CMTG(__display)		(!(__display)->platform.dg2 && DISPLAY_VER(__display) >= 13)
>  #define HAS_CUR_FBC(__display)		(!HAS_GMCH(__display) && IS_DISPLAY_VER(__display, 7, 13))
>  #define HAS_D12_PLANE_MINIMIZATION(__display)	((__display)->platform.rocketlake || (__display)->platform.alderlake_s)
> @@ -189,8 +191,6 @@ struct intel_display_platforms {
>  					  ((__display)->platform.dgfx && DISPLAY_VER(__display) == 14)) && \
>  					 HAS_DSC(__display))
>  #define HAS_VRR(__display)		(DISPLAY_VER(__display) >= 11)
> -#define HAS_AS_SDP(__display)		(DISPLAY_VER(__display) >= 13)
> -#define HAS_CMRR(__display)		(DISPLAY_VER(__display) >= 20)
>  #define INTEL_NUM_PIPES(__display)	(hweight8(DISPLAY_RUNTIME_INFO(__display)->pipe_mask))
>  #define I915_HAS_HOTPLUG(__display)	(DISPLAY_INFO(__display)->has_hotplug)
>  #define OVERLAY_NEEDS_PHYSICAL(__display)	(DISPLAY_INFO(__display)->overlay_needs_physical)
Ankit Nautiyal March 12, 2025, 4:30 a.m. UTC | #2
On 3/11/2025 11:38 PM, Jani Nikula wrote:
> On Tue, 11 Mar 2025, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
>> Reorder the macros HAS_AS_SDP and HAS_CMRR as per alphabetical order.
>>
>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>> ---
>>   drivers/gpu/drm/i915/display/intel_display_device.h | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
>> index 717286981687..332647c4ca81 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
>> @@ -142,10 +142,12 @@ struct intel_display_platforms {
>>   	func(supports_tv);
>>   
>>   #define HAS_4TILE(__display)		((__display)->platform.dg2 || DISPLAY_VER(__display) >= 14)
>> +#define HAS_AS_SDP(__display)		(DISPLAY_VER(__display) >= 13)
>>   #define HAS_ASYNC_FLIPS(__display)	(DISPLAY_VER(__display) >= 5)
> Y comes before _ in asciibetical order.

Thanks for pointing this out. I had a misconception that we use _ as 
delimiter and sort the words in alphabetical order.

Will correct this as per asciibetical order.

Also will change :

HAS_DP_MST
HAS_DP20
HAS_DPT

to:

HAS_DP20
HAS_DPT
HAS_DP_MST

Regards,

Ankit

>
> BR,
> Jani.
>
>>   #define HAS_BIGJOINER(__display)	(DISPLAY_VER(__display) >= 11 && HAS_DSC(__display))
>>   #define HAS_CDCLK_CRAWL(__display)	(DISPLAY_INFO(__display)->has_cdclk_crawl)
>>   #define HAS_CDCLK_SQUASH(__display)	(DISPLAY_INFO(__display)->has_cdclk_squash)
>> +#define HAS_CMRR(__display)		(DISPLAY_VER(__display) >= 20)
>>   #define HAS_CMTG(__display)		(!(__display)->platform.dg2 && DISPLAY_VER(__display) >= 13)
>>   #define HAS_CUR_FBC(__display)		(!HAS_GMCH(__display) && IS_DISPLAY_VER(__display, 7, 13))
>>   #define HAS_D12_PLANE_MINIMIZATION(__display)	((__display)->platform.rocketlake || (__display)->platform.alderlake_s)
>> @@ -189,8 +191,6 @@ struct intel_display_platforms {
>>   					  ((__display)->platform.dgfx && DISPLAY_VER(__display) == 14)) && \
>>   					 HAS_DSC(__display))
>>   #define HAS_VRR(__display)		(DISPLAY_VER(__display) >= 11)
>> -#define HAS_AS_SDP(__display)		(DISPLAY_VER(__display) >= 13)
>> -#define HAS_CMRR(__display)		(DISPLAY_VER(__display) >= 20)
>>   #define INTEL_NUM_PIPES(__display)	(hweight8(DISPLAY_RUNTIME_INFO(__display)->pipe_mask))
>>   #define I915_HAS_HOTPLUG(__display)	(DISPLAY_INFO(__display)->has_hotplug)
>>   #define OVERLAY_NEEDS_PHYSICAL(__display)	(DISPLAY_INFO(__display)->overlay_needs_physical)
Jani Nikula March 12, 2025, 11:25 a.m. UTC | #3
On Wed, 12 Mar 2025, "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com> wrote:
> On 3/11/2025 11:38 PM, Jani Nikula wrote:
>> On Tue, 11 Mar 2025, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
>>> Reorder the macros HAS_AS_SDP and HAS_CMRR as per alphabetical order.
>>>
>>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>>> ---
>>>   drivers/gpu/drm/i915/display/intel_display_device.h | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
>>> index 717286981687..332647c4ca81 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
>>> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
>>> @@ -142,10 +142,12 @@ struct intel_display_platforms {
>>>   	func(supports_tv);
>>>   
>>>   #define HAS_4TILE(__display)		((__display)->platform.dg2 || DISPLAY_VER(__display) >= 14)
>>> +#define HAS_AS_SDP(__display)		(DISPLAY_VER(__display) >= 13)
>>>   #define HAS_ASYNC_FLIPS(__display)	(DISPLAY_VER(__display) >= 5)
>> Y comes before _ in asciibetical order.
>
> Thanks for pointing this out. I had a misconception that we use _ as 
> delimiter and sort the words in alphabetical order.

Emacs M-x sort-lines is the definition for me. ;)

BR,
Jani.


>
> Will correct this as per asciibetical order.
>
> Also will change :
>
> HAS_DP_MST
> HAS_DP20
> HAS_DPT
>
> to:
>
> HAS_DP20
> HAS_DPT
> HAS_DP_MST
>
> Regards,
>
> Ankit
>
>>
>> BR,
>> Jani.
>>
>>>   #define HAS_BIGJOINER(__display)	(DISPLAY_VER(__display) >= 11 && HAS_DSC(__display))
>>>   #define HAS_CDCLK_CRAWL(__display)	(DISPLAY_INFO(__display)->has_cdclk_crawl)
>>>   #define HAS_CDCLK_SQUASH(__display)	(DISPLAY_INFO(__display)->has_cdclk_squash)
>>> +#define HAS_CMRR(__display)		(DISPLAY_VER(__display) >= 20)
>>>   #define HAS_CMTG(__display)		(!(__display)->platform.dg2 && DISPLAY_VER(__display) >= 13)
>>>   #define HAS_CUR_FBC(__display)		(!HAS_GMCH(__display) && IS_DISPLAY_VER(__display, 7, 13))
>>>   #define HAS_D12_PLANE_MINIMIZATION(__display)	((__display)->platform.rocketlake || (__display)->platform.alderlake_s)
>>> @@ -189,8 +191,6 @@ struct intel_display_platforms {
>>>   					  ((__display)->platform.dgfx && DISPLAY_VER(__display) == 14)) && \
>>>   					 HAS_DSC(__display))
>>>   #define HAS_VRR(__display)		(DISPLAY_VER(__display) >= 11)
>>> -#define HAS_AS_SDP(__display)		(DISPLAY_VER(__display) >= 13)
>>> -#define HAS_CMRR(__display)		(DISPLAY_VER(__display) >= 20)
>>>   #define INTEL_NUM_PIPES(__display)	(hweight8(DISPLAY_RUNTIME_INFO(__display)->pipe_mask))
>>>   #define I915_HAS_HOTPLUG(__display)	(DISPLAY_INFO(__display)->has_hotplug)
>>>   #define OVERLAY_NEEDS_PHYSICAL(__display)	(DISPLAY_INFO(__display)->overlay_needs_physical)
Lucas De Marchi March 12, 2025, 4:41 p.m. UTC | #4
On Wed, Mar 12, 2025 at 01:25:28PM +0200, Jani Nikula wrote:
>On Wed, 12 Mar 2025, "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com> wrote:
>> On 3/11/2025 11:38 PM, Jani Nikula wrote:
>>> On Tue, 11 Mar 2025, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
>>>> Reorder the macros HAS_AS_SDP and HAS_CMRR as per alphabetical order.
>>>>
>>>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>>>> ---
>>>>   drivers/gpu/drm/i915/display/intel_display_device.h | 4 ++--
>>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
>>>> index 717286981687..332647c4ca81 100644
>>>> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
>>>> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
>>>> @@ -142,10 +142,12 @@ struct intel_display_platforms {
>>>>   	func(supports_tv);
>>>>
>>>>   #define HAS_4TILE(__display)		((__display)->platform.dg2 || DISPLAY_VER(__display) >= 14)
>>>> +#define HAS_AS_SDP(__display)		(DISPLAY_VER(__display) >= 13)
>>>>   #define HAS_ASYNC_FLIPS(__display)	(DISPLAY_VER(__display) >= 5)
>>> Y comes before _ in asciibetical order.
>>
>> Thanks for pointing this out. I had a misconception that we use _ as
>> delimiter and sort the words in alphabetical order.
>
>Emacs M-x sort-lines is the definition for me. ;)

`LANG=C sort -u` and it works in vim and anywhere else :).  -u because
we also don't want duplicate lines.

Lucas De Marchi
Gustavo Sousa March 12, 2025, 5:07 p.m. UTC | #5
Quoting Jani Nikula (2025-03-11 15:08:48-03:00)
>On Tue, 11 Mar 2025, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
>> Reorder the macros HAS_AS_SDP and HAS_CMRR as per alphabetical order.
>>
>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_display_device.h | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
>> index 717286981687..332647c4ca81 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
>> @@ -142,10 +142,12 @@ struct intel_display_platforms {
>>          func(supports_tv);
>>  
>>  #define HAS_4TILE(__display)                ((__display)->platform.dg2 || DISPLAY_VER(__display) >= 14)
>> +#define HAS_AS_SDP(__display)                (DISPLAY_VER(__display) >= 13)
>>  #define HAS_ASYNC_FLIPS(__display)        (DISPLAY_VER(__display) >= 5)
>
>Y comes before _ in asciibetical order.

Maybe that's just me, but I feel that's counter-intuitive in a context
where we use _ to separate words.

--
Gustavo Sousa

>
>BR,
>Jani.
>
>>  #define HAS_BIGJOINER(__display)        (DISPLAY_VER(__display) >= 11 && HAS_DSC(__display))
>>  #define HAS_CDCLK_CRAWL(__display)        (DISPLAY_INFO(__display)->has_cdclk_crawl)
>>  #define HAS_CDCLK_SQUASH(__display)        (DISPLAY_INFO(__display)->has_cdclk_squash)
>> +#define HAS_CMRR(__display)                (DISPLAY_VER(__display) >= 20)
>>  #define HAS_CMTG(__display)                (!(__display)->platform.dg2 && DISPLAY_VER(__display) >= 13)
>>  #define HAS_CUR_FBC(__display)                (!HAS_GMCH(__display) && IS_DISPLAY_VER(__display, 7, 13))
>>  #define HAS_D12_PLANE_MINIMIZATION(__display)        ((__display)->platform.rocketlake || (__display)->platform.alderlake_s)
>> @@ -189,8 +191,6 @@ struct intel_display_platforms {
>>                                            ((__display)->platform.dgfx && DISPLAY_VER(__display) == 14)) && \
>>                                           HAS_DSC(__display))
>>  #define HAS_VRR(__display)                (DISPLAY_VER(__display) >= 11)
>> -#define HAS_AS_SDP(__display)                (DISPLAY_VER(__display) >= 13)
>> -#define HAS_CMRR(__display)                (DISPLAY_VER(__display) >= 20)
>>  #define INTEL_NUM_PIPES(__display)        (hweight8(DISPLAY_RUNTIME_INFO(__display)->pipe_mask))
>>  #define I915_HAS_HOTPLUG(__display)        (DISPLAY_INFO(__display)->has_hotplug)
>>  #define OVERLAY_NEEDS_PHYSICAL(__display)        (DISPLAY_INFO(__display)->overlay_needs_physical)
>
>-- 
>Jani Nikula, Intel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
index 717286981687..332647c4ca81 100644
--- a/drivers/gpu/drm/i915/display/intel_display_device.h
+++ b/drivers/gpu/drm/i915/display/intel_display_device.h
@@ -142,10 +142,12 @@  struct intel_display_platforms {
 	func(supports_tv);
 
 #define HAS_4TILE(__display)		((__display)->platform.dg2 || DISPLAY_VER(__display) >= 14)
+#define HAS_AS_SDP(__display)		(DISPLAY_VER(__display) >= 13)
 #define HAS_ASYNC_FLIPS(__display)	(DISPLAY_VER(__display) >= 5)
 #define HAS_BIGJOINER(__display)	(DISPLAY_VER(__display) >= 11 && HAS_DSC(__display))
 #define HAS_CDCLK_CRAWL(__display)	(DISPLAY_INFO(__display)->has_cdclk_crawl)
 #define HAS_CDCLK_SQUASH(__display)	(DISPLAY_INFO(__display)->has_cdclk_squash)
+#define HAS_CMRR(__display)		(DISPLAY_VER(__display) >= 20)
 #define HAS_CMTG(__display)		(!(__display)->platform.dg2 && DISPLAY_VER(__display) >= 13)
 #define HAS_CUR_FBC(__display)		(!HAS_GMCH(__display) && IS_DISPLAY_VER(__display, 7, 13))
 #define HAS_D12_PLANE_MINIMIZATION(__display)	((__display)->platform.rocketlake || (__display)->platform.alderlake_s)
@@ -189,8 +191,6 @@  struct intel_display_platforms {
 					  ((__display)->platform.dgfx && DISPLAY_VER(__display) == 14)) && \
 					 HAS_DSC(__display))
 #define HAS_VRR(__display)		(DISPLAY_VER(__display) >= 11)
-#define HAS_AS_SDP(__display)		(DISPLAY_VER(__display) >= 13)
-#define HAS_CMRR(__display)		(DISPLAY_VER(__display) >= 20)
 #define INTEL_NUM_PIPES(__display)	(hweight8(DISPLAY_RUNTIME_INFO(__display)->pipe_mask))
 #define I915_HAS_HOTPLUG(__display)	(DISPLAY_INFO(__display)->has_hotplug)
 #define OVERLAY_NEEDS_PHYSICAL(__display)	(DISPLAY_INFO(__display)->overlay_needs_physical)