Le lundi 19 octobre 2009 à 14:42 +0100, Ilyes Gouta a écrit : > Hi, > > I'm dealing with a configuration where the video RAM is mapped into > the user-space application as a cached region. What happens if the > destination is the framebuffer (VRAM) which was locked and then > written to using the CPU? Don't we need a: > > if (allocation->accessed & CSAF_CPU_WRITE) > dfb_gfxcard_flush_texture_cache(); > > in dfb_surface_buffer_unlock() (surface_buffer.c) ? >
Hi Ilyes, DirectFB does not manage the cache stuff at unlock time but only at lock time. This is a "lazy" cache management. When accessing a buffer (read or write), DirectFB first looks at the last operation done on this buffer, and according to this last operation it knows if there is some synchronization stuff to do. If you're interested in, have a look at the dfb_surface_buffer_lock function. Espacialy the "Manage access interlocks" part. In the end, it remains to your gfxdriver to implement the FlushReadCache function to unsure the read cache is flushed when requested by DirectFB. Regards, -- Lionel Landwerlin <llandwer...@gmail.com> _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev