diff mbox series

[v2,8/9] drm/i915/display: keep subplatforms next to their platforms

Message ID 43a8e73d499d909741e4b6c78ed4e20895fe1b24.1724092799.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/display: platform identification with display->is.<PLATFORM> | expand

Commit Message

Jani Nikula Aug. 19, 2024, 6:44 p.m. UTC
There's no reason to keep subplatforms separated in the members. Update
the comment while at it.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 .../drm/i915/display/intel_display_device.h   | 51 ++++++++++---------
 1 file changed, 27 insertions(+), 24 deletions(-)

Comments

Rodrigo Vivi Aug. 28, 2024, 8:52 p.m. UTC | #1
On Mon, Aug 19, 2024 at 09:44:35PM +0300, Jani Nikula wrote:
> There's no reason to keep subplatforms separated in the members. Update
> the comment while at it.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  .../drm/i915/display/intel_display_device.h   | 51 ++++++++++---------
>  1 file changed, 27 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
> index 6d1f3de46836..86664b999ca9 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> @@ -15,7 +15,11 @@
>  struct drm_i915_private;
>  struct drm_printer;
>  
> -/* Keep in gen based order, and chronological order within a gen */
> +/*
> + * Display platforms and subplatforms. Keep platforms in display version based
> + * order, chronological order within a version, and subplatforms next to the
> + * platform.
> + */

I wonder if we should do the reverse other, so a patch introducing a new
platform doesn't need to touch the previous one to add the '\'.

but,

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


>  #define INTEL_DISPLAY_PLATFORMS(func) \
>  	/* Display ver 2 */ \
>  	func(I830) \
> @@ -42,56 +46,55 @@ struct drm_printer;
>  	func(IVYBRIDGE) \
>  	func(VALLEYVIEW) \
>  	func(HASWELL) \
> +	func(HASWELL_ULT) \
> +	func(HASWELL_ULX) \
>  	/* Display ver 8 */ \
>  	func(BROADWELL) \
> +	func(BROADWELL_ULT) \
> +	func(BROADWELL_ULX) \
>  	func(CHERRYVIEW) \
>  	/* Display ver 9 */ \
>  	func(SKYLAKE) \
> +	func(SKYLAKE_ULT) \
> +	func(SKYLAKE_ULX) \
>  	func(BROXTON) \
>  	func(KABYLAKE) \
> +	func(KABYLAKE_ULT) \
> +	func(KABYLAKE_ULX) \
>  	func(GEMINILAKE) \
>  	func(COFFEELAKE) \
> +	func(COFFEELAKE_ULT) \
> +	func(COFFEELAKE_ULX) \
>  	func(COMETLAKE) \
> +	func(COMETLAKE_ULT) \
> +	func(COMETLAKE_ULX) \
>  	/* Display ver 11 */ \
>  	func(ICELAKE) \
> +	func(ICELAKE_PORT_F) \
>  	func(JASPERLAKE) \
>  	func(ELKHARTLAKE) \
>  	/* Display ver 12 */ \
>  	func(TIGERLAKE) \
> +	func(TIGERLAKE_UY) \
>  	func(ROCKETLAKE) \
>  	func(DG1) \
>  	func(ALDERLAKE_S) \
> +	func(ALDERLAKE_S_RAPTORLAKE_S) \
>  	/* Display ver 13 */ \
>  	func(ALDERLAKE_P) \
> +	func(ALDERLAKE_P_ALDERLAKE_N) \
> +	func(ALDERLAKE_P_RAPTORLAKE_P) \
> +	func(ALDERLAKE_P_RAPTORLAKE_U) \
>  	func(DG2) \
> +	func(DG2_G10) \
> +	func(DG2_G11) \
> +	func(DG2_G12) \
>  	/* 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) \
> -	/* Subplatforms */ \
> -	func(HASWELL_ULT) \
> -	func(HASWELL_ULX) \
> -	func(BROADWELL_ULT) \
> -	func(BROADWELL_ULX) \
> -	func(SKYLAKE_ULT) \
> -	func(SKYLAKE_ULX) \
> -	func(KABYLAKE_ULT) \
> -	func(KABYLAKE_ULX) \
> -	func(COFFEELAKE_ULT) \
> -	func(COFFEELAKE_ULX) \
> -	func(COMETLAKE_ULT) \
> -	func(COMETLAKE_ULX) \
> -	func(ICELAKE_PORT_F) \
> -	func(TIGERLAKE_UY) \
> -	func(ALDERLAKE_S_RAPTORLAKE_S) \
> -	func(ALDERLAKE_P_ALDERLAKE_N) \
> -	func(ALDERLAKE_P_RAPTORLAKE_P) \
> -	func(ALDERLAKE_P_RAPTORLAKE_U) \
> -	func(DG2_G10) \
> -	func(DG2_G11) \
> -	func(DG2_G12)
> +	func(BATTLEMAGE)
>  
>  #define __MEMBER(name) unsigned long name:1;
>  #define __COUNT(x) 1 +
> -- 
> 2.39.2
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
index 6d1f3de46836..86664b999ca9 100644
--- a/drivers/gpu/drm/i915/display/intel_display_device.h
+++ b/drivers/gpu/drm/i915/display/intel_display_device.h
@@ -15,7 +15,11 @@ 
 struct drm_i915_private;
 struct drm_printer;
 
