From: sashiko-bot@kernel.org
To: saad <primecoder8@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: use drm_gem_ttm_dumb_map_offset() for dumb_map_offset
Date: Thu, 05 Nov 2026 13:35:41 +0000 [thread overview]
Message-ID: <sashiko-outbox-199163@kernel.org> (raw)
In-Reply-To: <20261105-amdgpu-dumb-map-offset-v1-1-7299d94ede11@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] drm/amdgpu: amdgpu_mode_dumb_mmap() left non-static after callback removal
--
commit 20dcb7dcf18d16b07933bf4a8650d805f6e17934
Author: saad <primecoder8@gmail.com>
drm/amdgpu: use drm_gem_ttm_dumb_map_offset() for dumb_map_offset
This commit switches amdgpu_kms_driver and amdgpu_partition_driver from the
custom amdgpu_mode_dumb_mmap() callback to the generic TTM helper
drm_gem_ttm_dumb_map_offset() for .dumb_map_offset.
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 731fe8f9e9228..134d2fe4beae8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
[ ... ]
> @@ -3177,7 +3178,7 @@ const struct drm_driver amdgpu_partition_driver = {
> .ioctls = amdgpu_ioctls_kms,
> .num_ioctls = ARRAY_SIZE(amdgpu_ioctls_kms),
> .dumb_create = amdgpu_mode_dumb_create,
> - .dumb_map_offset = amdgpu_mode_dumb_mmap,
> + .dumb_map_offset = drm_gem_ttm_dumb_map_offset,
[Severity: Low]
This isn't a bug, but now that neither amdgpu_kms_driver nor
amdgpu_partition_driver in drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c uses
amdgpu_mode_dumb_mmap(), it has no callers outside
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c:
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c:
int amdgpu_mode_dumb_mmap(struct drm_file *filp,
struct drm_device *dev,
uint32_t handle, uint64_t *offset_p)
{
...
}
int amdgpu_gem_mmap_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{
union drm_amdgpu_gem_mmap *args = data;
uint32_t handle = args->in.handle;
memset(args, 0, sizeof(*args));
return amdgpu_mode_dumb_mmap(filp, dev, handle, &args->out.addr_ptr);
}
Since amdgpu_gem_mmap_ioctl() is now the sole caller of
amdgpu_mode_dumb_mmap(), and the unused dev parameter and mode_dumb name only
existed for the .dumb_map_offset callback signature, should
amdgpu_mode_dumb_mmap() be folded directly into amdgpu_gem_mmap_ioctl() (or at
least made static) and its prototype removed from
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261105-amdgpu-dumb-map-offset-v1-1-7299d94ede11@gmail.com?part=1
next prev parent reply other threads:[~2026-11-05 13:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 13:15 [PATCH] drm/amdgpu: use drm_gem_ttm_dumb_map_offset() for dumb_map_offset saad
2026-11-05 13:35 ` sashiko-bot [this message]
2026-11-06 7:35 ` primecoder 99
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=sashiko-outbox-199163@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=primecoder8@gmail.com \
--cc=sashiko-reviews@lists.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;
as well as URLs for NNTP newsgroup(s).