]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/xe/kunit: Update struct xe_pci_fake_data step declarations
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 29 Aug 2025 17:19:17 +0000 (19:19 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 5 Sep 2025 10:57:23 +0000 (12:57 +0200)
The struct xe_pci_fake_data has fields that specify graphics and
media stepping of the fake PCI device used during KUnit testing.

Change definitions of those separate step fields and use existing
struct xe_step_info definition that already have required fields.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250829171922.572-3-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/tests/xe_pci.c
drivers/gpu/drm/xe/tests/xe_pci_test.h
drivers/gpu/drm/xe/tests/xe_wa_test.c

index db30c5156d0c6efb1447997072665ddb0ef4a8f1..bb0ce0dc9b31b59e9336a2c2bd658700c432dcac 100644 (file)
@@ -94,10 +94,10 @@ static void fake_read_gmdid(struct xe_device *xe, enum xe_gmdid_type type,
 
        if (type == GMDID_MEDIA) {
                *ver = data->media_verx100;
-               *revid = xe_step_to_gmdid(data->media_step);
+               *revid = xe_step_to_gmdid(data->step.media);
        } else {
                *ver = data->graphics_verx100;
-               *revid = xe_step_to_gmdid(data->graphics_step);
+               *revid = xe_step_to_gmdid(data->step.graphics);
        }
 }
 
index ce4d2b86b778f71d2b92281ffc72be063282d1e3..32452bd65bff9249c32df87aa6221957a7f08e14 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "xe_platform_types.h"
 #include "xe_sriov_types.h"
+#include "xe_step_types.h"
 
 struct xe_device;
 
@@ -17,10 +18,9 @@ struct xe_pci_fake_data {
        enum xe_sriov_mode sriov_mode;
        enum xe_platform platform;
        enum xe_subplatform subplatform;
+       struct xe_step_info step;
        u32 graphics_verx100;
        u32 media_verx100;
-       u32 graphics_step;
-       u32 media_step;
 };
 
 int xe_pci_fake_device_init(struct xe_device *xe);
index 416258c193f614f13b16feba3731435d49bd6cd5..a0de55f09267fc05023c3f4b31f3a84df236f6d8 100644 (file)
@@ -93,8 +93,7 @@ static int xe_wa_test_init(struct kunit *test)
                .subplatform = param->subplatform,
                .graphics_verx100 = param->graphics_verx100,
                .media_verx100 = param->media_verx100,
-               .graphics_step = param->step.graphics,
-               .media_step = param->step.media,
+               .step = param->step,
        };
        struct xe_device *xe;
        struct device *dev;