ソースを参照

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>
Sharat Masetty 6 年 前
コミット
4f3a31a8e8
1 ファイル変更4 行追加0 行削除
  1. 4 0
      drivers/gpu/drm/msm/msm_gpu.c

+ 4 - 0
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;
 	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 */
 	/* Only save one crash state at a time */
 	if (gpu->crashstate)
 	if (gpu->crashstate)
 		return;
 		return;