diff options
author | Jordan Crouse <jcrouse@codeaurora.org> | 2019-04-10 19:58:16 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2019-04-21 17:52:36 +0300 |
commit | b02872df58aca66d0e7af3ec5065dbc6f0630dd1 (patch) | |
tree | 43ee9969171994ebdc9f490aa97fc1e6546e781b /drivers/gpu/drm/msm/msm_debugfs.c | |
parent | b55ee6b243bd2743b9cb20b6aa812091748c4304 (diff) | |
download | linux-b02872df58aca66d0e7af3ec5065dbc6f0630dd1.tar.xz |
drm/msm/a6xx: Don't enable GPU state code if dependencies are missing
Add CONFIG_DRM_MSM_GPU_STATE to conditionally compile Adreno GPU state
code depending on the availability of the dependencies.
Reported-by: Hulk Robot <hulkci@huawei.com>
Reported-by: YueHaibing <yuehaibing@huawei.com>
Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state")
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_debugfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c index fb423d309e91..67ef300559cf 100644 --- a/drivers/gpu/drm/msm/msm_debugfs.c +++ b/drivers/gpu/drm/msm/msm_debugfs.c @@ -75,7 +75,7 @@ static int msm_gpu_open(struct inode *inode, struct file *file) struct msm_gpu_show_priv *show_priv; int ret; - if (!gpu) + if (!gpu || !gpu->funcs->gpu_state_get) return -ENODEV; show_priv = kmalloc(sizeof(*show_priv), GFP_KERNEL); |