diff options
| author | Arunpravin Paneer Selvam <[email protected]> | 2025-07-16 07:51:23 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-07-17 16:36:12 +0000 |
| commit | 81df6bfad6a479530cef4b8ecbf848132d0fc0ab (patch) | |
| tree | 7d1d62078ba462df2046f6d0024f360f036550d5 /drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | |
| parent | drm/amd/pm: Use cached metrics data on SMUv13.0.6 (diff) | |
| download | kernel-81df6bfad6a479530cef4b8ecbf848132d0fc0ab.tar.gz kernel-81df6bfad6a479530cef4b8ecbf848132d0fc0ab.zip | |
drm/amdgpu: Add WARN_ON to the resource clear function
Set the dirty bit when the memory resource is not cleared
during BO release.
v2(Christian):
- Drop the cleared flag set to false.
- Improve the amdgpu_vram_mgr_set_clear_state() function.
v3:
- Add back the resource clear flag set function call after
being cleared during eviction (Christian).
- Modified the patch subject name.
Signed-off-by: Arunpravin Paneer Selvam <[email protected]>
Suggested-by: Christian König <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h index b256cbc2bc27..2c88d5fd87da 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h @@ -66,7 +66,10 @@ to_amdgpu_vram_mgr_resource(struct ttm_resource *res) static inline void amdgpu_vram_mgr_set_cleared(struct ttm_resource *res) { - to_amdgpu_vram_mgr_resource(res)->flags |= DRM_BUDDY_CLEARED; + struct amdgpu_vram_mgr_resource *ares = to_amdgpu_vram_mgr_resource(res); + + WARN_ON(ares->flags & DRM_BUDDY_CLEARED); + ares->flags |= DRM_BUDDY_CLEARED; } #endif |
