drm/i915/display: add platform group for g4x
authorJani Nikula <jani.nikula@intel.com>
Mon, 28 Oct 2024 19:48:42 +0000 (21:48 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 30 Oct 2024 09:15:51 +0000 (11:15 +0200)
Add support for defining aliases for platform groups, such as g4x that
covers both g45 and gm45.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/947bdbc03913838383d75b3e07cf340100cbb5bb.1730144869.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display_device.c
drivers/gpu/drm/i915/display/intel_display_device.h

index ea886a1..cf9eb6a 100644 (file)
@@ -54,6 +54,13 @@ struct platform_desc {
        .platforms._platform = 1,                \
        .name = #_platform
 
+/*
+ * Group platform alias that matches multiple platforms. For aliases such as g4x
+ * that covers both g45 and gm45.
+ */
+#define PLATFORM_GROUP(_platform)              \
+       .platforms._platform = 1
+
 #define ID(id) (id)
 
 static const struct intel_display_device_info no_display = {};
@@ -388,6 +395,7 @@ static const struct platform_desc i965gm_desc = {
 
 static const struct platform_desc g45_desc = {
        PLATFORM(g45),
+       PLATFORM_GROUP(g4x),
        .info = &(const struct intel_display_device_info) {
                GEN4_DISPLAY,
 
@@ -397,6 +405,7 @@ static const struct platform_desc g45_desc = {
 
 static const struct platform_desc gm45_desc = {
        PLATFORM(gm45),
+       PLATFORM_GROUP(g4x),
        .info = &(const struct intel_display_device_info) {
                GEN4_DISPLAY,
                .supports_tv = 1,
index 71944d1..1df3b93 100644 (file)
@@ -38,6 +38,7 @@ struct drm_printer;
        func(i965gm) \
        func(g45) \
        func(gm45) \
+       func(g4x) /* group alias for g45 and gm45 */ \
        /* Display ver 5 */ \
        func(ironlake) \
        /* Display ver 6 */ \