linux/drivers/gpu/drm/xe/tests/xe_pci_test.h
Matt Roper fb72cd2104 drm/xe/tests/pci: Ensure all platforms have a valid GT/tile count
Add a simple kunit test to ensure each platform's GT per tile count is
non-zero and does not exceed the global XE_MAX_GT_PER_TILE definition.

We need to move 'struct xe_subplatform_desc' from the .c file to the
types header to ensure it is accessible from the kunit test.

v2:
 - Rebase on latest xe_pci test rework from Michal and convert to
   a parameterized test that runs on each PCI ID supported by the
   driver.

Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Ravi Kumar Vodapalli <ravi.kumar.vodapalli@intel.com>
Link: https://lore.kernel.org/r/20250701201320.2514369-13-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2025-07-02 16:08:54 -07:00

34 lines
788 B
C

/* SPDX-License-Identifier: GPL-2.0 AND MIT */
/*
* Copyright © 2023 Intel Corporation
*/
#ifndef _XE_PCI_TEST_H_
#define _XE_PCI_TEST_H_
#include <linux/types.h>
#include "xe_platform_types.h"
#include "xe_sriov_types.h"
struct xe_device;
struct xe_pci_fake_data {
enum xe_sriov_mode sriov_mode;
enum xe_platform platform;
enum xe_subplatform subplatform;
u32 graphics_verx100;
u32 media_verx100;
u32 graphics_step;
u32 media_step;
};
int xe_pci_fake_device_init(struct xe_device *xe);
const void *xe_pci_graphics_ip_gen_param(const void *prev, char *desc);
const void *xe_pci_media_ip_gen_param(const void *prev, char *desc);
const void *xe_pci_id_gen_param(const void *prev, char *desc);
const void *xe_pci_live_device_gen_param(const void *prev, char *desc);
#endif