diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2023-10-10 08:54:25 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2023-11-21 05:31:42 +0300 |
commit | f6afe4f09f6605b725b39670b3568ab2927c9b43 (patch) | |
tree | 5cf2ef22ebd8034e3e8bd1cf37107ab70a0d5e7f /drivers/gpu/drm/msm/msm_rd.c | |
parent | 12578c075f89d6bd1b8af21751fbc2e1f78d2ce0 (diff) | |
download | linux-f6afe4f09f6605b725b39670b3568ab2927c9b43.tar.xz |
drm/msm: don't create GPU-related debugfs files with no GPU present
If there is no GPU present, skip creation of the GPU-related debugfs
files, making the MSM's debugfs more usable.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/561742/
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_rd.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_rd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c index 5adc51f7ab59..ca44fd291c5b 100644 --- a/drivers/gpu/drm/msm/msm_rd.c +++ b/drivers/gpu/drm/msm/msm_rd.c @@ -270,6 +270,9 @@ int msm_rd_debugfs_init(struct drm_minor *minor) struct msm_rd_state *rd; int ret; + if (!priv->gpu_pdev) + return 0; + /* only create on first minor: */ if (priv->rd) return 0; |