video and usb driver (rk3588)

Michael Grunditz michael.grunditz at gmail.com
Thu Jan 19 11:48:21 CET 2023


On Thu, 19 Jan 2023 at 11:31, Stefan Kalkowski
<stefan.kalkowski at genode-labs.com> wrote:

> I'm pretty sure that Norman did not want you to set the DMA buffer to
> WRITE_COMBINED. Actually, this pseudo cache setting only exists for
> historical reasons, and will get removed as soon as possible from the
> public API. It is not really a 'cache feature'. It is not available on
> ARM, but is simply mapped to UNCACHED.
>
> That means you have set your DMA buffers to UNCACHED, which obviously
> solves cache maintainance problems to the price of performance.

OK. Norman suggested the functions in chaćhe.h (invalidate). However
no matter how I tried I got artifacts on screen. The best I could get was
a mouse pointer that leaves traces on the screen. I also notice that
moving pointer x-wise worked .. only y-wise didn't.

Here is a bit of the code:

Genode::addr_t invalid = (rect.x1()+(rect.y1()*(size.w())))*sizeof(Pixel);

Genode::addr_t invalidz =(((rect.h()-1)*(size.w()))+(rect.w()-1))*sizeof(Pixel))
 Genode::addr_t xxx = (Genode::addr_t)surface.addr();
  cache_clean_invalidate_data(xxx+invalid,(invalidz));


I guess the calculations are wrong.., if so please suggest what
I should change. I noticed that rect.w() and hight added 1 to them.
I have tried with -1 as above and without modification.

Michael



More information about the users mailing list