Hi

Am 24.07.26 um 11:38 schrieb [email protected]:
From: Shixiong Ou <[email protected]>

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 <[email protected]>
---
  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)


Reply via email to