[PATCH 5/6] drm/xe/kunit: Use default GMDID version if none provided
Lucas De Marchi
lucas.demarchi at intel.com
Mon Aug 18 16:29:08 UTC 2025
On Fri, Aug 01, 2025 at 08:13:49PM +0200, Michal Wajdeczko wrote:
>For pre-GMDID platforms it is sufficient to provide platform enum
>or platform/subplatform enum pair to get full fake Xe device for use
>in KUnit tests. But if we specify GMDID platform without providing
>explicit verx100 values, we might get incomplete device test object
>that lacks any GTs.
>
>To relax tests from specifying full device config, use some default
>(or first available or defined) GMDID version if none was provided.
but would open the door to some bugs due to matching unexpected platform
+ gmdid. I'd rather always specify gmd id for gmd id platforms... as we
are currently doing by differentiating PLATFORM_CASE vs GMDID_CASE.
I don't see this patch being needed in this series. Do you have
more in the pipeline?
Lucas De Marchi
>
>Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
>Cc: Lucas De Marchi <lucas.demarchi at intel.com>
>---
> drivers/gpu/drm/xe/tests/xe_pci.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/tests/xe_pci.c b/drivers/gpu/drm/xe/tests/xe_pci.c
>index e78d10df8359..90c55f72d687 100644
>--- a/drivers/gpu/drm/xe/tests/xe_pci.c
>+++ b/drivers/gpu/drm/xe/tests/xe_pci.c
>@@ -262,10 +262,10 @@ static void fake_read_gmdid(struct xe_device *xe, enum xe_gmdid_type type,
> struct xe_pci_fake_data *data = test->priv;
>
> if (type == GMDID_MEDIA) {
>- *ver = data->media_verx100;
>+ *ver = data->media_verx100 ?: media_ips[0].verx100;
> *revid = xe_step_to_gmdid(data->step.media);
> } else {
>- *ver = data->graphics_verx100;
>+ *ver = data->graphics_verx100 ?: graphics_ips[0].verx100;
> *revid = xe_step_to_gmdid(data->step.graphics);
> }
> }
>--
>2.47.1
>
More information about the Intel-xe
mailing list