lkml.org 
[lkml]   [2024]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] drm/test/shmem: set a DMA mask for the mock device
    Date
    Set a DMA mask for the mock device to avoid warnings generated in
    dma_map_sgtable().

    Reported-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Marco Pagani <marpagan@redhat.com>
    ---
    drivers/gpu/drm/tests/drm_gem_shmem_test.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/drivers/gpu/drm/tests/drm_gem_shmem_test.c b/drivers/gpu/drm/tests/drm_gem_shmem_test.c
    index 91202e40cde9..d691b29a4312 100644
    --- a/drivers/gpu/drm/tests/drm_gem_shmem_test.c
    +++ b/drivers/gpu/drm/tests/drm_gem_shmem_test.c
    @@ -341,11 +341,15 @@ static int drm_gem_shmem_test_init(struct kunit *test)
    {
    struct device *dev;
    struct drm_device *drm_dev;
    + int ret;

    /* Allocate a parent device */
    dev = drm_kunit_helper_alloc_device(test);
    KUNIT_ASSERT_NOT_ERR_OR_NULL(test, dev);

    + ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
    + KUNIT_EXPECT_EQ(test, ret, 0);
    +
    /*
    * The DRM core will automatically initialize the GEM core and create
    * a DRM Memory Manager object which provides an address space pool
    --
    2.43.2

    \
     
     \ /
      Last update: 2024-05-27 15:21    [W:4.573 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site