Re: [PATCH] drm/i915/display: Maintain alphabetical order for HAS_AS_SDP and HAS_CMRR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 13, 2025 at 10:08:30AM +0530, Nautiyal, Ankit K wrote:

On 3/12/2025 10:37 PM, Gustavo Sousa wrote:
Quoting Jani Nikula (2025-03-11 15:08:48-03:00)
On Tue, 11 Mar 2025, Ankit Nautiyal <ankit.k.nautiyal@xxxxxxxxx> wrote:
Reorder the macros HAS_AS_SDP and HAS_CMRR as per alphabetical order.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@xxxxxxxxx>
---
 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.

I do agree. I was assuming that we sort the words separated by '_' as delimiter.

For a given hypothetical list, I thought the ordering will result in similar items grouped together

(please forgive me for making up silly names here)

HAS_HD
HAS_HD_AUDIO
HAS_HD_DISPLAY
HAS_HD_SUPPORT
HAS_HDMI
HAS_HDMI_PCON
HAS_HDR

But with the `sort` command it will be:

HAS_HD
HAS_HDMI
HAS_HDMI_PCON
HAS_HDR
HAS_HD_AUDIO
HAS_HD_DISPLAY
HAS_HD_SUPPORT

However, if majority of folks use editor's sort command it becomes simpler to have the ASCII ordering for everyone.

we would need another command to do "the right thing", for whatever
definition of "right" we want.  Not sure if it's worth pursuing as the
sort is also used in other places like includes and build objects in
the Makefile. Would we change all of them?

Lucas De Marchi



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux