[PATCH 01/18] drm/i915: Fix ttm_bo_init failure handling
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Wed Sep 29 13:08:21 UTC 2021
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index b94497989995..00fc6d14a46d 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -898,6 +898,9 @@ void i915_ttm_bo_destroy(struct ttm_buffer_object *bo)
{
struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
+ /* set base refcount to 0 in case ttm_bo_init failed */
+ refcount_set(&obj->base.refcount.refcount, 0);
+
i915_ttm_backup_free(obj);
/* This releases all gem object bindings to the backend. */
--
2.33.0
More information about the Intel-gfx-trybot
mailing list