summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2024-08-20 10:29:53 -0700
committerMatthew Brost <matthew.brost@intel.com>2024-08-23 09:54:10 -0700
commit5b993d00d7f0c970a5e5d34c1031069fb13b6986 (patch)
treeb2571ee6e28908cae27a9fe2069afe665dd7ab46
parent25ebe10e3f4c897a2d348a9d4b674ee9ea28225c (diff)
downloadlinux-5b993d00d7f0c970a5e5d34c1031069fb13b6986.tar.gz
linux-5b993d00d7f0c970a5e5d34c1031069fb13b6986.tar.bz2
linux-5b993d00d7f0c970a5e5d34c1031069fb13b6986.zip
drm/xe: Move ggtt_fini to devm managed
ggtt->scratch is destroyed via devm, ggtt_fini sets ggtt->scratch to NULL, ggtt->scratch in GGTT clears, so ensure ggtt->scratch is set NULL before the BO is destroyed. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240820172958.1095143-2-matthew.brost@intel.com
-rw-r--r--drivers/gpu/drm/xe/xe_ggtt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index b4a0cd2b62ed..a3ce91decdce 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -166,7 +166,7 @@ static void ggtt_fini_early(struct drm_device *drm, void *arg)
drm_mm_takedown(&ggtt->mm);
}
-static void ggtt_fini(struct drm_device *drm, void *arg)
+static void ggtt_fini(void *arg)
{
struct xe_ggtt *ggtt = arg;
@@ -374,7 +374,7 @@ int xe_ggtt_init(struct xe_ggtt *ggtt)
xe_ggtt_initial_clear(ggtt);
- return drmm_add_action_or_reset(&xe->drm, ggtt_fini, ggtt);
+ return devm_add_action_or_reset(xe->drm.dev, ggtt_fini, ggtt);
err:
ggtt->scratch = NULL;
return err;