On Sat, Aug 22, 2009 at 2:20 PM, Pekka Paalanen<[email protected]> wrote: > On Sat, 22 Aug 2009 12:30:03 +0200 > Maarten Maathuis <[email protected]> wrote: > >> dma.max is adjusted to always have space for the jump. > > Ah, then that should be documented somewhere. > > But if that is the case, why: >>>> chan->dma.free = get - chan->dma.cur - 1; > > The extra space is not needed in this branch, since the available space > is limited by GET. If it is not locked up, GET will move forward and give > space. Otherwise, we would be in the get <= dma.cur branch. > > Assuming the jump command is at index dma.max, isn't dma.max the maximum > possible value for GET inside the ring? Therefore >>>> chan->dma.free = get - chan->dma.cur - 1; > should become equivalent to >>>> chan->dma.free = chan->dma.max - chan->dma.cur; > but there is the -1. > > Or do we observe GET == dma.max + 1 just before it actually jumps?
I guess it's just a safety, i do not think our get is ever read as dma.max + 1, because we read get before jumping. > > Or do we simply not know how it behaves and want to be safe? > > -- > Pekka Paalanen > http://www.iki.fi/pq/ > _______________________________________________ Nouveau mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/nouveau
