mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
fix(quest): keep KGSL submitted timestamps monotonic
An older submission that returns late must not hide a newer one. Contexts with user-generated timestamps can have gaps, so they keep the failed read instead of waiting once per integer.
This commit is contained in:
1 parent
1259abed5f
commit
3193a7a706
2 files changed
+22
-4
No files matched your search
@@ -125,6 +125,11 @@ int main(void) {
|
||||
retired = 6;
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 6);
|
||||
|
||||
submit(8);
|
||||
submit(7);
|
||||
retired = 8;
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 8);
|
||||
|
||||
create_context(3);
|
||||
retired = 0;
|
||||
waits = 0;
|
||||
@@ -134,6 +139,11 @@ int main(void) {
|
||||
bl_kgsl_track(mock, 42, IOCTL_KGSL_DRAWCTXT_DESTROY, &destroy, &rc);
|
||||
assert(read_timestamp(3, ×tamp) == -1 && errno == EACCES);
|
||||
|
||||
struct kgsl_drawctxt_create user = {.flags = KGSL_CONTEXT_USER_GENERATED_TS, .drawctxt_id = 3};
|
||||
bl_kgsl_track(mock, 42, IOCTL_KGSL_DRAWCTXT_CREATE, &user, &rc);
|
||||
waits = 0;
|
||||
assert(read_timestamp(3, ×tamp) == -1 && errno == EACCES && waits == 0);
|
||||
|
||||
errno = EACCES;
|
||||
assert(read_timestamp(5000, ×tamp) == -1 && errno == EACCES);
|
||||
|
||||
|
||||
Reference in new issue
Block a user