[PATCH] drm/ttm: allow debugfs_create_file() to fail in ttm_global_init()
Duncan
j.duncan at cox.net
Thu Aug 19 22:38:26 UTC 2021
On Mon, 16 Aug 2021 16:30:46 +0200
lnx7586 at gregdf.com wrote:
> From: Greg Depoire--Ferrer <lnx7586 at gregdf.com>
>
> Commit 69de4421bb4c ("drm/ttm: Initialize debugfs from
> ttm_global_init()") unintentionally made ttm_global_init() return
> early with an error when debugfs_create_file() fails. When
> CONFIG_DEBUG_FS is disabled, debugfs_create_file() returns a ENODEV
> error so the TTM device would fail to initialize.
>
> Instead of returning early with the error, print it and continue.
> ENODEV can be ignored because it just means that CONFIG_DEBUG_FS is
> disabled.
>
> Fixes: 69de4421bb4c ("drm/ttm: Initialize debugfs from ttm_global_init()")
> Reported-by: Mikael Pettersson <mikpelinux at gmail.com>
> Reported-by: Duncan <j.duncan at cox.net>
> Signed-off-by: Greg Depoire--Ferrer <lnx7586 at gregdf.com>
> ---
> Hi, I had this bug as well with the nouveau driver after updating.
> This patch fixes it for me.
>
> drivers/gpu/drm/ttm/ttm_device.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
This fixes the problem here, too. Running it now.
Tested-by: Duncan <j.duncan at cox.net>
--
Duncan - HTML messages treated as spam
"They that can give up essential liberty to obtain a little
temporary safety, deserve neither liberty nor safety."
Benjamin Franklin
More information about the dri-devel
mailing list