summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-08 18:30:14 -0500
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-08 18:30:14 -0500
commitdf332e75fc70f81430b146ccb23481f80b89e8d3 (patch)
tree9c9b41adb256742c5720ca474e90a344df2b6a13 /kernel
parent6cd260b87557e881af1e47f82ff3f0df79d30e44 (diff)
downloadopen-iov-df332e75fc70f81430b146ccb23481f80b89e8d3.tar.gz
open-iov-df332e75fc70f81430b146ccb23481f80b89e8d3.zip
vgsp-disp: map class 0xc57b to its real control window (window-imm)
The header labelled 0xc57b CURSOR and mapped it to the cursor-PIO block at 0x6d8000+n*0x1000, but 0xc57b is the immediate-mode window class whose control window is 0x690000+(n+32)*0x1000 = 0x6d0000+n*0x1000 (0xc57a is the PIO cursor channel, valid=0). The engine therefore polled the wrong window for every 0xc57b channel: their PUT was never seen, no UPDATE ever completed, and r1638's GZDoom-triggered mode set left X spinning in an RM ioctl after the window-imm flip. Rename the constants (WINDOW_IMM 0xc57b, CURSOR_PIO 0xc57a) and return the correct control offsets; cursor-PIO keeps 0x6d8000+n*0x1000.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_display_engine.c11
-rw-r--r--kernel/include/gsp_display_engine.h4
2 files changed, 12 insertions, 3 deletions
diff --git a/kernel/gsp_display_engine.c b/kernel/gsp_display_engine.c
index 3e0c162..f96fc6a 100644
--- a/kernel/gsp_display_engine.c
+++ b/kernel/gsp_display_engine.c
@@ -310,7 +310,16 @@ static u32 gsp_disp_ctl_offset(u32 hclass, u32 instance)
return GSP_DISP_CORE_CTL_BASE;
case GSP_DISP_CLASS_WINDOW:
return GSP_DISP_WIN_CTL_BASE + instance * 0x1000;
- case GSP_DISP_CLASS_CURSOR:
+ case GSP_DISP_CLASS_WINDOW_IMM:
+ /*
+ * Immediate-mode window channels sit 32 windows above the
+ * ordinary window block (0x690000 + (instance+32)*0x1000
+ * = 0x6d0000 + instance*0x1000). The old mapping put them
+ * in the cursor-PIO block at 0x6d8000, so their PUT was
+ * never seen and their flips never completed (r1638).
+ */
+ return GSP_DISP_WIN_CTL_BASE + (instance + 32) * 0x1000;
+ case GSP_DISP_CLASS_CURSOR_PIO:
return GSP_DISP_CURS_CTL_BASE + instance * 0x1000;
default:
return 0;
diff --git a/kernel/include/gsp_display_engine.h b/kernel/include/gsp_display_engine.h
index aa0ad98..8b62c21 100644
--- a/kernel/include/gsp_display_engine.h
+++ b/kernel/include/gsp_display_engine.h
@@ -36,8 +36,8 @@ struct nv_vgpu_device;
#define GSP_DISP_CLASS_CORE 0xc57d
#define GSP_DISP_CLASS_WINDOW 0xc57e
-#define GSP_DISP_CLASS_CURSOR 0xc57b
-#define GSP_DISP_CLASS_BASE 0xc57a
+#define GSP_DISP_CLASS_WINDOW_IMM 0xc57b /* immediate-mode window */
+#define GSP_DISP_CLASS_CURSOR_PIO 0xc57a /* PIO cursor (valid=0) */
/* Channel was announced by NV2080_CTRL_CMD_INTERNAL_DISPLAY_CHANNEL_PUSHBUFFER. */
void gsp_disp_engine_channel_add(struct nv_vgpu_device *vgpu, u32 hclass,