Mesa (staging/20.2): winsys/amdgpu: remove incorrect assertion check against max_check_space_size

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 2 16:09:40 UTC 2020


Module: Mesa
Branch: staging/20.2
Commit: a7e169380dadf34a9861e92740a9304aec8a7d82
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a7e169380dadf34a9861e92740a9304aec8a7d82

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Oct  9 20:01:16 2020 -0400

winsys/amdgpu: remove incorrect assertion check against max_check_space_size

Fixes: 114a899cc89fae "winsys/amdgpu: cs_check_space sets the minimum IB size for future IBs"

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7056>
(cherry picked from commit 095ee8f867bb6ac2dbf143579a694fcb9f9e6acd)

---

 .pick_status.json                         | 2 +-
 src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index b960ceffaf5..65b651f79c9 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -490,7 +490,7 @@
         "description": "winsys/amdgpu: remove incorrect assertion check against max_check_space_size",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "114a899cc89faea1946ccc3aafbadc25a070f08e"
     },
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index abfe4940541..ddc52f0b723 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -810,7 +810,6 @@ static bool amdgpu_get_new_ib(struct amdgpu_winsys *ws, struct amdgpu_cs *cs,
 
    ib_size = ib->big_ib_buffer->size - ib->used_ib_space;
    ib->base.current.max_dw = ib_size / 4 - amdgpu_cs_epilog_dws(cs);
-   assert(ib->base.current.max_dw >= ib->max_check_space_size / 4);
    ib->base.gpu_address = info->va_start;
    return true;
 }
@@ -1178,7 +1177,6 @@ static bool amdgpu_cs_check_space(struct radeon_cmdbuf *rcs, unsigned dw,
 
    ib->base.current.buf = (uint32_t*)(ib->ib_mapped + ib->used_ib_space);
    ib->base.current.max_dw = ib->big_ib_buffer->size / 4 - cs_epilog_dw;
-   assert(ib->base.current.max_dw >= ib->max_check_space_size / 4);
    ib->base.gpu_address = va;
 
    amdgpu_cs_add_buffer(&cs->main.base, ib->big_ib_buffer,



More information about the mesa-commit mailing list