intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
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>, <lucas.demarchi@intel.com>,
	<maarten.lankhorst@linux.intel.com>,
	<ville.syrjala@linux.intel.com>
Subject: Re: [PATCH v3 01/15] drm/i915/display: reindent subplatform initialization
Date: Mon, 7 Oct 2024 15:35:58 -0400	[thread overview]
Message-ID: <ZwQ4HoyKvmyNBHEr@intel.com> (raw)
In-Reply-To: <8dbb0fc4a979dba2b1030384f6dde20ac622d1ba.1727699233.git.jani.nikula@intel.com>

On Mon, Sep 30, 2024 at 03:31:02PM +0300, Jani Nikula wrote:
> Make the subplatform initialization less cramped, and follow the coding
> style more closely. Initialize .pciidlist using designated initializers.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  .../drm/i915/display/intel_display_device.c   | 116 +++++++++++++-----
>  1 file changed, 88 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
> index f33062322c66..93c751fde1a9 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.c
> @@ -497,8 +497,14 @@ 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 },
> +		{
> +			INTEL_DISPLAY_HASWELL_ULT, "ULT",
> +			.pciidlist = hsw_ult_ids,
> +		},
> +		{
> +			INTEL_DISPLAY_HASWELL_ULX, "ULX",
> +			.pciidlist = hsw_ulx_ids,
> +		},
>  		{},
>  	},
>  	.info = &(const struct intel_display_device_info) {
> @@ -541,8 +547,14 @@ 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 },
> +		{
> +			INTEL_DISPLAY_BROADWELL_ULT, "ULT",
> +			.pciidlist = bdw_ult_ids,
> +		},
> +		{
> +			INTEL_DISPLAY_BROADWELL_ULX, "ULX",
> +			.pciidlist = bdw_ulx_ids,
> +		},
>  		{},
>  	},
>  	.info = &(const struct intel_display_device_info) {
> @@ -632,8 +644,14 @@ static const enum intel_step skl_steppings[] = {
>  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 },
> +		{
> +			INTEL_DISPLAY_SKYLAKE_ULT, "ULT",
> +			.pciidlist = skl_ult_ids,
> +		},
> +		{
> +			INTEL_DISPLAY_SKYLAKE_ULX, "ULX",
> +			.pciidlist = skl_ulx_ids,
> +		},
>  		{},
>  	},
>  	.info = &skl_display,
> @@ -667,8 +685,14 @@ static const enum intel_step kbl_steppings[] = {
>  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 },
> +		{
> +			INTEL_DISPLAY_KABYLAKE_ULT, "ULT",
> +			.pciidlist = kbl_ult_ids,
> +		},
> +		{
> +			INTEL_DISPLAY_KABYLAKE_ULX, "ULX",
> +			.pciidlist = kbl_ulx_ids,
> +		},
>  		{},
>  	},
>  	.info = &skl_display,
> @@ -692,8 +716,14 @@ 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 },
> +		{
> +			INTEL_DISPLAY_COFFEELAKE_ULT, "ULT",
> +			.pciidlist = cfl_ult_ids,
> +		},
> +		{
> +			INTEL_DISPLAY_COFFEELAKE_ULX, "ULX",
> +			.pciidlist = cfl_ulx_ids,
> +		},
>  		{},
>  	},
>  	.info = &skl_display,
> @@ -708,7 +738,10 @@ 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 },
> +		{
> +			INTEL_DISPLAY_COMETLAKE_ULT, "ULT",
> +			.pciidlist = cml_ult_ids,
> +		},
>  		{},
>  	},
>  	.info = &skl_display,
> @@ -824,7 +857,10 @@ static const enum intel_step icl_steppings[] = {
>  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 },
> +		{
> +			INTEL_DISPLAY_ICELAKE_PORT_F, "Port F",
> +			.pciidlist = icl_port_f_ids,
> +		},
>  		{},
>  	},
>  	.info = &(const struct intel_display_device_info) {
> @@ -921,8 +957,11 @@ static const enum intel_step tgl_uy_steppings[] = {
>  static const struct platform_desc tgl_desc = {
>  	PLATFORM(TIGERLAKE),
>  	.subplatforms = (const struct subplatform_desc[]) {
> -		{ INTEL_DISPLAY_TIGERLAKE_UY, "UY", tgl_uy_ids,
> -		  STEP_INFO(tgl_uy_steppings) },
> +		{
> +			INTEL_DISPLAY_TIGERLAKE_UY, "UY",
> +			.pciidlist = tgl_uy_ids,
> +			STEP_INFO(tgl_uy_steppings),
> +		},
>  		{},
>  	},
>  	.info = &(const struct intel_display_device_info) {
> @@ -998,8 +1037,11 @@ static const enum intel_step adl_s_rpl_s_steppings[] = {
>  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,
> -		  STEP_INFO(adl_s_rpl_s_steppings) },
> +		{
> +			INTEL_DISPLAY_ALDERLAKE_S_RAPTORLAKE_S, "RPL-S",
> +			.pciidlist = adls_rpls_ids,
> +			STEP_INFO(adl_s_rpl_s_steppings),
> +		},
>  		{},
>  	},
>  	.info = &(const struct intel_display_device_info) {
> @@ -1102,12 +1144,21 @@ static const enum intel_step adl_p_rpl_pu_steppings[] = {
>  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,
> -		  STEP_INFO(adl_p_adl_n_steppings) },
> -		{ INTEL_DISPLAY_ALDERLAKE_P_RAPTORLAKE_P, "RPL-P", adlp_rplp_ids,
> -		  STEP_INFO(adl_p_rpl_pu_steppings) },
> -		{ INTEL_DISPLAY_ALDERLAKE_P_RAPTORLAKE_U, "RPL-U", adlp_rplu_ids,
> -		  STEP_INFO(adl_p_rpl_pu_steppings) },
> +		{
> +			INTEL_DISPLAY_ALDERLAKE_P_ALDERLAKE_N, "ADL-N",
> +			.pciidlist = adlp_adln_ids,
> +			STEP_INFO(adl_p_adl_n_steppings),
> +		},
> +		{
> +			INTEL_DISPLAY_ALDERLAKE_P_RAPTORLAKE_P, "RPL-P",
> +			.pciidlist = adlp_rplp_ids,
> +			STEP_INFO(adl_p_rpl_pu_steppings),
> +		},
> +		{
> +			INTEL_DISPLAY_ALDERLAKE_P_RAPTORLAKE_U, "RPL-U",
> +			.pciidlist = adlp_rplu_ids,
> +			STEP_INFO(adl_p_rpl_pu_steppings),
> +		},
>  		{},
>  	},
>  	.info = &xe_lpd_display,
> @@ -1161,12 +1212,21 @@ static const enum intel_step dg2_g12_steppings[] = {
>  static const struct platform_desc dg2_desc = {
>  	PLATFORM(DG2),
>  	.subplatforms = (const struct subplatform_desc[]) {
> -		{ INTEL_DISPLAY_DG2_G10, "G10", dg2_g10_ids,
> -		  STEP_INFO(dg2_g10_steppings) },
> -		{ INTEL_DISPLAY_DG2_G11, "G11", dg2_g11_ids,
> -		  STEP_INFO(dg2_g11_steppings) },
> -		{ INTEL_DISPLAY_DG2_G12, "G12", dg2_g12_ids,
> -		  STEP_INFO(dg2_g12_steppings) },
> +		{
> +			INTEL_DISPLAY_DG2_G10, "G10",
> +			.pciidlist = dg2_g10_ids,
> +			STEP_INFO(dg2_g10_steppings),
> +		},
> +		{
> +			INTEL_DISPLAY_DG2_G11, "G11",
> +			.pciidlist = dg2_g11_ids,
> +			STEP_INFO(dg2_g11_steppings),
> +		},
> +		{
> +			INTEL_DISPLAY_DG2_G12, "G12",
> +			.pciidlist = dg2_g12_ids,
> +			STEP_INFO(dg2_g12_steppings),
> +		},
>  		{},
>  	},
>  	.info = &xe_hpd_display,
> -- 
> 2.39.5
> 

  reply	other threads:[~2024-10-07 19:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 12:31 [PATCH v3 00/15] drm/i915/display: platform identification with display->platform.<platform> Jani Nikula
2024-09-30 12:31 ` [PATCH v3 01/15] drm/i915/display: reindent subplatform initialization Jani Nikula
2024-10-07 19:35   ` Rodrigo Vivi [this message]
2024-09-30 12:31 ` [PATCH v3 02/15] drm/i915/display: use a macro to initialize subplatforms Jani Nikula
2024-10-07 19:41   ` Rodrigo Vivi
2024-09-30 12:31 ` [PATCH v3 03/15] drm/i915/display: use a macro to define platform enumerations Jani Nikula
2024-10-07 19:48   ` Rodrigo Vivi
2024-10-07 20:36   ` Michal Wajdeczko
2024-10-08  9:30     ` Jani Nikula
2024-10-08  9:42       ` Michal Wajdeczko
2024-10-08 10:08         ` Jani Nikula
2024-09-30 12:31 ` [PATCH v3 04/15] drm/i915/display: join the platform and subplatform enums Jani Nikula
2024-10-07 19:49   ` Rodrigo Vivi
2024-09-30 12:31 ` [PATCH v3 05/15] drm/i915/display: convert display platforms to lower case Jani Nikula
2024-10-07 19:49   ` Rodrigo Vivi
2024-09-30 12:31 ` [PATCH v3 06/15] drm/i915/display: add display platforms structure with platform members Jani Nikula
2024-10-07 19:54   ` Rodrigo Vivi
2024-10-08  9:36     ` Jani Nikula
2024-09-30 12:31 ` [PATCH v3 07/15] drm/i915/display: add platform member to struct intel_display Jani Nikula
2024-09-30 12:31 ` [PATCH v3 08/15] drm/i915/display: remove the display platform enum as unnecessary Jani Nikula
2024-09-30 12:31 ` [PATCH v3 09/15] drm/i915/display: add platform group for g4x Jani Nikula
2024-09-30 12:31 ` [PATCH v3 10/15] drm/i915/display: add subplatform group for HSW/BDW ULT Jani Nikula
2024-09-30 12:31 ` [PATCH v3 11/15] drm/i915/bios: use display->platform.<platform> instead of IS_<PLATFORM>() Jani Nikula
2024-09-30 12:31 ` [PATCH v3 12/15] drm/i915/pps: " Jani Nikula
2024-09-30 12:31 ` [PATCH v3 13/15] drm/i915/tv: " Jani Nikula
2024-09-30 12:31 ` [PATCH v3 14/15] drm/i915/vga: " Jani Nikula
2024-09-30 12:31 ` [PATCH v3 15/15] drm/i915/vblank: " Jani Nikula
2024-10-01  1:45 ` ✗ Fi.CI.SPARSE: warning for drm/i915/display: platform identification with display->platform.<platform> Patchwork
2024-10-01  1:53 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-01 14:34 ` ✗ 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=ZwQ4HoyKvmyNBHEr@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).