[PATCH] amdgpu: allow setting contiguous on non-kernel bos for placement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Dave Airlie <airlied@xxxxxxxxxx>

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@xxxxxxxxxxxxxxx
Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx>
---
 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





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux