[PATCH] amdgpu: allow setting contiguous on non-kernel bos for placement
Dave Airlie
airlied at gmail.com
Wed Jul 24 07:02:04 UTC 2024
From: Dave Airlie <airlied at redhat.com>
This is a partial revert of drm/amdgpu: Modify the contiguous flags behaviour.
This broke VCN AV1 decoding on radv video on GFX11.
On VCN4 only the first VCN block has AV1 decode support, so the kernel has
a hacky heurisitic to work out from the submitted IB if it's AV1.
YOU COULD HAVE PUT A FLAG ON THE BO SUBMISSION YOU KNOW!.
Now in order to access the submitted IB, it has to mark it as contiguous,
so the ioremap can work on it so the kernel can access the contents.
However this buffer isn't a kernel buffer, so the new check introduced
in the above commit, breaks the whole show. I'm not sure why vaapi
manages to avoid this fate, but it does somehow. Anyways this restores
the behaviour from before.
Fixes: 143c51da8dba ("drm/amdgpu: Modify the contiguous flags behaviour")
Cc: stable at vger.kernel.org
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 706345ea1430..b3ee952f68d4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -153,8 +153,7 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
else
places[c].flags |= TTM_PL_FLAG_TOPDOWN;
- if (abo->tbo.type == ttm_bo_type_kernel &&
- flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)
+ if (flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)
places[c].flags |= TTM_PL_FLAG_CONTIGUOUS;
c++;
--
2.45.2
More information about the amd-gfx
mailing list