From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>, <ville.syrjala@linux.intel.com>,
<maarten.lankhorst@linux.intel.com>, <lucas.demarchi@intel.com>
Subject: Re: [PATCH 1/6] drm/i915/display: use a macro to initialize subplatforms
Date: Wed, 19 Jun 2024 14:29:45 -0400 [thread overview]
Message-ID: <ZnMjmfcK8iDT28R9@intel.com> (raw)
In-Reply-To: <03025d8bbb5036abd4c670b052f20a273feac62f.1718719962.git.jani.nikula@intel.com>
On Tue, Jun 18, 2024 at 05:22:51PM +0300, Jani Nikula wrote:
> Make it easier to change the underlying structures by using a macro
> similar to PLATFORM() for initialization.
>
> The subplatform names in debug logs change slightly as they now reflect
> the enum rather than manually entered names. For example, RAPTORLAKE_S
> rather than RPL-S.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> .../drm/i915/display/intel_display_device.c | 44 ++++++++++---------
> 1 file changed, 24 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
> index dd7dce4b0e7a..d900c30907ac 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.c
> @@ -26,6 +26,10 @@ struct subplatform_desc {
> const u16 *pciidlist;
> };
>
> +#define SUBPLATFORM(_platform, _subplatform) \
> + .subplatform = (INTEL_DISPLAY_##_platform##_##_subplatform), \
> + .name = #_subplatform
> +
> struct platform_desc {
> enum intel_display_platform platform;
> const char *name;
> @@ -485,8 +489,8 @@ static const u16 hsw_ulx_ids[] = {
> static const struct platform_desc hsw_desc = {
> PLATFORM(HASWELL),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_HASWELL_ULT, "ULT", hsw_ult_ids },
> - { INTEL_DISPLAY_HASWELL_ULX, "ULX", hsw_ulx_ids },
> + { SUBPLATFORM(HASWELL, ULT), .pciidlist = hsw_ult_ids },
> + { SUBPLATFORM(HASWELL, ULX), .pciidlist = hsw_ulx_ids },
> {},
> },
> .info = &(const struct intel_display_device_info) {
> @@ -529,8 +533,8 @@ static const u16 bdw_ulx_ids[] = {
> static const struct platform_desc bdw_desc = {
> PLATFORM(BROADWELL),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_BROADWELL_ULT, "ULT", bdw_ult_ids },
> - { INTEL_DISPLAY_BROADWELL_ULX, "ULX", bdw_ulx_ids },
> + { SUBPLATFORM(BROADWELL, ULT), .pciidlist = bdw_ult_ids },
> + { SUBPLATFORM(BROADWELL, ULX), .pciidlist = bdw_ulx_ids },
> {},
> },
> .info = &(const struct intel_display_device_info) {
> @@ -613,8 +617,8 @@ static const u16 skl_ulx_ids[] = {
> static const struct platform_desc skl_desc = {
> PLATFORM(SKYLAKE),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_SKYLAKE_ULT, "ULT", skl_ult_ids },
> - { INTEL_DISPLAY_SKYLAKE_ULX, "ULX", skl_ulx_ids },
> + { SUBPLATFORM(SKYLAKE, ULT), .pciidlist = skl_ult_ids },
> + { SUBPLATFORM(SKYLAKE, ULX), .pciidlist = skl_ulx_ids },
> {},
> },
> .info = &skl_display,
> @@ -637,8 +641,8 @@ static const u16 kbl_ulx_ids[] = {
> static const struct platform_desc kbl_desc = {
> PLATFORM(KABYLAKE),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_KABYLAKE_ULT, "ULT", kbl_ult_ids },
> - { INTEL_DISPLAY_KABYLAKE_ULX, "ULX", kbl_ulx_ids },
> + { SUBPLATFORM(KABYLAKE, ULT), .pciidlist = kbl_ult_ids },
> + { SUBPLATFORM(KABYLAKE, ULX), .pciidlist = kbl_ulx_ids },
> {},
> },
> .info = &skl_display,
> @@ -661,8 +665,8 @@ static const u16 cfl_ulx_ids[] = {
> static const struct platform_desc cfl_desc = {
> PLATFORM(COFFEELAKE),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_COFFEELAKE_ULT, "ULT", cfl_ult_ids },
> - { INTEL_DISPLAY_COFFEELAKE_ULX, "ULX", cfl_ulx_ids },
> + { SUBPLATFORM(COFFEELAKE, ULT), .pciidlist = cfl_ult_ids },
> + { SUBPLATFORM(COFFEELAKE, ULX), .pciidlist = cfl_ulx_ids },
> {},
> },
> .info = &skl_display,
> @@ -677,7 +681,7 @@ static const u16 cml_ult_ids[] = {
> static const struct platform_desc cml_desc = {
> PLATFORM(COMETLAKE),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_COMETLAKE_ULT, "ULT", cml_ult_ids },
> + { SUBPLATFORM(COMETLAKE, ULT), .pciidlist = cml_ult_ids },
> {},
> },
> .info = &skl_display,
> @@ -776,7 +780,7 @@ static const u16 icl_port_f_ids[] = {
> static const struct platform_desc icl_desc = {
> PLATFORM(ICELAKE),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_ICELAKE_PORT_F, "Port F", icl_port_f_ids },
> + { SUBPLATFORM(ICELAKE, PORT_F), .pciidlist = icl_port_f_ids },
> {},
> },
> .info = &(const struct intel_display_device_info) {
> @@ -853,7 +857,7 @@ static const u16 tgl_uy_ids[] = {
> static const struct platform_desc tgl_desc = {
> PLATFORM(TIGERLAKE),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_TIGERLAKE_UY, "UY", tgl_uy_ids },
> + { SUBPLATFORM(TIGERLAKE, UY), .pciidlist = tgl_uy_ids },
> {},
> },
> .info = &(const struct intel_display_device_info) {
> @@ -902,7 +906,7 @@ static const u16 adls_rpls_ids[] = {
> static const struct platform_desc adl_s_desc = {
> PLATFORM(ALDERLAKE_S),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_ALDERLAKE_S_RAPTORLAKE_S, "RPL-S", adls_rpls_ids },
> + { SUBPLATFORM(ALDERLAKE_S, RAPTORLAKE_S), .pciidlist = adls_rpls_ids },
> {},
> },
> .info = &(const struct intel_display_device_info) {
> @@ -989,9 +993,9 @@ static const u16 adlp_rplp_ids[] = {
> static const struct platform_desc adl_p_desc = {
> PLATFORM(ALDERLAKE_P),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_ALDERLAKE_P_ALDERLAKE_N, "ADL-N", adlp_adln_ids },
> - { INTEL_DISPLAY_ALDERLAKE_P_RAPTORLAKE_U, "RPL-U", adlp_rplu_ids },
> - { INTEL_DISPLAY_ALDERLAKE_P_RAPTORLAKE_P, "RPL-P", adlp_rplp_ids },
> + { SUBPLATFORM(ALDERLAKE_P, ALDERLAKE_N), .pciidlist = adlp_adln_ids },
> + { SUBPLATFORM(ALDERLAKE_P, RAPTORLAKE_U), .pciidlist = adlp_rplu_ids },
> + { SUBPLATFORM(ALDERLAKE_P, RAPTORLAKE_P), .pciidlist = adlp_rplp_ids },
> {},
> },
> .info = &xe_lpd_display,
> @@ -1026,9 +1030,9 @@ static const u16 dg2_g12_ids[] = {
> static const struct platform_desc dg2_desc = {
> PLATFORM(DG2),
> .subplatforms = (const struct subplatform_desc[]) {
> - { INTEL_DISPLAY_DG2_G10, "G10", dg2_g10_ids },
> - { INTEL_DISPLAY_DG2_G11, "G11", dg2_g11_ids },
> - { INTEL_DISPLAY_DG2_G12, "G12", dg2_g12_ids },
> + { SUBPLATFORM(DG2, G10), .pciidlist = dg2_g10_ids },
> + { SUBPLATFORM(DG2, G11), .pciidlist = dg2_g11_ids },
> + { SUBPLATFORM(DG2, G12), .pciidlist = dg2_g12_ids },
> {},
> },
> .info = &xe_hpd_display,
> --
> 2.39.2
>
next prev parent reply other threads:[~2024-06-19 18:30 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 [this message]
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
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=ZnMjmfcK8iDT28R9@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.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).