Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bommithi Sakeena <bommithi.sakeena@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [Intel-xe] [PATCH 2/2] drm/xe: Add a missing mutex_destroy to xe_ttm_vram_mgr
Date: Wed, 27 Sep 2023 16:50:12 +0000	[thread overview]
Message-ID: <20230927165012.9048-2-bommithi.sakeena@intel.com> (raw)
In-Reply-To: <20230927165012.9048-1-bommithi.sakeena@intel.com>

Ensure that the mutex is destroyed at fini function.

Fixes: e777edb47dc2 ("drm/xe: Implement stolen memory.")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Bommithi Sakeena <bommithi.sakeena@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


  reply	other threads:[~2023-09-27 16:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 16:50 [Intel-xe] [PATCH 1/2] drm/xe: Ensure mutex are destroyed Bommithi Sakeena
2023-09-27 16:50 ` Bommithi Sakeena [this message]
2023-09-27 20:38   ` [Intel-xe] [PATCH 2/2] drm/xe: Add a missing mutex_destroy to xe_ttm_vram_mgr Niranjana Vishwanathapura
2023-09-28 23:18     ` Rodrigo Vivi
2023-09-27 16:52 ` [Intel-xe] ✓ CI.Patch_applied: success for series starting with [1/2] drm/xe: Ensure mutex are destroyed Patchwork
2023-09-27 16:52 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-27 16:53 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-27 17:00 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-27 17:01 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-27 17:02 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-09-27 17:36 ` [Intel-xe] ✗ CI.BAT: failure " Patchwork
2023-09-27 20:37 ` [Intel-xe] [PATCH 1/2] " Niranjana Vishwanathapura

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230927165012.9048-2-bommithi.sakeena@intel.com \
    --to=bommithi.sakeena@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox