freedreno/a6xx: Fix mh31 intermittent faults
authorRob Clark <robdclark@chromium.org>
Wed, 2 Jun 2021 16:41:13 +0000 (09:41 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 3 Jun 2021 03:29:04 +0000 (03:29 +0000)
It appears that CP can over-fetch push constants slightly.  While it
otherwise has no problem fetching from an alignment of 32 bytes, if that
32 bytes is at the end of a mapped bo, this can trigger fetching up to
32 bytes beyond the patch, triggering an iova fault.  While otherwise
"harmless", it is probably better to not have random intermittent
faults.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11142>

src/gallium/drivers/freedreno/freedreno_screen.c

index 9f47b6d..aa4e987 100644 (file)
@@ -318,7 +318,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return is_a4xx(screen);
 
    case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
-      return is_a2xx(screen) ? 64 : 32;
+      return 64;
 
    case PIPE_CAP_GLSL_FEATURE_LEVEL:
    case PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY: