[Intel-xe] [PATCH 2/2] drm/xe: Add a missing mutex_destroy to xe_ttm_vram_mgr

Niranjana Vishwanathapura niranjana.vishwanathapura at intel.com
Wed Sep 27 20:38:34 UTC 2023


On Wed, Sep 27, 2023 at 04:50:12PM +0000, Bommithi Sakeena wrote:
>Ensure that the mutex is destroyed at fini function.
>
>Fixes: e777edb47dc2 ("drm/xe: Implement stolen memory.")
>Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
>Signed-off-by: Bommithi Sakeena <bommithi.sakeena at intel.com>

Can we use 'fixup!' tag (instead of 'Fixes') if it can be
squashed with the originating patch?
In either case,
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>

>---
> drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
>index 06a54c8bd46f..285791eb4a79 100644
>--- a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
>+++ b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
>@@ -328,6 +328,8 @@ static void ttm_vram_mgr_fini(struct drm_device *dev, void *arg)
> 	ttm_resource_manager_cleanup(&mgr->manager);
>
> 	ttm_set_driver_manager(&xe->ttm, mgr->mem_type, NULL);
>+
>+	mutex_destroy(&mgr->lock);
> }
>
> int __xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_ttm_vram_mgr *mgr,
>-- 
>2.34.1
>


More information about the Intel-xe mailing list