Re: [PATCH v3] drm/amdgpu: Fix the BO release clear memory warning

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

 



Hi Christian,

On 6/10/2024 11:35 PM, Christian König wrote:
Am 10.06.24 um 20:04 schrieb Arunpravin Paneer Selvam:
This happens when the amdgpu_bo_release_notify running
before amdgpu_ttm_set_buffer_funcs_status set the buffer
funcs to enabled.

check the buffer funcs enablement before calling the fill
buffer memory.

v2:(Christian)
   - Apply it only for GEM buffers and since GEM buffers are only
     allocated/freed while the driver is loaded we never run into
     the issue to clear with buffer funcs disabled.

v3:(Mario)
   - drop the stable tag as this will presumably go into a
     -fixes PR for 6.10

Log snip:
*ERROR* Trying to clear memory with ring turned off.
RIP: 0010:amdgpu_bo_release_notify+0x201/0x220 [amdgpu]

Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality")
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@xxxxxxx>
Reviewed-by: Christian König <christian.koenig@xxxxxxx>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@xxxxxxxxx>
Tested-by: Richard Gong <richard.gong@xxxxxxx>
Suggested-by: Christian König <christian.koenig@xxxxxxx>

Please push to drm-misc-fixes ASAP.
I pushed into drm-misc-fixes.

Thanks,
Arun

Thanks,
Christian.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c    | 1 +
  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 --
  2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 67c234bcf89f..3adaa4670103 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -108,6 +108,7 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
        memset(&bp, 0, sizeof(bp));
      *obj = NULL;
+    flags |= AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE;
        bp.size = size;
      bp.byte_align = alignment;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 8d8c39be6129..c556c8b653fa 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -604,8 +604,6 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
      if (!amdgpu_bo_support_uswc(bo->flags))
          bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC;
  -    bo->flags |= AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE;
-
      bo->tbo.bdev = &adev->mman.bdev;
      if (bp->domain & (AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA |
                AMDGPU_GEM_DOMAIN_GDS))





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

  Powered by Linux