Commit dc501656 authored by Karolina Stolarek's avatar Karolina Stolarek Committed by Arunpravin Paneer Selvam

drm/ttm/tests: Set DMA mask in KUnit device

In commit d393acce ("drm/tests: Switch to kunit devices"),
DRM test helpers migrated away from using a dummy platform driver
in favour of KUnit device. This means that DMA masks for the device
are not set but are required by ttm_pool_alloc tests.

Set the DMA mask for coherent mappings to unblock testing.
Signed-off-by: default avatarKarolina Stolarek <karolina.stolarek@intel.com>
Reviewed-by: default avatarNirmoy Das <nirmoy.das@intel.com>
Signed-off-by: default avatarArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/dbd83b01bc835d922c070ad1c5bd9023e631e6c4.1718192625.git.karolina.stolarek@intel.com
parent d0745846
...@@ -103,6 +103,9 @@ struct ttm_test_devices *ttm_test_devices_basic(struct kunit *test) ...@@ -103,6 +103,9 @@ struct ttm_test_devices *ttm_test_devices_basic(struct kunit *test)
devs->dev = drm_kunit_helper_alloc_device(test); devs->dev = drm_kunit_helper_alloc_device(test);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, devs->dev); KUNIT_ASSERT_NOT_ERR_OR_NULL(test, devs->dev);
/* Set mask for alloc_coherent mappings to enable ttm_pool_alloc testing */
devs->dev->coherent_dma_mask = -1;
devs->drm = __drm_kunit_helper_alloc_drm_device(test, devs->dev, devs->drm = __drm_kunit_helper_alloc_drm_device(test, devs->dev,
sizeof(*devs->drm), 0, sizeof(*devs->drm), 0,
DRIVER_GEM); DRIVER_GEM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment