aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Baryshkov <[email protected]>2023-10-09 18:10:38 +0000
committerRob Clark <[email protected]>2023-10-09 18:42:36 +0000
commitae13219e47d314b3bf7496b97983c22485e3627a (patch)
tree394f4396487187770f4ea8a5efd169789b1671f5
parentdrm/msm: switch to drmm_mode_config_init() (diff)
downloadkernel-ae13219e47d314b3bf7496b97983c22485e3627a.tar.gz
kernel-ae13219e47d314b3bf7496b97983c22485e3627a.zip
drm/msm: only register 'kms' debug file if KMS is used
There is little point in having the empty debugfs file which always returns -ENODEV. Change this file to be created only if KMS is actually used. Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/561656/ Signed-off-by: Rob Clark <[email protected]>
-rw-r--r--drivers/gpu/drm/msm/msm_debugfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c
index a0a936f80ae3..06fc632fd6f9 100644
--- a/drivers/gpu/drm/msm/msm_debugfs.c
+++ b/drivers/gpu/drm/msm/msm_debugfs.c
@@ -314,8 +314,9 @@ void msm_debugfs_init(struct drm_minor *minor)
debugfs_create_file("gpu", S_IRUSR, minor->debugfs_root,
dev, &msm_gpu_fops);
- debugfs_create_file("kms", S_IRUSR, minor->debugfs_root,
- dev, &msm_kms_fops);
+ if (priv->kms)
+ debugfs_create_file("kms", S_IRUSR, minor->debugfs_root,
+ dev, &msm_kms_fops);
debugfs_create_u32("hangcheck_period_ms", 0600, minor->debugfs_root,
&priv->hangcheck_period);