freedreno/drm: Fix ring_heap flags

RING_FLAGS has FD_BO_HINT_COMMAND so we can't mask out the _FD_BO_HINTS.

Fixes: a3fb2b07aa ("freedreno: Add bo usage hints")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31050>
(cherry picked from commit 0adaf92014)
This commit is contained in:
Rob Clark 2024-09-05 13:08:40 -07:00 committed by Eric Engestrom
parent 3b938aa4cd
commit 064d484d35
2 changed files with 2 additions and 2 deletions

View file

@ -3994,7 +3994,7 @@
"description": "freedreno/drm: Fix ring_heap flags",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "a3fb2b07aa299f6d4d3656a92d30112be2212674",
"notes": null

View file

@ -145,7 +145,7 @@ bo_new(struct fd_device *dev, uint32_t size, uint32_t flags,
uint32_t alloc_flags = flags & ~_FD_BO_HINTS;
if ((alloc_flags == 0) && dev->default_heap)
bo = fd_bo_heap_alloc(dev->default_heap, size, flags);
else if ((alloc_flags == RING_FLAGS) && dev->ring_heap)
else if ((flags == RING_FLAGS) && dev->ring_heap)
bo = fd_bo_heap_alloc(dev->ring_heap, size, flags);
if (bo)
return bo;