Guest User

Untitled

a guest
Jul 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. adreno_ringbuffer_waitspace(struct adreno_ringbuffer *rb, unsigned int numcmds,
  2. int wptr_ahead)
  3. {
  4.  
  5. if ((rb->wptr + numcmds) > (rb->sizedwords -
  6. GSL_RB_NOP_SIZEDWORDS))
  7. adreno_ringbuffer_waitspace(rb, numcmds, 1);
  8. } else {
  9. /* wptr behind rptr */
  10. if ((rb->wptr + numcmds) >= rb->rptr)
  11. adreno_ringbuffer_waitspace(rb, numcmds, 0);
  12. /* check for remaining space */
  13. /* reserve dwords for nop packet */
  14. if ((rb->wptr + numcmds) > (rb->sizedwords -
  15. GSL_RB_NOP_SIZEDWORDS))
  16. adreno_ringbuffer_waitspace(rb, numcmds, 1);
Add Comment
Please, Sign In to add comment