[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'

Javier Martinez Canillas javierm at redhat.com
Thu Feb 17 09:51:54 UTC 2022

On 2/17/22 10:41, Thomas Zimmermann wrote:
> 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.

Yes, as Lucas mentioned there are copy from/to helpers but didn't want to
use it because would be another unnecessary copy just to avoid to take the
map->vaddr raw pointer and pass directly to the format-conversion helper.

> 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.

Indeed. I understand now what you meant when proposing to add those helpers.
> Best regards
> Thomas
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat

More information about the Intel-gfx mailing list