drm/v3d: Fix Indirect Dispatch configuration for V3D 7.1.6 and later
authorMaíra Canal <mcanal@igalia.com>
Wed, 9 Apr 2025 20:50:06 +0000 (17:50 -0300)
committerMaíra Canal <mcanal@igalia.com>
Thu, 10 Apr 2025 18:28:02 +0000 (15:28 -0300)
commitdcdae6e92d4e062da29235fe88980604595e3f0f
tree452b362455e19b8f3dd429dcfadc87f945b230c0
parent1d34597a1e23004c7dd0ab5f58ba1ef95fd9ded5
drm/v3d: Fix Indirect Dispatch configuration for V3D 7.1.6 and later

This commit is a resubmission of commit 1fe1c66274fb ("drm/v3d: Fix
Indirect Dispatch configuration for V3D 7.1.6 and later"), which was
accidentally reverted by commit 91dae758bdb8 ("Merge tag
'drm-misc-next-2024-08-01' of https://gitlab.freedesktop.org/drm/misc/kernel
into drm-next"), likely due to an unfortunate conflict resolution.

From the original commit message:

```
`args->cfg[4]` is configured in Indirect Dispatch using the number of
batches. Currently, for all V3D tech versions, `args->cfg[4]` equals the
number of batches subtracted by 1. But, for V3D 7.1.6 and later, we must not
subtract 1 from the number of batches.

Implement the fix by checking the V3D tech version and revision.

Fixes several `dEQP-VK.synchronization*` CTS tests related to Indirect Dispatch.
```

Fixes: 91dae758bdb8 ("Merge tag 'drm-misc-next-2024-08-01' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next")
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Link: https://lore.kernel.org/r/20250409205051.9639-1-mcanal@igalia.com
drivers/gpu/drm/v3d/v3d_sched.c