Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3897941imw; Thu, 7 Jul 2022 09:14:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sJnRZcVX8e4T6i3l1i6RF3A6JHZoYSRRBywBj/Rr+hd0qz0S5P2RtGK//FEzWCOvINWRlU X-Received: by 2002:a17:907:60d1:b0:726:a049:7740 with SMTP id hv17-20020a17090760d100b00726a0497740mr44815159ejc.215.1657210472963; Thu, 07 Jul 2022 09:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657210472; cv=none; d=google.com; s=arc-20160816; b=j2oLqo/Lmhbz+eh121LlDcYEhwy4kN+hfyZxyVzwpHueZGG7FufkhniP60Wh2MUt0Y buiM59kUBrAkcSDp2wj+7HE9euwMK87lyZJ6DnMFb57kwPsW52e3qZPvg89dCttrjo0Q PwGrNwrMULfkCASSJjxtbFrHB5d5zXKqp5cC7dnGeyvksNPDZ3OJDRY62LU60Qq8gwlz tCiA0Jm6cjEhE0mgHgko3UzjuuxD1VAS69YbjYA8FBsjGSteKR27iwX/JtdJgvGwviGA ZFlV5qOE9ZUzovkmdg4BnEi6ZoXete1qbhCamhZth7v8LBuwMeSplH5dXUfvPZ/LvjCh otrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=leYdCXoGwry2lcj0LA4bM6t7+gCgiTv/P4EyrpLt2nM=; b=aL4Lpnc9IQB8bkTSYkb87t/bFUae1p8HZ3raCnN/a2rfXadnBnwYBJ1awniUzDwLea tDalYFWtincq9VYvry6m9Lik4jpn0MBkBZ/BlHMkCoeG9tzNf/nhUnkpe90PWAyfcskP TzmP2txfVOVfXHiM89tFQJwziO7oIAlyY/MC9y1JfynUCuaepbDUFqXeDDyDo51uU2mG JV1PlPtFCDaZiRMq4TdpdJT8idpFoK1UN8yi7LLamzScXv3db6un8KP7dSlLiMqXDC5F Ko9D3ZJe6KY7teWwP7DwDdJ50R0+6tuUtuWQXI7IBeGCvkq7ottc4VDiF/7wXt0HJmX/ fLwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="X55Q/IOY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd14-20020a170907968e00b007269f867290si2637221ejc.1008.2022.07.07.09.14.05; Thu, 07 Jul 2022 09:14:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="X55Q/IOY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235873AbiGGQMk (ORCPT + 99 others); Thu, 7 Jul 2022 12:12:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235833AbiGGQMB (ORCPT ); Thu, 7 Jul 2022 12:12:01 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 946652B245; Thu, 7 Jul 2022 09:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1657210290; x=1688746290; h=from:to:cc:subject:date:message-id:mime-version; bh=leYdCXoGwry2lcj0LA4bM6t7+gCgiTv/P4EyrpLt2nM=; b=X55Q/IOYGd0vONwhT4XWX7wApB3ez/bz7RArcgruV2EVOuay6LVuowmj YbgwR+kXqfLnBy0wVagBc2UdDqvMLMo+XxY/aEh2kuH7oEUqRN85uAiuj AGwsEXpv8NZpVWq8/b20Wch7Cump0Qw7ggU+MIlZy59rWbzioEKuxWNCK k=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-01.qualcomm.com with ESMTP; 07 Jul 2022 09:11:30 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2022 09:11:29 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 7 Jul 2022 09:11:29 -0700 Received: from hyd-lnxbld559.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 7 Jul 2022 09:11:22 -0700 From: Akhil P Oommen To: freedreno , , , Rob Clark , Bjorn Andersson CC: Jordan Crouse , Douglas Anderson , Matthias Kaehlcke , Jonathan Marek , Akhil P Oommen , Abhinav Kumar , Andy Gross , Chia-I Wu , =?UTF-8?q?Christian=20K=C3=B6nig?= , Dan Carpenter , "Daniel Vetter" , David Airlie , Dmitry Baryshkov , Krzysztof Kozlowski , Rob Herring , "Sean Paul" , Stephen Boyd , Wang Qing , , Subject: [PATCH 0/7] Improve GPU Recovery Date: Thu, 7 Jul 2022 21:40:55 +0530 Message-ID: <1657210262-17166-1-git-send-email-quic_akhilpo@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Recently, I have debugged a few device crashes which occured during a recovery after a hangcheck timeout. It looks like there are a few things we can do to improve our chance at a successful gpu recovery. First one is to ensure that CX GDSC collapses which clears the internal states in gpu's CX domain. First 5 patches tries to handle this. Rest of the patches are to ensure that few internal blocks like CP, GMU and GBIF are halted properly before proceeding for a snapshot followed by recovery. Also, handle 'prepare slumber' hfi failure correctly. These are A6x specific improvements. Akhil P Oommen (7): drm/msm: Remove unnecessary pm_runtime_get/put drm/msm: Correct pm_runtime votes in recover worker drm/msm: Fix cx collapse issue during recovery drm/msm: Ensure cx gdsc collapse during recovery arm64: dts: qcom: sc7280: Update gpu register list drm/msm/a6xx: Improve gpu recovery sequence drm/msm/a6xx: Handle GMU prepare-slumber hfi failure arch/arm64/boot/dts/qcom/sc7280.dtsi | 6 ++- drivers/gpu/drm/msm/adreno/a6xx.xml.h | 4 ++ drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 83 ++++++++++++++++++++++------------- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 36 +++++++++++++-- drivers/gpu/drm/msm/msm_gpu.c | 9 ++-- drivers/gpu/drm/msm/msm_gpu.h | 1 + drivers/gpu/drm/msm/msm_ringbuffer.c | 4 -- 7 files changed, 100 insertions(+), 43 deletions(-) -- 2.7.4