[Intel-gfx] [PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails
Christian König
christian.koenig at amd.com
Mon Jul 19 19:21:34 UTC 2021
Am 19.07.21 um 20:30 schrieb Jason Ekstrand:
> 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 at jlekstrand.net>
> Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance")
> Cc: Christian König <christian.koenig at amd.com>
Good catch, path is Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/ttm/ttm_device.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
> index 5f31acec3ad76..519deea8e39b7 100644
> --- 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;
> }
More information about the Intel-gfx
mailing list