Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp780487imn; Sat, 30 Jul 2022 02:48:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vfBrtSPsAk3A1RuhxbzzO+Ic0zR8Qr39ieBZev7yE/XkWsOP29jVAM6X4fjhyxpfRQTQoe X-Received: by 2002:a05:6402:378f:b0:43a:d3f5:79f2 with SMTP id et15-20020a056402378f00b0043ad3f579f2mr7246054edb.338.1659174524165; Sat, 30 Jul 2022 02:48:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659174524; cv=none; d=google.com; s=arc-20160816; b=qtWcbivOBDgT2RDy+XyDeINc5dyjHj86IHoCK69J9nKxT4j29qIg8Cdu7WNJgG+Qvm By69qZkiUs9+tqW1NpPTh/wWu/lALEtIvFNbtXuZiNzYhi6GENL0KUldJKbT4zR5/gq3 iIureWLKpRD7XJHqnSoMbGU5kzU+jL9cwMvWw9Wu4fIG7b+Cdl0KS9tSkVu4k9KC/cJl Ii1AKtfh/kQk90MMy13ZqODBczU0O6TLkfpZ1kE4JcVTxsPyiO+xIvLhvU90nswMqbyP X58Jb3lAncNnjO6f9lx33vnjRJt7QdjuhWOpaQjTKSp1hVgNfEHTyBxeZZNbWjRITsoH bHgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=7/Dlb7opb1zHeDvNOlDvqLTNKaGONEslYGnrJDLSevg=; b=zHCklVJ/QWwX/NLoNkD3r1iEqDvLzl9bja/ANhZ+Md+Ges8lOsu25KMNlbCa3yEGyI 7UDCR8rxJrHMbsorCCFcNP+gF90oEPBY5/fg3DZ52ogntiRoZsZ9lGfpHICXGf3jpSQK SxkdAe/x7z2/3mu87j5EwiICFGRtEAbeJ+eyYpXDoYZ1xB9P2qlLbuty9pJCEm+zQvBP 8as5tBji52N6T/BdICK5pFP/2qcfOap3NHWAJPUP4SrFbKaGEmAZHB3b+J+VXq9DRRwl BuZknG7gL9RLTXvZv8jNL7bNFb52YYKkWpLBOp4x7yrkUc/WIWd2cvCPdlblLj7S9UAh sx9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=ycTwacqf; 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 he9-20020a1709073d8900b007304c6c6ff8si1522939ejc.539.2022.07.30.02.48.19; Sat, 30 Jul 2022 02:48:44 -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=ycTwacqf; 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 S236846AbiG3Jme (ORCPT + 99 others); Sat, 30 Jul 2022 05:42:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239360AbiG3JmJ (ORCPT ); Sat, 30 Jul 2022 05:42:09 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA6E447BBA; Sat, 30 Jul 2022 02:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1659174116; x=1690710116; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=7/Dlb7opb1zHeDvNOlDvqLTNKaGONEslYGnrJDLSevg=; b=ycTwacqfV9sgr6d1saybH5Q2bcfmLupYuzeXBup/CR8g74j9B79kt9d3 6rCh6X3iXA5K/fkzxKOKurge5kWInuitxxqv+TEMwsVxF+IUImuyrM0BO 9kLYT/PvcvGf6QPBLm/YUF/+7igU5GwgvJTAC3RQClVlbB1YSIkqm07FB s=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 30 Jul 2022 02:41:56 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2022 02:41:56 -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; Sat, 30 Jul 2022 02:41:55 -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; Sat, 30 Jul 2022 02:41:50 -0700 From: Akhil P Oommen To: freedreno , , , Rob Clark , Bjorn Andersson CC: Jordan Crouse , Jonathan Marek , Douglas Anderson , "Matthias Kaehlcke" , Akhil P Oommen , Abhinav Kumar , Dan Carpenter , Daniel Vetter , David Airlie , Dmitry Baryshkov , Sean Paul , Wang Qing , Subject: [PATCH v3 8/8] drm/msm/a6xx: Handle GMU prepare-slumber hfi failure Date: Sat, 30 Jul 2022 15:10:51 +0530 Message-ID: <20220730150952.v3.8.I54815c7c36b80d4725cd054e536365250454452f@changeid> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1659174051-27816-1-git-send-email-quic_akhilpo@quicinc.com> References: <1659174051-27816-1-git-send-email-quic_akhilpo@quicinc.com> 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 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 When prepare-slumber hfi fails, we should follow a6xx_gmu_force_off() sequence. Signed-off-by: Akhil P Oommen --- (no changes since v1) drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index db05942..3d00ef9 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -1082,7 +1082,11 @@ static void a6xx_gmu_shutdown(struct a6xx_gmu *gmu) a6xx_bus_clear_pending_transactions(adreno_gpu); /* tell the GMU we want to slumber */ - a6xx_gmu_notify_slumber(gmu); + ret = a6xx_gmu_notify_slumber(gmu); + if (ret) { + a6xx_gmu_force_off(gmu); + return; + } ret = gmu_poll_timeout(gmu, REG_A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS, val, -- 2.7.4