mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
drm/xe: Add devid and revid to xe_probed_info
The PCI devid and revid fields are info that we probe from the hardware (indirectly via the PCI subsystem). Add them to xe_probed_info and set them via xe_probe_info_early(), since the respective fields in xe->info are updated in xe_info_init_early(). Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com> Reviewed-by: Violet Monti <violet.monti@intel.com> Link: https://patch.msgid.link/20260609-xe-probe-info-v1-3-21e83e188e60@intel.com Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
This commit is contained in:
parent
246a005895
commit
70b85cb2b5
|
|
@ -311,11 +311,6 @@ const void *xe_pci_id_gen_param(struct kunit *test, const void *prev, char *desc
|
|||
}
|
||||
EXPORT_SYMBOL_IF_KUNIT(xe_pci_id_gen_param);
|
||||
|
||||
static void fake_init_devid(struct xe_device *xe)
|
||||
{
|
||||
/* Nothing to do, just keep zero. */
|
||||
}
|
||||
|
||||
static int fake_read_gmdid(struct xe_device *xe, enum xe_gmdid_type type,
|
||||
u32 *ver, u32 *revid)
|
||||
{
|
||||
|
|
@ -382,7 +377,6 @@ int xe_pci_fake_device_init(struct xe_device *xe)
|
|||
xe->sriov.__mode = data && data->sriov_mode ?
|
||||
data->sriov_mode : XE_SRIOV_MODE_NONE;
|
||||
|
||||
kunit_activate_static_stub(test, init_devid, fake_init_devid);
|
||||
kunit_activate_static_stub(test, read_gmdid, fake_read_gmdid);
|
||||
kunit_activate_static_stub(test, xe_info_probe_tile_count,
|
||||
fake_xe_info_probe_tile_count);
|
||||
|
|
|
|||
|
|
@ -729,18 +729,9 @@ static int handle_gmdid(struct xe_device *xe,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void init_devid(struct xe_device *xe)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
|
||||
|
||||
KUNIT_STATIC_STUB_REDIRECT(init_devid, xe);
|
||||
|
||||
xe->info.devid = pdev->device;
|
||||
xe->info.revid = pdev->revision;
|
||||
}
|
||||
|
||||
struct xe_probed_info {
|
||||
/* Nothing for now. */
|
||||
u16 devid;
|
||||
u8 revid;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -749,6 +740,11 @@ struct xe_probed_info {
|
|||
static int xe_probe_info_early(struct xe_device *xe,
|
||||
struct xe_probed_info *probed_info)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
|
||||
|
||||
probed_info->devid = pdev->device;
|
||||
probed_info->revid = pdev->revision;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -763,13 +759,14 @@ static int xe_info_init_early(struct xe_device *xe,
|
|||
{
|
||||
int err;
|
||||
|
||||
xe->info.devid = probed_info->devid;
|
||||
xe->info.revid = probed_info->revid;
|
||||
|
||||
xe->info.platform_name = desc->platform_name;
|
||||
xe->info.platform = desc->platform;
|
||||
xe->info.subplatform = subplatform_desc ?
|
||||
subplatform_desc->subplatform : XE_SUBPLATFORM_NONE;
|
||||
|
||||
init_devid(xe);
|
||||
|
||||
xe->info.dma_mask_size = desc->dma_mask_size;
|
||||
xe->info.va_bits = desc->va_bits;
|
||||
xe->info.vm_max_level = desc->vm_max_level;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user