mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marco Pagani <marpagan@redhat.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Christian Koenig <christian.koenig@amd.com>,
	Javier Martinez Canillas <javierm@redhat.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org
Subject: Re: [PATCH v5] drm/test: add a test suite for GEM objects backed by shmem
Date: Thu, 22 Feb 2024 17:33:48 +0100	[thread overview]
Message-ID: <ad03c582-28b9-40b2-9c7b-8372ed5a05c2@redhat.com> (raw)
In-Reply-To: <fb2ac929-6650-444e-8f24-c9b1562d2bb3@roeck-us.net>



On 2024-02-22 16:52, Guenter Roeck wrote:
> Hi Marco,
> 
> On 2/22/24 07:32, Marco Pagani wrote:
>>
>>
>> On 2024-02-18 16:49, Guenter Roeck wrote:
>>> Hi,
>>>
>>> On Thu, Nov 30, 2023 at 06:14:16PM +0100, Marco Pagani wrote:
>>>> This patch introduces an initial KUnit test suite for GEM objects
>>>> backed by shmem buffers.
>>>>
>>>> Suggested-by: Javier Martinez Canillas <javierm@redhat.com>
>>>> Signed-off-by: Marco Pagani <marpagan@redhat.com>
>>>
>>> When running this in qemu, I get lots of warnings backtraces in the drm
>>> core.
>>>
>>> WARNING: CPU: 0 PID: 1341 at drivers/gpu/drm/drm_gem_shmem_helper.c:327
>>> WARNING: CPU: 0 PID: 1341 at drivers/gpu/drm/drm_gem_shmem_helper.c:173
>>> WARNING: CPU: 0 PID: 1341 at drivers/gpu/drm/drm_gem_shmem_helper.c:385
>>> WARNING: CPU: 0 PID: 1341 at drivers/gpu/drm/drm_gem_shmem_helper.c:211
>>> WARNING: CPU: 0 PID: 1345 at kernel/dma/mapping.c:194
>>> WARNING: CPU: 0 PID: 1347 at drivers/gpu/drm/drm_gem_shmem_helper.c:429
>>> WARNING: CPU: 0 PID: 1349 at drivers/gpu/drm/drm_gem_shmem_helper.c:445
>>>
>>> It looks like dma_resv_assert_held() asserts each time it is executed.
>>> The backtrace in kernel/dma/mapping.c is triggered by
>>>     if (WARN_ON_ONCE(!dev->dma_mask))
>>>         return 0;
>>> in __dma_map_sg_attrs().
>>>
>>> Is this a possible problem in the test code, or can it be caused by
>>> some limitations or bugs in the qemu emulation ? If so, do you have any
>>> thoughts or ideas what those limitations / bugs might be ?
>>
>> Hi Guenter,
>>
>> Thanks for reporting this issue. As you correctly noted, the warnings appear to
>> be caused by the dma_mask in the mock device being uninitialized. I'll send a
>> patch to fix it soon.
>>
> 
> Thanks a lot for the update.
> 
> In this context, the TTM unit tests fail as well in qemu, with worse result:
> It seems there is some bad cleanup after a failed test case, causing list
> corruptions in the drm core and ultimately a crash. I don't know if this
> is also caused by the missing dma_mask initialization.
> 

That's interesting. Which --arch argument are you using to run the
tests with QEMU?
Thanks,
Marco


  reply	other threads:[~2024-02-22 16:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 17:14 Marco Pagani
2023-12-01  8:38 ` Maxime Ripard
2024-02-18 15:49 ` Guenter Roeck
2024-02-22 15:32   ` Marco Pagani
2024-02-22 15:52     ` Guenter Roeck
2024-02-22 16:33       ` Marco Pagani [this message]
2024-02-22 18:25         ` Guenter Roeck

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=ad03c582-28b9-40b2-9c7b-8372ed5a05c2@redhat.com \
    --to=marpagan@redhat.com \
    --cc=airlied@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tzimmermann@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®