mirror of
https://github.com/torvalds/linux.git
synced 2026-05-03 22:12:32 -04:00
drm/xe/kunit: Move fake pci data to test-priv
Instead of passing as parameter to xe_pci_fake_device_init(), use test->priv to pass parameters down the call stack. The main advantage is that then the data is readily available on other functions by using kunit_get_current_test(). This is a preparation to fix the initialization of fake devices when they were supposed to be using GMD_ID. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20231129232807.1499826-4-lucas.demarchi@intel.com Link: https://lore.kernel.org/r/20231205133954.2089546-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
committed by
Rodrigo Vivi
parent
1da0e58198
commit
5b2a63b40d
@@ -281,7 +281,9 @@ static int xe_rtp_test_init(struct kunit *test)
|
||||
drm, DRIVER_GEM);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xe);
|
||||
|
||||
ret = xe_pci_fake_device_init_any(xe);
|
||||
/* Initialize an empty device */
|
||||
test->priv = NULL;
|
||||
ret = xe_pci_fake_device_init(xe);
|
||||
KUNIT_ASSERT_EQ(test, ret, 0);
|
||||
|
||||
xe->drm.dev = dev;
|
||||
|
||||
Reference in New Issue
Block a user