From: Thomas Zimmermann <tzimmermann@suse.de>
To: Zenghui Yu <zenghui.yu@linux.dev>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
airlied@gmail.com, simona@ffwll.ch,
maarten.lankhorst@linux.intel.com, mripard@kernel.org
Subject: Re: [report] DMA-API: platform vgem: mapping sg segment longer than device claims to support [len=1048576] [max=65536]
Date: Fri, 20 Jun 2025 07:17:15 +0200 [thread overview]
Message-ID: <9dcdfec8-4551-4370-8695-80960e3c632f@suse.de> (raw)
In-Reply-To: <1506c0e7-85a3-47e4-9c70-77b01e30accb@linux.dev>
Hi
Am 19.06.25 um 18:07 schrieb Zenghui Yu:
> Hi Thomas,
>
> On 2025/6/19 00:25, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 18.06.25 um 18:03 schrieb Zenghui Yu:
>>> Hi all,
>>>
>>> Running the dmabuf-heap test [*] on mainline kernel triggers the
>>> following splat:
>>>
>>> ------------[ cut here ]------------
>>> DMA-API: platform vgem: mapping sg segment longer than device claims to support [len=1048576] [max=65536]
>> Thanks for the bug report. We have a possible fix in the latest drm-
>> misc-next tree. Does it work if use replace DRM_GEM_SHMEM_DRIVER_OPS
>> with DRM_GEM_SHMEM_DRIVER_OPS_NO_MAP_SGT at [1]?
>>
>> [1] https://elixir.bootlin.com/linux/v6.16-rc2/source/drivers/gpu/drm/vgem/vgem_drv.c#L118
> Thanks for the heads up! So I applied commit 660cd44659a0
> ("drm/shmem-helper: Import dmabuf without mapping its sg_table") [*] in
> my local tree, together with your suggestion:
>
> diff --git a/drivers/gpu/drm/vgem/vgem_drv.c
> b/drivers/gpu/drm/vgem/vgem_drv.c
> index 2752ab4f1c97..ba0d4e611bd2 100644
> --- a/drivers/gpu/drm/vgem/vgem_drv.c
> +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> @@ -115,7 +115,7 @@ static const struct drm_driver vgem_driver = {
> .num_ioctls = ARRAY_SIZE(vgem_ioctls),
> .fops = &vgem_driver_fops,
>
> - DRM_GEM_SHMEM_DRIVER_OPS,
> + DRM_GEM_SHMEM_DRIVER_OPS_NO_MAP_SGT,
> .gem_create_object = vgem_gem_create_object,
>
> .name = DRIVER_NAME,
>
> The warning message disappeared with that. Thanks again!
Thanks for testing. I'll attempt to get this change into upstream in the
near future.
Best regards
Thomas
>
> [*]
> https://gitlab.freedesktop.org/drm/kernel/-/commit/660cd44659a05c5fbfce6d2bb1ce448aa0f35594
>
> Zenghui
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
prev parent reply other threads:[~2025-06-20 5:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 16:03 Zenghui Yu
2025-06-18 16:25 ` Thomas Zimmermann
2025-06-19 16:07 ` Zenghui Yu
2025-06-20 5:17 ` Thomas Zimmermann [this message]
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=9dcdfec8-4551-4370-8695-80960e3c632f@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=zenghui.yu@linux.dev \
/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®