From: Zenghui Yu <zenghui.yu@linux.dev>
To: Thomas Zimmermann <tzimmermann@suse.de>
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 00:07:04 +0800 [thread overview]
Message-ID: <1506c0e7-85a3-47e4-9c70-77b01e30accb@linux.dev> (raw)
In-Reply-To: <17d14458-a035-4793-8f19-38f4405e02a3@suse.de>
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!
[*]
https://gitlab.freedesktop.org/drm/kernel/-/commit/660cd44659a05c5fbfce6d2bb1ce448aa0f35594
Zenghui
next prev parent reply other threads:[~2025-06-19 16:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 16:03 [report] DMA-API: platform vgem: mapping sg segment longer than device claims to support [len=1048576] [max=65536] Zenghui Yu
2025-06-18 16:25 ` Thomas Zimmermann
2025-06-19 16:07 ` Zenghui Yu [this message]
2025-06-20 5:17 ` Thomas Zimmermann
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=1506c0e7-85a3-47e4-9c70-77b01e30accb@linux.dev \
--to=zenghui.yu@linux.dev \
--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=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 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.