From: Thomas Zimmermann <tzimmermann@suse.de>
To: oushixiong1025@163.com
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Shixiong Ou <oushixiong@kylinos.cn>
Subject: Re: [PATCH 2/2] drm/udl: Use iosys_map getter for virtual address
Date: Fri, 24 Jul 2026 13:29:33 +0200 [thread overview]
Message-ID: <86a34ec5-ec73-45e8-997f-c7926e235d4d@suse.de> (raw)
In-Reply-To: <20260724093808.776138-2-oushixiong1025@163.com>
Hi
Am 24.07.26 um 11:38 schrieb oushixiong1025@163.com:
> From: Shixiong Ou <oushixiong@kylinos.cn>
>
> Replace direct access to map->vaddr with the new iosys_map_get_vaddr()
> helper function. This properly uses the iosys_map abstraction layer
> instead of directly accessing structure members.
>
> Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
> ---
> drivers/gpu/drm/udl/udl_modeset.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
> index 289711035b67..06a3a4d149b9 100644
> --- a/drivers/gpu/drm/udl/udl_modeset.c
> +++ b/drivers/gpu/drm/udl/udl_modeset.c
> @@ -207,12 +207,16 @@ static int udl_handle_damage(struct drm_framebuffer *fb,
> {
> struct drm_device *dev = fb->dev;
> struct udl_device *udl = to_udl(dev);
> - void *vaddr = map->vaddr; /* TODO: Use mapping abstraction properly */
> + void *vaddr;
> int i, ret;
> char *cmd;
> struct urb *urb;
> int log_bpp;
>
> + vaddr = iosys_map_get_vaddr(map);
> + if (!vaddr)
> + return -EFAULT;
> +
This doesn't work in practice because we don't handle the vmap_iomem
correctly. You'll get NULL now, when before it was treated as a regular
address.
The current type aliasing works until we have proper import handling of
I/O-mem addresses.
Best regards
Thomas
> ret = udl_log_cpp(fb->format->cpp[0]);
> if (ret < 0)
> return ret;
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
prev parent reply other threads:[~2026-07-24 11:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 9:38 [PATCH 1/2] iosys-map: Add getter functions for virtual addresses oushixiong1025
2026-07-24 9:38 ` [PATCH 2/2] drm/udl: Use iosys_map getter for virtual address oushixiong1025
2026-07-24 11:29 ` 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=86a34ec5-ec73-45e8-997f-c7926e235d4d@suse.de \
--to=tzimmermann@suse.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oushixiong1025@163.com \
--cc=oushixiong@kylinos.cn \
/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®