diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-22 16:55:19 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-22 16:55:19 -0400 |
| commit | b366b162a4442f694639d7622a0e00f0cfc6fee8 (patch) | |
| tree | 5c10d6f963467fd0c6e4c8596a5f95599f5596ff /kernel/gsp_phys_booter.h | |
| parent | 3855bb22d0400507def51881ebb688428963b7f9 (diff) | |
| download | open-iov-b366b162a4442f694639d7622a0e00f0cfc6fee8.tar.gz open-iov-b366b162a4442f694639d7622a0e00f0cfc6fee8.zip | |
r493 THE 3D-ENGINE WALL: serve the live GSP's own KGR static data to the guest
The X driver's nvSelect3DClass -> nv3dAllocDevice maps GR_GET_INFO index
SM_VERSION (0x0c) through an SM-version -> SPA-version table; the emulated
KGR_GET_INFO fill never set index 0x0c, so SM_VERSION read back as
SM_VERSION_NONE (0) and every Xorg/EGL session died at 'Failed to select a
3D engine' (the class list and the engine list were never the problem: the
X log carries neither 'Failed to determine graphics capabilities' nor
'Failed to determine engines list').
The physical backend already asks the LIVE GSP the real client's whole KGR
query set at mode-35 boot (gsp_phys_rmcall_user_lane_kgr_queries) and threw
the replies away. Retain them (generation-keyed, invalidated with the
backend static cache) and serve the identical bytes in the guest-side
GSP_RM_CONTROL dispatch for the same commands, so the guest's GL/3D stack
reads the device's true GR static values (SM_VERSION 0x75, warps, caps,
topology, ctx-buffer tables) instead of fabricated approximations. Falls
through to the emulated handlers unchanged when no capture exists (backend
not READY, other boot mode, cmd not captured) and never answers with more
bytes than the guest requested.
Diffstat (limited to 'kernel/gsp_phys_booter.h')
| -rw-r--r-- | kernel/gsp_phys_booter.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/gsp_phys_booter.h b/kernel/gsp_phys_booter.h index 80beb54..af74f7c 100644 --- a/kernel/gsp_phys_booter.h +++ b/kernel/gsp_phys_booter.h @@ -164,6 +164,16 @@ int gsp_phys_backend_static_wait(struct gsp_phys_backend_static_config *out, void gsp_phys_backend_static_invalidate(void); /* + * Mode-35 KGR static-data snapshots (see gsp_phys_booter.c): the live GSP's + * replies to the real client's KGR query set, captured at backend boot and + * served byte-identically by the guest-side emulation. Returns 0 with + * *out_len set, -ENODATA when cmd was not captured for the current backend + * generation, -ENOSPC when the snapshot exceeds dst_len, -EAGAIN when the + * backend is not READY. + */ +int gsp_phys_kgr_snap_get(u32 cmd, void *dst, u32 dst_len, u32 *out_len); + +/* * Run one fn1+fn65 probe on a READY backend to fill the static snapshot * cache. Takes gsp_phys_rm_lock inside (via gsp_phys_rm_probe), so it must * run on a work item, never inline under a caller-held rm lock or on the mdev |
