Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

In commit d393acce7b3f ("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: Karolina Stolarek <karolina.stolarek@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/dbd83b01bc835d922c070ad1c5bd9023e631e6c4.1718192625.git.karolina.stolarek@intel.com

authored by

Karolina Stolarek and committed by
Arunpravin Paneer Selvam
dc501656 d0745846

+3
+3
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
··· 103 103 devs->dev = drm_kunit_helper_alloc_device(test); 104 104 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, devs->dev); 105 105 106 + /* Set mask for alloc_coherent mappings to enable ttm_pool_alloc testing */ 107 + devs->dev->coherent_dma_mask = -1; 108 + 106 109 devs->drm = __drm_kunit_helper_alloc_drm_device(test, devs->dev, 107 110 sizeof(*devs->drm), 0, 108 111 DRIVER_GEM);