From a158eba2fb0d82b7a11f316c6b4065d5861ba0dd Mon Sep 17 00:00:00 2001 From: Michal Wajdeczko Date: Fri, 4 Sep 2026 19:05:29 +0200 Subject: drm/xe: Drop redundant parameter from xe_probe_info and friends We can now obtain the const pointer to struct xe_device_desc directly from the xe, no need to pass it as explicit parameter. Signed-off-by: Michal Wajdeczko Reviewed-by: Gustavo Sousa Link: https://patch.msgid.link/20260904170531.516-6-michal.wajdeczko@intel.com --- drivers/gpu/drm/xe/tests/xe_pci.c | 5 +++-- drivers/gpu/drm/xe/xe_pci.c | 13 ++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/xe/tests/xe_pci.c b/drivers/gpu/drm/xe/tests/xe_pci.c index ca833f1f3cce..5aefc03c00c7 100644 --- a/drivers/gpu/drm/xe/tests/xe_pci.c +++ b/drivers/gpu/drm/xe/tests/xe_pci.c @@ -311,10 +311,11 @@ 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 int fake_probe_info(struct xe_device *xe, - const struct xe_device_desc *desc, struct xe_pci_fake_data *data, struct xe_probed_info *probed_info) { + const struct xe_device_desc *desc = xe->desc; + probed_info->tile_count = 1 + desc->max_remote_tiles; if (!data || desc->pre_gmdid_graphics_ip) { @@ -389,7 +390,7 @@ done: xe->sriov.__mode = data && data->sriov_mode ? data->sriov_mode : XE_SRIOV_MODE_NONE; - err = fake_probe_info(xe, desc, data, &probed_info); + err = fake_probe_info(xe, data, &probed_info); if (err) return err; diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index b429cd9c48a7..00b2b5dfb8f6 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -835,14 +835,13 @@ static int xe_info_init_early(struct xe_device *xe, } static void xe_probe_tile_count(struct xe_device *xe, - const struct xe_device_desc *desc, struct xe_probed_info *probed_info) { struct xe_mmio *mmio; u8 tile_count; u32 mtcfg; - probed_info->tile_count = 1 + desc->max_remote_tiles; + probed_info->tile_count = 1 + xe->desc->max_remote_tiles; /* * Probe for tile count only for platforms that support multiple @@ -945,9 +944,10 @@ static struct xe_gt *alloc_media_gt(struct xe_tile *tile, } static int xe_probe_ips(struct xe_device *xe, - const struct xe_device_desc *desc, struct xe_probed_info *probed_info) { + const struct xe_device_desc *desc = xe->desc; + /* * If this platform supports GMD_ID, we'll detect the proper IP * descriptor to use from hardware registers. @@ -988,14 +988,13 @@ static int xe_probe_ips(struct xe_device *xe, * Probe from the hardware the info required by xe_info_init(). */ static int xe_probe_info(struct xe_device *xe, - const struct xe_device_desc *desc, struct xe_probed_info *probed_info) { int err; - xe_probe_tile_count(xe, desc, probed_info); + xe_probe_tile_count(xe, probed_info); - err = xe_probe_ips(xe, desc, probed_info); + err = xe_probe_ips(xe, probed_info); if (err) return err; @@ -1239,7 +1238,7 @@ static int __xe_pci_probe(struct pci_dev *pdev, const struct xe_device_desc *des if (err) return err; - err = xe_probe_info(xe, desc, &probed_info); + err = xe_probe_info(xe, &probed_info); if (err) return err; -- cgit v1.2.3