gpu/intel: avoid one-by-off in ring buffer

during wrap.

issue #4254
This commit is contained in:
Alexander Boettcher 2021-08-06 14:43:39 +02:00 committed by Christian Helmuth
parent 6c7bcdd32e
commit 66ac2dc635

View File

@ -112,7 +112,7 @@ class Igd::Ring_buffer
_dwords[index] = cmd.value;
_tail++;
if (_tail > _max) {
if (_tail >= _max) {
Genode::warning("ring buffer wrapped ",
"_tail: ", _tail, " ", "_max: ", _max);
_tail = 0;