Re: [Intel-gfx] [drm-tip:drm-tip 4/8] drivers/gpu/drm/solomon/ssd130x.c:451:18: error: incomplete definition of type 'struct dma_buf_map'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Am 17.02.22 um 10:25 schrieb Lucas De Marchi:
[...]
$ git grep "TODO: Use mapping abstraction properly" | wc -l
15

If you point me the proper way, I'll be happy to post a patch to change it.

It depends what you want to do with the address. There are APIs to copy
from/to. I also added a few to read/write to an offset. It seems the
problem here is that you need to pass that to a helper,
drm_fb_xrgb8888_to_mono_reversed(). I think the proper solution would be
to change the helper to accept an iosys_map* as argument rather than a
void*.

There are several of these TODOs in the DRM code, because our format-conversion helpers are still from the time before dma_buf_map/iosys_map. The easiest workaround is to take the raw pointer and give it to them. One day, DRM's public blit and conversion interfaces will take an iosys_map and handle the different memory types internally.

Javierm, that's when the internal _line() helpers will become useful. They can use system memory directly, and for I/O memory the blit/conversion helpers allocate an internal temporary per-line buffer. The code you made for the new driver has this designed outlined already.

Best regards
Thomas


Lucas De Marchi


Lucas De Marchi


[0]
From f8268e5b15c321b56862904665f5e312bf50d397 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@xxxxxxxxxx>
Date: Thu, 17 Feb 2022 09:52:37 +0100
Subject: [PATCH] drm/solomon: Rename dma-buf-map to iosys-map

Commit 7938f4218168 ("dma-buf-map: Rename to iosys-map") renamed the struct dma_buf_map to struct iosys_map, but this change wasn't present in drm-misc
when the ssd130x driver was merged, and it created a merge conflict.

Fix this by renaming the data structure type in the ssd130x driver.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Suggested-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
Signed-off-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>
---
drivers/gpu/drm/solomon/ssd130x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
index 19697c8c5a2c..92c1902f53e4 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -444,7 +444,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x)
    kfree(buf);
}

-static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct dma_buf_map *map, +static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct iosys_map *map,

I added this as a fixup to dim, so it's applied on the merge commit. I
think it would be preferred to have this in the merge resolution when
drm-intel propagates all the way back to drm-misc


                struct drm_rect *rect)
{
    struct ssd130x_device *ssd130x = drm_to_ssd130x(fb->dev);
--
2.34.1

Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat


--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux