]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/display: identify discrete graphics
authorJani Nikula <jani.nikula@intel.com>
Mon, 11 Nov 2024 10:33:50 +0000 (12:33 +0200)
committerJani Nikula <jani.nikula@intel.com>
Tue, 12 Nov 2024 07:58:52 +0000 (09:58 +0200)
Identify discrete graphics separately in display, using the platform
group mechanism. This enables dropping the dependency on i915_drv.h
IS_DGFX() from display code.

Start grouping platform groups separately in INTEL_DISPLAY_PLATFORMS()
in anticipation of more groups to come.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c02230d26cc0d9dbd7ddcc064661b2ad03739b6a.1731321183.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 5f98e1b2a4016119d2522b4fa0ca1a7a607ea3dc..47957384d56dab4128d91f9b79567819963e5bab 100644 (file)
@@ -1011,6 +1011,7 @@ static const enum intel_step dg1_steppings[] = {
 
 static const struct platform_desc dg1_desc = {
        PLATFORM(dg1),
+       PLATFORM_GROUP(dgfx),
        .info = &(const struct intel_display_device_info) {
                XE_D_DISPLAY,
 
@@ -1238,6 +1239,7 @@ static const enum intel_step dg2_g12_steppings[] = {
 
 static const struct platform_desc dg2_desc = {
        PLATFORM(dg2),
+       PLATFORM_GROUP(dgfx),
        .subplatforms = (const struct subplatform_desc[]) {
                {
                        SUBPLATFORM(dg2, g10),
@@ -1338,6 +1340,7 @@ static const struct platform_desc lnl_desc = {
 
 static const struct platform_desc bmg_desc = {
        PLATFORM(battlemage),
+       PLATFORM_GROUP(dgfx),
 };
 
 static const struct platform_desc ptl_desc = {
@@ -1636,9 +1639,10 @@ void intel_display_device_probe(struct drm_i915_private *i915)
 
        DISPLAY_RUNTIME_INFO(i915)->step = step;
 
-       drm_info(&i915->drm, "Found %s%s%s (device ID %04x) display version %u.%02u stepping %s\n",
+       drm_info(&i915->drm, "Found %s%s%s (device ID %04x) %s display version %u.%02u stepping %s\n",
                 desc->name, subdesc ? "/" : "", subdesc ? subdesc->name : "",
-                pdev->device, DISPLAY_RUNTIME_INFO(i915)->ip.ver,
+                pdev->device, display->platform.dgfx ? "discrete" : "integrated",
+                DISPLAY_RUNTIME_INFO(i915)->ip.ver,
                 DISPLAY_RUNTIME_INFO(i915)->ip.rel,
                 step != STEP_NONE ? intel_step_name(step) : "N/A");
 
index a8a0b4332247ea521484bd84332df88dab3cc779..962a46e544995903ea245e383b299b011648dfe4 100644 (file)
@@ -21,6 +21,9 @@ struct drm_printer;
  * platform.
  */
 #define INTEL_DISPLAY_PLATFORMS(func) \
+       /* Platform group aliases */ \
+       func(g4x) /* g45 and gm45 */ \
+       func(dgfx) /* discrete graphics */ \
        /* Display ver 2 */ \
        func(i830) \
        func(i845g) \
@@ -38,7 +41,6 @@ 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 */ \