On Sat, 15 Jun 2002, Linus Torvalds wrote: > > > On Sat, 15 Jun 2002, Keith Whitwell wrote: > > > > > > I also hope you do the toggle with a locked cycle so that you don't lose > > > any information.. > > > > Is this necessary if the toggle is really just a write? Jose, you're not > > doing a read-modify-write operation on that flag are you? > > That depends on the DMA engine too. For example, if the DMA engine _just_ > reads the commands from memory, then you should be able to just toggle the > flag by doing a regular read-modify-write (or, if you just keep track of > what the last word was, do just a write to avoid the uncached read) > > But in the USB example, the DMA engine will not just read the commands, it > will also update their status ("I've done this command"), and if you then > use a regular non-atomic read-modify-write, you may lose information (ie > the updated command status might get lost, and the DMA engine might end up > doing the command twice or something).
I forgot about that. The mach64 _does_ seem to update the word to indicate the bytes of the DMA buffer remaining to be processed. You write the number of bytes in the buffer and the DMA engine seems to decrement this number as it processes the buffer. We've seen this in our tests. It looks like we need to make this atomic and use the clear_bit as Jose suggested. > (Note that the USB command structure is likely _much_ more complex than > the mach64 command structure, so I suspect you may not have these kinds of > issues on the mach64 at all). > > > I suppose to some extent we're relying on the atomicity of the mach64's use of > > that flag as well -- I don't know if there are any obvious ways they could get > > it wrong (I assume they just fetch it once...) -- so that's probably not a > > huge problem. > > In that case, a simple write (with just the "end bit" cleared or whatever > the marker is) should be fine. > > Linus > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas - >http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink > > _______________________________________________ > Dri-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/dri-devel > -- Leif Delgass http://www.retinalburn.net _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel