From patchwork Fri Oct 12 08:56:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharat Masetty X-Patchwork-Id: 10638117 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D80FA933 for ; Fri, 12 Oct 2018 08:57:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8B5E2943C for ; Fri, 12 Oct 2018 08:57:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD0842B799; Fri, 12 Oct 2018 08:57:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DF582943C for ; Fri, 12 Oct 2018 08:57:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728056AbeJLQ2j (ORCPT ); Fri, 12 Oct 2018 12:28:39 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42308 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727705AbeJLQ2j (ORCPT ); Fri, 12 Oct 2018 12:28:39 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 71EAB60C60; Fri, 12 Oct 2018 08:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539334634; bh=GO0+S6z30lSUSwUQMY2sKlOyUFs9spFis3nQEQajpnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pwwn4iHE2iSJRmwodL5KPWt4n15d7AgMweAIv7GVWO4jwx2mNR3/jt9uyCgZrsSDY wk0q74FGv+DeMBcbq0yV6lq7CUfagQyxE6obIEMlgRafzjHW/ulUKy/w2ifrT7xy/6 Zjq91t5dVGUHcVfegWELUMZZBtcJ5CvXOJijUFvs= Received: from smasetty-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: smasetty@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2246960C60; Fri, 12 Oct 2018 08:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539334634; bh=GO0+S6z30lSUSwUQMY2sKlOyUFs9spFis3nQEQajpnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pwwn4iHE2iSJRmwodL5KPWt4n15d7AgMweAIv7GVWO4jwx2mNR3/jt9uyCgZrsSDY wk0q74FGv+DeMBcbq0yV6lq7CUfagQyxE6obIEMlgRafzjHW/ulUKy/w2ifrT7xy/6 Zjq91t5dVGUHcVfegWELUMZZBtcJ5CvXOJijUFvs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2246960C60 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=smasetty@codeaurora.org From: Sharat Masetty To: freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, jcrouse@codeaurora.org, Sharat Masetty Subject: [PATCH 2/3] drm/msm: Check if target supports crash dump capture Date: Fri, 12 Oct 2018 14:26:55 +0530 Message-Id: <1539334616-11723-3-git-send-email-smasetty@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1539334616-11723-1-git-send-email-smasetty@codeaurora.org> References: <1539334616-11723-1-git-send-email-smasetty@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch simply checks first to see if the target can support crash dump capture before proceeding. Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/msm_gpu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 19b4afe..da63d3d 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;