Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3922363imw; Thu, 7 Jul 2022 09:38:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tmygJVoWgpU734QUjc100vIkjZeZ/FqnqsydCv2rtCSVwt5psimtF0/1eNMJV4kU/gRCkB X-Received: by 2002:a17:906:4482:b0:70a:19e3:d18a with SMTP id y2-20020a170906448200b0070a19e3d18amr45673736ejo.510.1657211909554; Thu, 07 Jul 2022 09:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657211909; cv=none; d=google.com; s=arc-20160816; b=vm/19Kv8eweuXPdTes3l3BInsoHIKD7GKXCwqYcAWzeMC05uDA9t17MRVXveJlvVvX y9ep3+Lb45wNeJJz5wA2k56fBNdGC7vPlJZtVUsYhiIi8ATjC5Cw4vQW9Fpu9LpB25eG IEyHcDOoZGTaJkFCd0vwT+t+XZOQjWJyni+ALZlHKsskvzlzk6wBqpqtPoZm4ZlV6oc9 hK0gCtfxl3eqkks1VUOf/TsfLrffu6V0GlHBvAUzXFb/u7RrHN1CVvGfH03rG/Cy65/7 V9DT7XPS4MoO8OIcOke5HHnJYPWbh4Yc4DieWoO0yz74WLeVkQYvU6TjB8HXZhm4dB1e z48w== 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=KkwelwdXDmhFR4sAJprFChmFv9QPBXU8ZPnRKHLF3Z0=; b=xqvG8pv+yRlbryaYU8+DUoZ3sB93vUXSeTFfmE5ODFC20bRLbkjBYHtpryu6zYihQZ DgP6iI6SZZx4OmgGxIdKRJ530jd8D3aSfLr7Aj+gkbKQMt0lBhZE63WOT5vV65QNBBGQ YZHKqkQ1c/Q6EztGIVqF4sy7KKlHSpOcci0uJTiVQWYtkkBvv0+bX987W9AWC0Z4dC5A nZqKm6/DKzrg7gXARz5jJELr28GQQfU283tvGGwXOKEAYt32xSUqMJymZjfHUKy5wA6c nfi1nP2Cgq8uxf8hncFSpJREXudiT+u5/ydz15T9bEypTkQyt4t55urmev+QYN/8BHBK yy/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=UqHMszEI; 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 sd29-20020a1709076e1d00b0072ab7bc38eesi10808288ejc.950.2022.07.07.09.38.04; Thu, 07 Jul 2022 09:38:29 -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=UqHMszEI; 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 S236319AbiGGQNL (ORCPT + 99 others); Thu, 7 Jul 2022 12:13:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236272AbiGGQMh (ORCPT ); Thu, 7 Jul 2022 12:12:37 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1A3A1D318; Thu, 7 Jul 2022 09:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1657210330; x=1688746330; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=KkwelwdXDmhFR4sAJprFChmFv9QPBXU8ZPnRKHLF3Z0=; b=UqHMszEIvHOliG/DuVYGoQp1AU6tU9K1vyeEzB2htc0M61vCkK//9KzY Lo9plmTaMEmZorE8s5uX9oJPRozdlcGfQTh/nLqDIEFhewjmhFyIYKH7f MVtYHunGjt++97MdF5gFaTTVw3rxYcxj8E8lyi1kMOoCk73+rLMMpOCwL I=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 07 Jul 2022 09:12:10 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2022 09:12:09 -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:12:08 -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:12:03 -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 , =?UTF-8?q?Christian=20K=C3=B6nig?= , Dan Carpenter , "Daniel Vetter" , David Airlie , Dmitry Baryshkov , Sean Paul , Wang Qing , Subject: [PATCH 7/7] drm/msm/a6xx: Handle GMU prepare-slumber hfi failure Date: Thu, 7 Jul 2022 21:41:02 +0530 Message-ID: <20220707213950.7.I54815c7c36b80d4725cd054e536365250454452f@changeid> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1657210262-17166-1-git-send-email-quic_akhilpo@quicinc.com> References: <1657210262-17166-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,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 When prepare-slumber hfi fails, we should follow a6xx_gmu_force_off() sequence. Signed-off-by: Akhil P Oommen --- 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