freedreno/drm: don't pass thru 'DUMP' flag on older kernels
authorRob Clark <robdclark@chromium.org>
Sun, 17 May 2020 20:01:30 +0000 (13:01 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 18 May 2020 19:00:47 +0000 (19:00 +0000)
"softpin" mode was introduced in the same kernel as the 'DUMP' flag.  So
if we are using the legacy non-softpin path, clear the dump flag.  OTOH
the 'DUMP' flag isn't quite so needed on older kernels, since we would
get all cmdstream, even SDS stateobjs, dumped regardless, as they would
have cmd table entries.

Fixes: b2c23b1e48f ("freedreno: Mark all ringbuffer BOs as to be dumped on crash.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5081>

src/freedreno/drm/msm_ringbuffer.c

index 2ff4a3dfc56959198bf82c51abeffc1923a8389e..0538859201a9e74c4d145eea864d522c814c2880 100644 (file)
@@ -153,7 +153,8 @@ append_bo(struct msm_submit *submit, struct fd_bo *bo)
                        idx = APPEND(submit, submit_bos);
                        idx = APPEND(submit, bos);
 
-                       submit->submit_bos[idx].flags = bo->flags;
+                       submit->submit_bos[idx].flags = bo->flags &
+                                       (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE);
                        submit->submit_bos[idx].handle = bo->handle;
                        submit->submit_bos[idx].presumed = 0;