Merge "msm: kgsl: Fix the ringbuffer wrap around logic"
This commit is contained in:
commit
c19e021f99
1 changed files with 12 additions and 5 deletions
|
@ -158,11 +158,18 @@ unsigned int *adreno_ringbuffer_allocspace(struct adreno_ringbuffer *rb,
|
||||||
return RB_HOSTPTR(rb, ret);
|
return RB_HOSTPTR(rb, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmds = RB_HOSTPTR(rb, rb->_wptr);
|
/*
|
||||||
*cmds = cp_packet(adreno_dev, CP_NOP,
|
* There isn't enough space toward the end of ringbuffer. So
|
||||||
KGSL_RB_DWORDS - rb->_wptr - 1);
|
* look for space from the beginning of ringbuffer upto the
|
||||||
|
* read pointer.
|
||||||
rb->_wptr = 0;
|
*/
|
||||||
|
if (dwords < rptr) {
|
||||||
|
cmds = RB_HOSTPTR(rb, rb->_wptr);
|
||||||
|
*cmds = cp_packet(adreno_dev, CP_NOP,
|
||||||
|
KGSL_RB_DWORDS - rb->_wptr - 1);
|
||||||
|
rb->_wptr = dwords;
|
||||||
|
return RB_HOSTPTR(rb, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rb->_wptr + dwords < rptr) {
|
if (rb->_wptr + dwords < rptr) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue