Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp896602rwb; Thu, 18 Aug 2022 14:23:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR5b9tZFojbVWDZ13jhdaUcj7m0EK2qMoxUY8JCtUAvdmKVdD9/slU8TMkg4j1l7kC/1iwYO X-Received: by 2002:a17:907:724d:b0:731:8022:94e9 with SMTP id ds13-20020a170907724d00b00731802294e9mr3108243ejc.172.1660857825218; Thu, 18 Aug 2022 14:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660857825; cv=none; d=google.com; s=arc-20160816; b=BsA7h/rIBgQ2Rq1P5be71DLfnajAUOc0iEghHNxlbPSEtLQoBnYTVsvtEKE5qBknnn cJAWzX6AnMCxtR64FbhRv872oiSk8VNByb9dJ8EfXdte4VgejNEjh6sjaTMcxJwvtg0X QP4KidWFiuEbm+vvVWIVB6JddtMkw+X6wyq9LBrJbeKYG13nh4jV0m7nAXZ+GNgjPV0C +AXAH283jO4YKpc9zaPMA2mO8GsMZJ2IYwb7Y8q9/x+KzCEh+ux6W/mY1h5RjGuxgzcW qnul7mq7M4hAlxhIItpE+rQhY4ipUQwn1UXaXq4MXS9b5xTzT2VF4rLzXnbHQe8IVcR+ +Ytg== 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=cGqecY9VVDxZDGt58XCPVUOGf9ntnxtO4gYHytd9ly70xlmrwRqyHv8jsc+rC4TUG2 /q81+iU7DuDzq9kI9JdzsbLmpAkIbBwdkHOaNoto0ykjDHG1pCrW9OT2syBDU6ahBUqH Al0pzvn9fNf7DkdOhJdvUNCXg8bxemNNziL0VeO0SjVL6ZUOsyOCDqPlHHij3cky4kb5 z3F0F2GDdfc7vYAmoJOm9EuylfL/Aq2llLHdhuYt9a1TeOHiY4r/YAmsyTHd5NYHz29t Og9ibRAleBArbYNlIQIM6dXNEiJK3PUbraK4Wyf3fVxt/Of8I/58/5jutCcRZF4HkgJy uEqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=bFKMVOwF; 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 p14-20020a056402500e00b00445e8e96ae8si1589409eda.151.2022.08.18.14.23.17; Thu, 18 Aug 2022 14:23:45 -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=qcppdkim1 header.b=bFKMVOwF; 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 S1345950AbiHRUYV (ORCPT + 99 others); Thu, 18 Aug 2022 16:24:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346025AbiHRUYD (ORCPT ); Thu, 18 Aug 2022 16:24:03 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F396712A8F; Thu, 18 Aug 2022 13:23:18 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27IFseMc015415; Thu, 18 Aug 2022 20:23:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=7/Dlb7opb1zHeDvNOlDvqLTNKaGONEslYGnrJDLSevg=; b=bFKMVOwFLzkM2VSQVIyo81skadGLII1c+trgYqoqskbbT+3d73k80Oy9rWtEPbacp+IK zwhsw7scYm4xzN43dR2bit1V1p7Kq30TPtfS+AcBUj3G9/Ge2OKta1HsKflheHQkIfKY eE6t2iLLiPqznBIM74qUdHPTaJi6h9LY5opd/q8MQa3CI0gxRMOhAYpSVvWUhYRQtdLa rWaoz9qqlcsSa45Je6PQsy4nevQAaTzCHP7PKbQlyucvATbsfYzZh2ef9nwujTmk15mP V2n2JYlLOVHxoyPUAAh3bZyv3HoTVDqfIJ3VXA5W/VY/eI+gv/AR2X8O4q3EJiBd4LXL SA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3j1d803f61-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Aug 2022 20:23:11 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 27IKNAQe023554 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Aug 2022 20:23:10 GMT 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, 18 Aug 2022 13:23:04 -0700 From: Akhil P Oommen To: freedreno , , , Rob Clark , Bjorn Andersson , "Dmitry Baryshkov" CC: Jordan Crouse , Matthias Kaehlcke , Jonathan Marek , Douglas Anderson , Akhil P Oommen , "Abhinav Kumar" , Dan Carpenter , Daniel Vetter , David Airlie , Sean Paul , Wang Qing , Subject: [PATCH v5 7/7] drm/msm/a6xx: Handle GMU prepare-slumber hfi failure Date: Fri, 19 Aug 2022 01:52:15 +0530 Message-ID: <20220819015030.v5.7.I54815c7c36b80d4725cd054e536365250454452f@changeid> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1660854135-1667-1-git-send-email-quic_akhilpo@quicinc.com> References: <1660854135-1667-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-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 7-UNUdfGEDKs2BOZkGLE4qVK8kNlPcmt X-Proofpoint-ORIG-GUID: 7-UNUdfGEDKs2BOZkGLE4qVK8kNlPcmt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-18_14,2022-08-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 impostorscore=0 mlxlogscore=862 mlxscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208180074 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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