summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_gpu.c
diff options
context:
space:
mode:
authorSharat Masetty <smasetty@codeaurora.org>2018-10-12 14:26:55 +0530
committerSean Paul <seanpaul@chromium.org>2018-11-30 11:33:54 -0500
commit4f3a31a8e8bff5fc363ec9f4755e58a15f7f36c7 (patch)
treed39a242522eed47ee361d2e7e0bcdaa165df3af4 /drivers/gpu/drm/msm/msm_gpu.c
parentebcdcef30333660d3314158bac362425ade3d28c (diff)
downloadlinux-4f3a31a8e8bff5fc363ec9f4755e58a15f7f36c7.tar.bz2
drm/msm: Check if target supports crash dump capture
This patch simply checks first to see if the target can support crash dump capture before proceeding. Signed-off-by: Sharat Masetty <smasetty@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.c')
-rw-r--r--drivers/gpu/drm/msm/msm_gpu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 11aac8337066..32d04a9b48cf 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -345,6 +345,10 @@ static void msm_gpu_crashstate_capture(struct msm_gpu *gpu,
{
struct msm_gpu_state *state;
+ /* Check if the target supports capturing crash state */
+ if (!gpu->funcs->gpu_state_get)
+ return;
+
/* Only save one crash state at a time */
if (gpu->crashstate)
return;