From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Karolina Stolarek <karolina.stolarek@intel.com>,
dri-devel@lists.freedesktop.org
Cc: "Christian König" <christian.koenig@amd.com>,
"Matthew Auld" <matthew.auld@intel.com>,
"Amaranath Somalapuram" <asomalap@amd.com>
Subject: Re: [PATCH v11 03/10] drm/ttm/tests: Set DMA mask in KUnit device
Date: Wed, 17 Apr 2024 15:54:46 +0200 [thread overview]
Message-ID: <135f0815-82cc-48ec-8df9-e67864bd2db9@linux.intel.com> (raw)
In-Reply-To: <b73b911c18c2d1a0eab954e6dc53cbc10461758c.1713357042.git.karolina.stolarek@intel.com>
On 4/17/2024 3:03 PM, Karolina Stolarek wrote:
> 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>
> ---
> drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
> index 7b7c1fa805fc..cb1cd676f8ae 100644
> --- a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
> +++ b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
> @@ -98,6 +98,9 @@ struct ttm_test_devices *ttm_test_devices_basic(struct kunit *test)
> devs->dev = drm_kunit_helper_alloc_device(test);
> 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;
DMA_BIT_MASK() would be nice here. I wonder if it make sense to move
that to kunit device related calls, anyway this is:
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> +
> devs->drm = __drm_kunit_helper_alloc_drm_device(test, devs->dev,
> sizeof(*devs->drm), 0,
> DRIVER_GEM);
next prev parent reply other threads:[~2024-04-17 13:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 13:03 [PATCH v11 00/10] Improve test coverage of TTM Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 01/10] drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk Karolina Stolarek
2024-04-18 8:15 ` Christian König
2024-04-18 8:21 ` Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 02/10] drm/ttm/tests: Delete unnecessary config option Karolina Stolarek
2024-04-17 14:07 ` Nirmoy Das
2024-04-17 13:03 ` [PATCH v11 03/10] drm/ttm/tests: Set DMA mask in KUnit device Karolina Stolarek
2024-04-17 13:54 ` Nirmoy Das [this message]
2024-04-17 13:03 ` [PATCH v11 04/10] drm/ttm/tests: Use an init function from the helpers lib Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 05/10] drm/ttm/tests: Test simple BO creation and validation Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 06/10] drm/ttm/tests: Add tests with mock resource managers Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 07/10] drm/ttm/tests: Add test cases dependent on fence signaling Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 08/10] drm/ttm/tests: Add eviction testing Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 09/10] drm/ttm/tests: Add tests for ttm_tt_populate Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 10/10] drm/ttm/tests: Add TODO file Karolina Stolarek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=135f0815-82cc-48ec-8df9-e67864bd2db9@linux.intel.com \
--to=nirmoy.das@linux.intel.com \
--cc=asomalap@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=karolina.stolarek@intel.com \
--cc=matthew.auld@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.