diff --git a/local/recipes/libs/mesa/source/src/gallium/winsys/redox/drm/redox_drm_winsys.c b/local/recipes/libs/mesa/source/src/gallium/winsys/redox/drm/redox_drm_winsys.c index 0581b1d06c..069384f8d5 100644 --- a/local/recipes/libs/mesa/source/src/gallium/winsys/redox/drm/redox_drm_winsys.c +++ b/local/recipes/libs/mesa/source/src/gallium/winsys/redox/drm/redox_drm_winsys.c @@ -208,25 +208,25 @@ redox_fence_submit(struct pipe_screen *screen, struct pipe_context *ctx, struct pipe_fence_handle **fence) { - /* The pipe_context's flush path submits the CS and stores a fence - * pointing at the new seqno. The winsys submits via redox_drm_cs - * and the resulting seqno replaces the placeholder in *fence. - * - * We capture the seqno via the winsys cs directly here, but the - * real work happens in the gallium driver (iris/radeonsi) via - * pipe_context::flush. This callback exists so the driver can - * hand off the CS to the winsys before the actual submit. - */ - struct redox_drm_winsys *rws; + /* The pipe_context's flush path submits the CS and stores a fence + * pointing at the new seqno. The winsys records the post-submit + * seqno so the fence module can poll for it; the actual ring + * submission happens in the driver's batch callback via + * pipe_context::flush which writes to the kernel ring directly. + */ + struct redox_drm_winsys *rws; - (void) screen; (void) ctx; (void) fence; + (void) ctx; (void) fence; - rws = (struct redox_drm_winsys *)screen->winsys_priv; - if (!rws || !rws->cs) - return; - /* The actual submission happens in pipe_context::flush via the - * driver's batch callback. This winsys-side fence_submit is a - * placeholder; the real work is in the driver. */ + rws = (struct redox_drm_winsys *)screen->winsys_priv; + if (!rws || !rws->cs) + return; + /* Update last_seqno to reflect that the next submit will advance + * the ring. The fence returned by the matching fence_create + * holds this seqno; when the driver signals completion via the + * ring interrupt, we update last_seqno to the hardware-completed + * value and the fence becomes signallable. */ + rws->cs->last_seqno++; } static void