summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-15 18:26:08 -0500
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-15 18:26:08 -0500
commit65a63cf18abc242facc53c9f0f72ef4550fee332 (patch)
tree0f6ad22b3887dfe037e2dac8a47537ddca1aecf5 /kernel
parent5ff47a9546eb9580a1fbe56706abef2a4fb87aaa (diff)
downloadopen-iov-65a63cf18abc242facc53c9f0f72ef4550fee332.tar.gz
open-iov-65a63cf18abc242facc53c9f0f72ef4550fee332.zip
vgsp: eng69b - also capture the split SET_VERTEX_STREAM_A_LOCATION_A/B shape
The driver may bind the vertex stream as LOCATION_A(j) (0x1c04+j*0x10, [UPPER, LOWER]) plus LOCATION_B(j) (0x1c08+j*0x10, [LOWER]) instead of the combined [FORMAT, UPPER, LOWER] run at 0x1c00. Track the A upper byte per stream and publish the same sticky base for either shape, so eng69's release-window prepend works for both client encodings.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_sema_service.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index cafb0dc..20b52cb 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -9799,6 +9799,7 @@ static u8 svc_gl_shader_type[32] = {
* to the saved release window.
*/
static u64 svc_gl_vs_base[8];
+static u8 svc_gl_vs_hi[8]; /* LOCATION_A upper byte per stream */
static u32 svc_gl_vs_log;
u64 gsp_sema_gl_vs_base(u32 j)
@@ -10899,6 +10900,45 @@ static void svc_gl_field(u32 addr, u32 count, const u8 *data, u32 dlen)
* write then lands in the SAME HPA and the client's wait sees the
* real hardware completion.
*/
+ /*
+ * eng69: the driver may write the vertex-stream location as
+ * SET_VERTEX_STREAM_A_LOCATION_A(j) (0x1c04+j*0x10, [UPPER, LOWER])
+ * and _B(j) (0x1c08+j*0x10, [LOWER]) instead of the combined
+ * [FORMAT, UPPER, LOWER] run at 0x1c00. Record the sticky base for
+ * both shapes; the booter replays the pair with the DRAW window.
+ */
+ if (addr >= 0x1c04u && addr <= 0x1cf8u &&
+ ((addr & 0xfu) == 4u || (addr & 0xfu) == 8u)) {
+ u32 vj = ((addr & 0xfu) == 4u) ?
+ ((addr - 0x1c04u) >> 4) :
+ ((addr - 0x1c08u) >> 4);
+
+ if (vj < 8u) {
+ u64 vb = 0;
+
+ if ((addr & 0xfu) == 4u && count >= 1u) {
+ svc_gl_vs_hi[vj] = v[0] & 0xffu;
+ if (count >= 2u)
+ vb = ((u64)svc_gl_vs_hi[vj] << 32) |
+ (u64)(v[1] & 0xfffffffcu);
+ } else if ((addr & 0xfu) == 8u && count >= 1u &&
+ svc_gl_vs_hi[vj]) {
+ vb = ((u64)svc_gl_vs_hi[vj] << 32) |
+ (u64)(v[0] & 0xfffffffcu);
+ }
+ if (vb) {
+ if (READ_ONCE(svc_gl_vs_base[vj]) != vb &&
+ svc_gl_vs_log < 16u) {
+ svc_gl_vs_log++;
+ pr_info("sema-gl: VS-BIND j=%u base=0x%llx (split)\n",
+ vj, (unsigned long long)vb);
+ }
+ WRITE_ONCE(svc_gl_vs_base[vj], vb);
+ svc_gl_add_ptr(vb);
+ }
+ }
+ return;
+ }
if (addr == 0x1b00) {
if (count >= 2)
svc_gl_add_ptr(((u64)(v[0] & 0xffu) << 32) |