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

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

 



Am 24.07.24 um 09:02 schrieb Dave Airlie:
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!.

And we intentionally didn't do that.

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.

Stop, something is wrong here. We should be able to kmap non-contiguous BOs.

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.

And breaks other places, so that is really not something we can do.

Regards,
Christian.


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++;




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

  Powered by Linux