video and usb driver (rk3588)
Norman Feske
norman.feske at genode-labs.com
Fri Jan 13 11:53:25 CET 2023
Hi Michael,
>> BTW, the official way to obtain a contiguous RAM buffer (for the use as
>> framebuffer) is platform driver. For a 'Dma_buffer' object, you can
>> request the 'dma_addr' [2] to be poked into the graphics device register
>> for the framebuffer base address.
>>
> Will try this after every other option :-) I doubt it will solve
> alignment fault.
here is my guess:
- The boot loader sets up the framebuffer in a known RAM area.
- This framebuffer is mapped as uncached memory, similar one would map
an memory-mapped I/O resource.
- Unaligned memory accesses by the user land are allowed in principle,
but
- Unaligned memory accesses to uncached memory are always forbidden.
- The blitting code assumes that unaligned accesses at 32-bit boundaries
are fine.
- Your boot-fb driver reuses the original framebuffer mapping,
hence it inherits the way of how the framebuffer is originally mapped.
Consequently, the blitting code issues unaligned bus accesses to
uncached memory.
If this is the case, the use of a fresh allocated DMA buffer using the
platform driver would indeed solve this issue because the blitting code
would not touch uncached memory.
Should this work and you see caching artifacts on screen, you may need
to explicitly call 'cache_clean_invalidate_data' to write back the pixel
data to RAM after blitting.
Keeping my fingers crossed...
Cheers
Norman
--
Dr.-Ing. Norman Feske
Genode Labs
https://www.genode-labs.com · https://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users
mailing list