Donnie Fang wrote: > Sorry for omitting thomas. > > ---------- Forwarded message ---------- > From: *Donnie Fang* <[email protected] <mailto:[email protected]>> > Date: 2009/11/2 > Subject: how to make sure cache synchronization between GPU and CPU > To: [email protected] > <mailto:[email protected]> > > > After review TTM code, i found that when BO is in AGP aperture, the > cache attribute for this BO is often to be "WC". > So user mode page table will be "WC" of course. This guarantee that > data won't be cached by CPU and be visible to GPU correctly. > But how about the opposition in this case? How to guarantee that the > CPU see the correct data which may be cached by GPU? > Donnie,
Before a BO is accessed by the CPU, the driver will usually wait for BO idle, which means that the sync object associated with the BO has signaled. Before a sync object is singaled, the GPU should flush any caches that may be dirty as a result of the command stream represented by the sync object. The sync object is driver dependent. If signaling a sync object requires a GPU flush, a clever implementation will not try to signal a sync object until it really needs to. To aid this, there is the sync_object_flush() callback which indicates that there are cpu waiters for a sync object. These waiters won't necessarily call sync_object_wait(). /Thomas ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
