From a47a2124d4c8110e9cfb6fb500a108bcea7becb4 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Mon, 9 Nov 2026 13:29:47 -0500 Subject: vgsp-disp: only post the channel event on a real FINISHED notifier write The UPDATE path posted the channel completion event on every UPDATE, including armed=0 updates where no notifier was written (r1665 journal: armed=0 `-> none` still posts). Those events drive the DDX's NVKMS FLIP_OCCURRED handler (nvidia_drv.so 0xaee70), which reaps the four notifier slots of every layer and has a fixed-point retry when the completed layer does not match the first DPY object's layer; with non-flip updates raising the event, Xorg spun there at 100 %. Gate the post on `wrote` (armed + notifier written + FINISHED). r1666: the 0xaee70 spin is gone from perf; Xorg moved on to a bounded XAA action-list scan (nvidia_drv.so 0x4dc9c0, nvXAAHandleActionList) plus do_vfs_ioctl/schedule, i.e. the server main loop is no longer wedged in the flip reaper. --- kernel/gsp_display_engine.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/gsp_display_engine.c b/kernel/gsp_display_engine.c index c7c9dca..a6dd11c 100644 --- a/kernel/gsp_display_engine.c +++ b/kernel/gsp_display_engine.c @@ -1103,8 +1103,14 @@ static void gsp_disp_method(struct nv_vgpu_device *vgpu, * NV01_EVENT on the channel object and the real engine (via * RM) signals it when the update's notifier is written. This * is what completes nvidia-drm flips and X GLX syncs. + * + * r1666: only a REAL FINISHED transition may raise the event. + * Posting on every UPDATE (armed=0 / no notifier write) made + * the DDX's NVKMS FLIP_OCCURRED handler (nvidia_drv.so + * 0xaee70) reap stale notifier slots and hit its fixed-point + * layer retry (Xorg spun there at 100 % in r1665). */ - if (gsp_disp_events && ch->h_object) { + if (gsp_disp_events && ch->h_object && wrote) { int rc = gsp_rm_post_channel_event(vgpu, ch->h_object); if (!rc) { -- cgit v1.2.3