aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2021-04-05 10:45:26 -0700
committerRob Clark <[email protected]>2021-04-07 11:05:47 -0700
commitb9a31d0deee4a1c2883b6c8dd4a8cfc549c7633d (patch)
tree243424e039d7cc0a26745966747504bea981b00b
parent6afb0750dba05cfce02eea9dcb4d76ce80a448cb (diff)
drm/msm: Clear msm_obj->sgt in put_pages()
Currently this doesn't matter since we keep the pages pinned until the object is destroyed. But when we start unpinning pages to allow objects to be evicted to swap, it will. Signed-off-by: Rob Clark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Clark <[email protected]>
-rw-r--r--drivers/gpu/drm/msm/msm_gem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index b45c10000596..b22f68113d27 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -162,6 +162,7 @@ static void put_pages(struct drm_gem_object *obj)
sg_free_table(msm_obj->sgt);
kfree(msm_obj->sgt);
+ msm_obj->sgt = NULL;
}
if (use_pages(obj))