]> git.baikalelectronics.ru Git - kernel.git/commit
drm: ttm: Don't bail from ttm_global_init if debugfs_create_dir fails
authorDan Moulding <dmoulding@me.com>
Tue, 10 Aug 2021 19:59:06 +0000 (13:59 -0600)
committerChristian König <christian.koenig@amd.com>
Mon, 16 Aug 2021 12:11:51 +0000 (14:11 +0200)
commit3ce8abc8fa8e206f7fd6bae754b31db1177c3593
tree76ae68dd282ff9d91ebe35b15c782962d4ebc6b6
parent604d7fd5a406929634a94c3018c0f30133ae985d
drm: ttm: Don't bail from ttm_global_init if debugfs_create_dir fails

In e457e9ffe69c ("drm/ttm: Initialize debugfs from
ttm_global_init()"), ttm_global_init was changed so that if creation
of the debugfs global root directory fails, ttm_global_init will bail
out early and return an error, leading to initialization failure of
DRM drivers. However, not every system will be using debugfs. On such
a system, debugfs directory creation can be expected to fail, but DRM
drivers must still be usable. This changes it so that if creation of
TTM's debugfs root directory fails, then no biggie: keep calm and
carry on.

Fixes: e457e9ffe69c ("drm/ttm: Initialize debugfs from ttm_global_init()")
Signed-off-by: Dan Moulding <dmoulding@me.com>
Tested-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210810195906.22220-2-dmoulding@me.com
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/ttm/ttm_device.c