From: Jani Nikula <jani.nikula@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
rodrigo.vivi@intel.com, ville.syrjala@linux.intel.com,
maarten.lankhorst@linux.intel.com
Subject: Re: [PATCH 4/6] drm/i915/display: add "display is" structure with platform members
Date: Thu, 27 Jun 2024 21:48:44 +0300 [thread overview]
Message-ID: <87ttheb4s3.fsf@intel.com> (raw)
In-Reply-To: <dkbhgldqn3maarg2j6sg3kvylrgh6vqtwzs3v2r6shmbga2vra@vybhd6y44xbb>
On Thu, 27 Jun 2024, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> On Tue, Jun 18, 2024 at 05:22:54PM GMT, Jani Nikula wrote:
>>Add a structure with a bitfield member for each platform and
>>subplatform, and initialize them in platform and subplatform descs.
>>
>>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>---
>> drivers/gpu/drm/i915/display/intel_display_device.c | 8 ++++++--
>> drivers/gpu/drm/i915/display/intel_display_device.h | 8 ++++++++
>> 2 files changed, 14 insertions(+), 2 deletions(-)
>>
>>diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
>>index 80563af7ac71..0c275d85bd30 100644
>>--- a/drivers/gpu/drm/i915/display/intel_display_device.c
>>+++ b/drivers/gpu/drm/i915/display/intel_display_device.c
>>@@ -21,6 +21,7 @@ __diag_push();
>> __diag_ignore_all("-Woverride-init", "Allow field initialization overrides for display info");
>>
>> struct subplatform_desc {
>>+ struct intel_display_is is;
>> enum intel_display_platform subplatform;
>> const char *name;
>> const u16 *pciidlist;
>>@@ -28,9 +29,11 @@ struct subplatform_desc {
>>
>> #define SUBPLATFORM(_platform, _subplatform) \
>> .subplatform = (INTEL_DISPLAY_##_platform##_##_subplatform), \
>>- .name = #_subplatform
>>+ .name = #_subplatform, \
>>+ .is._platform##_##_subplatform = 1
>>
>> struct platform_desc {
>>+ struct intel_display_is is;
>> enum intel_display_platform platform;
>> const char *name;
>> const struct subplatform_desc *subplatforms;
>>@@ -39,7 +42,8 @@ struct platform_desc {
>>
>> #define PLATFORM(_platform) \
>> .platform = (INTEL_DISPLAY_##_platform), \
>>- .name = #_platform
>>+ .name = #_platform, \
>>+ .is._platform = 1
>>
>> #define ID(id) (id)
>>
>>diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
>>index 50485235ef09..73070c8487ff 100644
>>--- a/drivers/gpu/drm/i915/display/intel_display_device.h
>>+++ b/drivers/gpu/drm/i915/display/intel_display_device.h
>>@@ -101,6 +101,14 @@ enum intel_display_platform {
>>
>> #undef ENUM
>>
>>+#define MEMBER(name) u32 name:1;
>>+
>>+struct intel_display_is {
>
> intel_display_is??? very odd to name something like this as a verb and
> that has no indication in the name what actually is about. Why is this
> not "_platform"?
Yeah, naming is hard.
I suppose I could rename it after the last patch which removes enum
intel_display_platform.
BR,
Jani.
>
> Lucas De Marchi
>
>>+ INTEL_DISPLAY_PLATFORMS(MEMBER);
>>+};
>>+
>>+#undef MEMBER
>>+
>> #define DEV_INFO_DISPLAY_FOR_EACH_FLAG(func) \
>> /* Keep in alphabetical order */ \
>> func(cursor_needs_physical); \
>>--
>>2.39.2
>>
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-06-27 18:49 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 14:22 [PATCH 0/6] drm/i915/display: platform identification with display->is.<PLATFORM> Jani Nikula
2024-06-18 14:22 ` [PATCH 1/6] drm/i915/display: use a macro to initialize subplatforms Jani Nikula
2024-06-19 18:29 ` Rodrigo Vivi
2024-06-18 14:22 ` [PATCH 2/6] drm/i915/display: use a macro to define platform enumerations Jani Nikula
2024-06-19 18:29 ` Rodrigo Vivi
2024-06-18 14:22 ` [PATCH 3/6] drm/i915/display: join the platform and subplatform macros Jani Nikula
2024-06-19 18:30 ` Rodrigo Vivi
2024-06-18 14:22 ` [PATCH 4/6] drm/i915/display: add "display is" structure with platform members Jani Nikula
2024-06-19 18:30 ` Rodrigo Vivi
2024-06-27 17:04 ` Lucas De Marchi
2024-06-27 18:48 ` Jani Nikula [this message]
2024-06-18 14:22 ` [PATCH 5/6] drm/i915/display: add "is" member to struct intel_display Jani Nikula
2024-06-19 18:36 ` Rodrigo Vivi
2024-06-20 13:05 ` Jani Nikula
2024-06-20 16:09 ` Rodrigo Vivi
2024-06-27 17:06 ` Lucas De Marchi
2024-06-27 18:47 ` Jani Nikula
2024-06-27 21:45 ` Lucas De Marchi
2024-06-27 22:19 ` Jani Nikula
2024-06-18 14:22 ` [PATCH 6/6] drm/i915/display: remove the display platform enum as unnecessary Jani Nikula
2024-06-19 18:30 ` Rodrigo Vivi
2024-06-18 14:51 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: platform identification with display->is.<PLATFORM> Patchwork
2024-06-18 14:51 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-06-18 15:00 ` ✓ Fi.CI.BAT: success " Patchwork
2024-06-18 23:47 ` ✗ Fi.CI.IGT: failure " 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=87ttheb4s3.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=ville.syrjala@linux.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;
as well as URLs for NNTP newsgroup(s).