diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-11-16 13:46:14 -0500 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-11-16 13:46:14 -0500 |
| commit | 60b1bf75002eb33dc46f7c2354d0c6f3d39aec99 (patch) | |
| tree | 5768ce6e7b2bae2a535ddbcbaeeb3ef1ca9658b3 /kernel | |
| parent | 9c09d3bf22a469b1d5a6d73bc65baf87d2770f21 (diff) | |
| download | open-iov-60b1bf75002eb33dc46f7c2354d0c6f3d39aec99.tar.gz open-iov-60b1bf75002eb33dc46f7c2354d0c6f3d39aec99.zip | |
vgsp: eng89h - accept draw markers inside a multi-method run
c940-c945: VP-METHOD 0x1618 op=1 in push 0x400108c while every
RT-ADMIT-BLOCK kept has_draw=0. The marker sits inside a counted INC run,
not at a run header, so the guard never saw it. Accept a marker covered
by the run's method span (m <= target < m + cnt*4 + 4) for the 0x1618 /
0xd78 / 0x3910 family in ops 1/3/5, keeping the op=4/5 exact match.
Context: c944 was the first boot with surface stores - GUEST-WIT 601/2027
pages changed at va=0x120400000 post=0xff000000 on the X/2D lane - so the
engine does write the surface; the beef draw window is the remaining
admission gate.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/gsp_sema_service.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index 140e8e7..8cc7aaa 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -12231,22 +12231,33 @@ static bool svc_gl_win_has_draw(const u8 *buf, u32 len) if (!buf) return false; for (i = 0; i + 4u <= len; i += 4u) { - u32 w, op, m; + u32 w, op, cnt, m; memcpy(&w, buf + i, 4); op = (w >> 29) & 7u; + cnt = (w >> 16) & 0xfffu; + m = (w & 0x1fffu) << 2; /* * The client encodes these real draw markers as different * run forms: CALL_MME_MACRO(34) 0x3910 arrives as ONE_INCR - * (op 5, header 0xa00a0e44) and BEGIN 0x1618 as an immd13 - * (op 4). Accept the method-stream ops rather than only the - * INC form; data words that alias these methods are rare and - * the per-window bind validity is not required on this path. - */ - if (op != 1u && op != 3u && op != 4u && op != 5u) - continue; - m = (w & 0x1fffu) << 2; - if (m == 0x1618u || m == 0x0d78u || m == 0x3910u) + * (op 5, header 0xa00a0e44), BEGIN 0x1618 as an immd13 (op 4) + * or inside a multi-method INC run (c940-c945: VP-METHOD + * 0x1618 op=1 in push 0x400108c while has_draw stayed 0). + * Accept the method-stream ops and a marker covered by the + * run's method span (+4 for the parser's first-data-word + * convention); data words that alias these methods are rare + * and the per-window bind validity is not required here. + */ +#define SVC_GL_MARK_COVERED(m, cnt, t) \ + ((m) <= (t) && (t) < (m) + (cnt) * 4u + 4u) + if ((op == 1u || op == 3u || op == 5u) && cnt && + (SVC_GL_MARK_COVERED(m, cnt, 0x1618u) || + SVC_GL_MARK_COVERED(m, cnt, 0x0d78u) || + SVC_GL_MARK_COVERED(m, cnt, 0x3910u))) + return true; +#undef SVC_GL_MARK_COVERED + if ((op == 1u || op == 3u || op == 4u || op == 5u) && + (m == 0x1618u || m == 0x0d78u || m == 0x3910u)) return true; } return false; |
