Skip to content

Commit ae13219

Browse files
lumagrobclark
authored andcommitted
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 <robdclark@gmail.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/561656/ Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent eedba1b commit ae13219

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/gpu/drm/msm/msm_debugfs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,9 @@ void msm_debugfs_init(struct drm_minor *minor)
314314
debugfs_create_file("gpu", S_IRUSR, minor->debugfs_root,
315315
dev, &msm_gpu_fops);
316316

317-
debugfs_create_file("kms", S_IRUSR, minor->debugfs_root,
318-
dev, &msm_kms_fops);
317+
if (priv->kms)
318+
debugfs_create_file("kms", S_IRUSR, minor->debugfs_root,
319+
dev, &msm_kms_fops);
319320

320321
debugfs_create_u32("hangcheck_period_ms", 0600, minor->debugfs_root,
321322
&priv->hangcheck_period);

0 commit comments

Comments
 (0)