From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Gustavo Sousa <gustavo.sousa@intel.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
<intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>,
<mitulkumar.ajitkumar.golani@intel.com>
Subject: Re: [PATCH] drm/i915/display: Maintain alphabetical order for HAS_AS_SDP and HAS_CMRR
Date: Thu, 13 Mar 2025 10:32:17 +0530 [thread overview]
Message-ID: <80c5e517-4355-4a2c-966f-f9b7ccff182f@intel.com> (raw)
In-Reply-To: <ktvzkpyjl5mf64bizabtr7cumt7qcm4ipe7vpwnyibwtqfoyxk@tuwfw32wl267>
On 3/13/2025 10:15 AM, Lucas De Marchi wrote:
> 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@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.
>>
>> 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?
You are right. I understand the importance of maintaining consistency.
With that in mind, have also sent updated patch:
https://patchwork.freedesktop.org/patch/642578/?series=146185&rev=1
Just to clarify, the example I provided was meant to show my thought
process rather than to define the right way to sort.
Thanks for your input and the tip for vim too.
Regards,
Ankit
>
> Lucas De Marchi
next prev parent reply other threads:[~2025-03-13 5:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 13:59 [PATCH] drm/i915/display: Maintain alphabetical order for HAS_AS_SDP and HAS_CMRR Ankit Nautiyal
2025-03-11 17:01 ` ✓ CI.Patch_applied: success for " Patchwork
2025-03-11 17:02 ` ✓ CI.checkpatch: " Patchwork
2025-03-11 17:03 ` ✓ CI.KUnit: " Patchwork
2025-03-11 17:19 ` ✓ CI.Build: " Patchwork
2025-03-11 17:21 ` ✓ CI.Hooks: " Patchwork
2025-03-11 17:23 ` ✓ CI.checksparse: " Patchwork
2025-03-11 17:45 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-11 18:08 ` [PATCH] " Jani Nikula
2025-03-12 4:30 ` Nautiyal, Ankit K
2025-03-12 11:25 ` Jani Nikula
2025-03-12 16:41 ` Lucas De Marchi
2025-03-12 17:07 ` Gustavo Sousa
2025-03-13 4:38 ` Nautiyal, Ankit K
2025-03-13 4:45 ` Lucas De Marchi
2025-03-13 5:02 ` Nautiyal, Ankit K [this message]
2025-03-13 8:44 ` Jani Nikula
2025-03-12 9:31 ` ✗ Xe.CI.Full: failure for " 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=80c5e517-4355-4a2c-966f-f9b7ccff182f@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=lucas.demarchi@intel.com \
--cc=mitulkumar.ajitkumar.golani@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