projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3abab27
)
drm/ttm: Force re-init if ttm_global_init() fails
author
Jason Ekstrand
<jason@jlekstrand.net>
Tue, 20 Jul 2021 18:13:55 +0000
(13:13 -0500)
committer
Christian König
<christian.koenig@amd.com>
Wed, 21 Jul 2021 06:34:43 +0000
(08:34 +0200)
If we have a failure, decrement the reference count so that the next
call to ttm_global_init() will actually do something instead of assume
everything is all set up.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes:
62b53b37e4b1
("drm/ttm: use a static ttm_bo_global instance")
Reviewed-by: Christian König <christian.koenig@amd.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20210720181357.2760720-5-jason@jlekstrand.net
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/ttm/ttm_device.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_device.c
b/drivers/gpu/drm/ttm/ttm_device.c
index
5f31ace
..
519deea
100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_device.c
+++ b/
drivers/gpu/drm/ttm/ttm_device.c
@@
-100,6
+100,8
@@
static int ttm_global_init(void)
debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
&glob->bo_count);
out:
+ if (ret)
+ --ttm_glob_use_count;
mutex_unlock(&ttm_global_mutex);
return ret;
}