drm/ttm: Force re-init if ttm_global_init() fails
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 20 Jul 2021 18:13:55 +0000 (13:13 -0500)
committerChristian König <christian.koenig@amd.com>
Wed, 21 Jul 2021 06:34:43 +0000 (08:34 +0200)
commit235c3610d5f02ee91244239b43cd9ae8b4859dff
tree61990eca9c2f0230d0f797cf3e74d37deb85f10f
parent3abab27c322e0f2acf981595aa8040c9164dc9fb
drm/ttm: Force re-init if ttm_global_init() fails

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