Intel-XE Archive on lore.kernel.org
 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>, <ville.syrjala@linux.intel.com>,
	<maarten.lankhorst@linux.intel.com>, <lucas.demarchi@intel.com>
Subject: Re: [PATCH 2/6] drm/i915/display: use a macro to define platform enumerations
Date: Wed, 19 Jun 2024 14:29:59 -0400	[thread overview]
Message-ID: <ZnMjp4VQ5Bq5rW2S@intel.com> (raw)
In-Reply-To: <da792d0f64fd47f4f5adb45643c9a28605c84daf.1718719962.git.jani.nikula@intel.com>

On Tue, Jun 18, 2024 at 05:22:52PM +0300, Jani Nikula wrote:
> We'll be needing a macro based list of platforms for more things in the
> future. Start by defining the platform enumerations with it.

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

> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  .../drm/i915/display/intel_display_device.h   | 115 ++++++++++--------
>  1 file changed, 61 insertions(+), 54 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
> index 13453ea4daea..aca3dfd5e7af 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> @@ -15,63 +15,70 @@ struct drm_i915_private;
>  struct drm_printer;
>  
>  /* Keep in gen based order, and chronological order within a gen */
> +#define INTEL_DISPLAY_PLATFORMS(func) \
> +	func(PLATFORM_UNINITIALIZED) \
> +	/* Display ver 2 */ \
> +	func(I830) \
> +	func(I845G) \
> +	func(I85X) \
> +	func(I865G) \
> +	/* Display ver 3 */ \
> +	func(I915G) \
> +	func(I915GM) \
> +	func(I945G) \
> +	func(I945GM) \
> +	func(G33) \
> +	func(PINEVIEW) \
> +	/* Display ver 4 */ \
> +	func(I965G) \
> +	func(I965GM) \
> +	func(G45) \
> +	func(GM45) \
> +	/* Display ver 5 */ \
> +	func(IRONLAKE) \
> +	/* Display ver 6 */ \
> +	func(SANDYBRIDGE) \
> +	/* Display ver 7 */ \
> +	func(IVYBRIDGE) \
> +	func(VALLEYVIEW) \
> +	func(HASWELL) \
> +	/* Display ver 8 */ \
> +	func(BROADWELL) \
> +	func(CHERRYVIEW) \
> +	/* Display ver 9 */ \
> +	func(SKYLAKE) \
> +	func(BROXTON) \
> +	func(KABYLAKE) \
> +	func(GEMINILAKE) \
> +	func(COFFEELAKE) \
> +	func(COMETLAKE) \
> +	/* Display ver 11 */ \
> +	func(ICELAKE) \
> +	func(JASPERLAKE) \
> +	func(ELKHARTLAKE) \
> +	/* Display ver 12 */ \
> +	func(TIGERLAKE) \
> +	func(ROCKETLAKE) \
> +	func(DG1) \
> +	func(ALDERLAKE_S) \
> +	/* Display ver 13 */ \
> +	func(ALDERLAKE_P) \
> +	func(DG2) \
> +	/* Display ver 14 (based on GMD ID) */ \
> +	func(METEORLAKE) \
> +	/* Display ver 20 (based on GMD ID) */ \
> +	func(LUNARLAKE) \
> +	/* Display ver 14.1 (based on GMD ID) */ \
> +	func(BATTLEMAGE)
> +
> +#define ENUM(x) INTEL_DISPLAY_ ## x,
> +
>  enum intel_display_platform {
> -	INTEL_DISPLAY_PLATFORM_UNINITIALIZED = 0,
> -	/* Display ver 2 */
> -	INTEL_DISPLAY_I830,
> -	INTEL_DISPLAY_I845G,
> -	INTEL_DISPLAY_I85X,
> -	INTEL_DISPLAY_I865G,
> -	/* Display ver 3 */
> -	INTEL_DISPLAY_I915G,
> -	INTEL_DISPLAY_I915GM,
> -	INTEL_DISPLAY_I945G,
> -	INTEL_DISPLAY_I945GM,
> -	INTEL_DISPLAY_G33,
> -	INTEL_DISPLAY_PINEVIEW,
> -	/* Display ver 4 */
> -	INTEL_DISPLAY_I965G,
> -	INTEL_DISPLAY_I965GM,
> -	INTEL_DISPLAY_G45,
> -	INTEL_DISPLAY_GM45,
> -	/* Display ver 5 */
> -	INTEL_DISPLAY_IRONLAKE,
> -	/* Display ver 6 */
> -	INTEL_DISPLAY_SANDYBRIDGE,
> -	/* Display ver 7 */
> -	INTEL_DISPLAY_IVYBRIDGE,
> -	INTEL_DISPLAY_VALLEYVIEW,
> -	INTEL_DISPLAY_HASWELL,
> -	/* Display ver 8 */
> -	INTEL_DISPLAY_BROADWELL,
> -	INTEL_DISPLAY_CHERRYVIEW,
> -	/* Display ver 9 */
> -	INTEL_DISPLAY_SKYLAKE,
> -	INTEL_DISPLAY_BROXTON,
> -	INTEL_DISPLAY_KABYLAKE,
> -	INTEL_DISPLAY_GEMINILAKE,
> -	INTEL_DISPLAY_COFFEELAKE,
> -	INTEL_DISPLAY_COMETLAKE,
> -	/* Display ver 11 */
> -	INTEL_DISPLAY_ICELAKE,
> -	INTEL_DISPLAY_JASPERLAKE,
> -	INTEL_DISPLAY_ELKHARTLAKE,
> -	/* Display ver 12 */
> -	INTEL_DISPLAY_TIGERLAKE,
> -	INTEL_DISPLAY_ROCKETLAKE,
> -	INTEL_DISPLAY_DG1,
> -	INTEL_DISPLAY_ALDERLAKE_S,
> -	/* Display ver 13 */
> -	INTEL_DISPLAY_ALDERLAKE_P,
> -	INTEL_DISPLAY_DG2,
> -	/* Display ver 14 (based on GMD ID) */
> -	INTEL_DISPLAY_METEORLAKE,
> -	/* Display ver 20 (based on GMD ID) */
> -	INTEL_DISPLAY_LUNARLAKE,
> -	/* Display ver 14.1 (based on GMD ID) */
> -	INTEL_DISPLAY_BATTLEMAGE,
> +	INTEL_DISPLAY_PLATFORMS(ENUM)
>  };
>  
> +#undef ENUM
> +
>  enum intel_display_subplatform {
>  	INTEL_DISPLAY_SUBPLATFORM_UNINITIALIZED = 0,
>  	INTEL_DISPLAY_HASWELL_ULT,
> -- 
> 2.39.2
> 

  reply	other threads:[~2024-06-19 18:30 UTC|newest]

Thread overview: 29+ 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 [this message]
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:28 ` ✓ CI.Patch_applied: success for drm/i915/display: platform identification with display->is.<PLATFORM> Patchwork
2024-06-18 14:28 ` ✗ CI.checkpatch: warning " Patchwork
2024-06-18 14:29 ` ✓ CI.KUnit: success " Patchwork
2024-06-18 14:41 ` ✓ CI.Build: " Patchwork
2024-06-18 14:43 ` ✗ CI.Hooks: failure " Patchwork
2024-06-18 14:44 ` ✗ CI.checksparse: warning " Patchwork
2024-06-18 15:07 ` ✓ CI.BAT: success " Patchwork
2024-06-19  4:06 ` ✓ CI.FULL: " 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=ZnMjp4VQ5Bq5rW2S@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