-/* Keep in gen based order, and chronological order within a gen */
+/*
+ * Display platforms and subplatforms. Keep platforms in display version based
+ * order, chronological order within a version, and subplatforms next to the
+ * platform.
+ */
 #define INTEL_DISPLAY_PLATFORMS(func) \
 	/* Display ver 2 */ \
 	func(I830) \
@@ -42,56 +46,55 @@  struct drm_printer;
 	func(IVYBRIDGE) \
 	func(VALLEYVIEW) \
 	func(HASWELL) \
+	func(HASWELL_ULT) \
+	func(HASWELL_ULX) \
 	/* Display ver 8 */ \
 	func(BROADWELL) \
+	func(BROADWELL_ULT) \
+	func(BROADWELL_ULX) \
 	func(CHERRYVIEW) \
 	/* Display ver 9 */ \
 	func(SKYLAKE) \
+	func(SKYLAKE_ULT) \
+	func(SKYLAKE_ULX) \
 	func(BROXTON) \
 	func(KABYLAKE) \
+	func(KABYLAKE_ULT) \
+	func(KABYLAKE_ULX) \
 	func(GEMINILAKE) \
 	func(COFFEELAKE) \
+	func(COFFEELAKE_ULT) \
+	func(COFFEELAKE_ULX) \
 	func(COMETLAKE) \
+	func(COMETLAKE_ULT) \
+	func(COMETLAKE_ULX) \
 	/* Display ver 11 */ \
 	func(ICELAKE) \
+	func(ICELAKE_PORT_F) \
 	func(JASPERLAKE) \
 	func(ELKHARTLAKE) \
 	/* Display ver 12 */ \
 	func(TIGERLAKE) \
+	func(TIGERLAKE_UY) \
 	func(ROCKETLAKE) \
 	func(DG1) \
 	func(ALDERLAKE_S) \
+	func(ALDERLAKE_S_RAPTORLAKE_S) \
 	/* Display ver 13 */ \
 	func(ALDERLAKE_P) \
+	func(ALDERLAKE_P_ALDERLAKE_N) \
+	func(ALDERLAKE_P_RAPTORLAKE_P) \
+	func(ALDERLAKE_P_RAPTORLAKE_U) \
 	func(DG2) \
+	func(DG2_G10) \
+	func(DG2_G11) \
+	func(DG2_G12) \
 	/* 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) \
-	/* Subplatforms */ \
-	func(HASWELL_ULT) \
-	func(HASWELL_ULX) \
-	func(BROADWELL_ULT) \
-	func(BROADWELL_ULX) \
-	func(SKYLAKE_ULT) \
-	func(SKYLAKE_ULX) \
-	func(KABYLAKE_ULT) \
-	func(KABYLAKE_ULX) \
-	func(COFFEELAKE_ULT) \
-	func(COFFEELAKE_ULX) \
-	func(COMETLAKE_ULT) \
-	func(COMETLAKE_ULX) \
-	func(ICELAKE_PORT_F) \
-	func(TIGERLAKE_UY) \
-	func(ALDERLAKE_S_RAPTORLAKE_S) \
-	func(ALDERLAKE_P_ALDERLAKE_N) \
-	func(ALDERLAKE_P_RAPTORLAKE_P) \
-	func(ALDERLAKE_P_RAPTORLAKE_U) \
-	func(DG2_G10) \
-	func(DG2_G11) \
-	func(DG2_G12)
+	func(BATTLEMAGE)
 
 #define __MEMBER(name) unsigned long name:1;
 #define __COUNT(x) 1 +