Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1230000imw; Fri, 8 Jul 2022 23:10:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uTK3K3Cie0OxR0LqdVBhgOx40Rh8gv05+FgAfKF6jrFYzDjuw9gSW1o1xYr2H3zu2RQWXh X-Received: by 2002:a17:906:9b89:b0:72b:3b1e:b7e5 with SMTP id dd9-20020a1709069b8900b0072b3b1eb7e5mr405274ejc.199.1657347017257; Fri, 08 Jul 2022 23:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657347017; cv=none; d=google.com; s=arc-20160816; b=czedlsGyV2il/URm62yT7k/74CYbRUUb3rwskve6AVY9gI77t2nZzgsgZZ1InrNSyy 84KRSyWeMP27I545UEEjxl9c867uvbRf70YZlwTih2i4hd71oSvLYVjJw/Dbky7M5zJP jiSaxY8xGAldyYgH5B1WJPf6UOzqo5N14xTEaijmbP7QSHQBAtNogxnWbB67gp5NxIxQ 4SxEPd/igoiHDJqZ3fKzXz55F3iwCfQX7dQI7xOW09wFAQyiOR/B2aBHOsugVCwlJenC xYbomZQlbhWrahOiIrT029wStOcF7wLnlrzTnB9fkn4HWTUP+HBQD9yqDPqHoOkEadfU BAQQ== 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=NR9iNRPQAa66fCPpIPSZS3+ID1qCvirnJLJqeYPK8yo=; b=a0RGr/cAFX9lyeNU4W2uM899izzUaTbgv85cmxfoz2NfNoqEQFbFVo66P3+zkXZrST gELZ51TQrg2MvfoP4xoUoJxIrtFRqdBSLaXwX9A+XFTfF3VeAIcnz5fHvTrJXsA9WskJ WNcBgeXBwsK1PkJQHdDoPQ80U6j6N+mbwUpL6QEyfcGT6P6MAQNo7/9teU0hK7+UQOPK Oj32T6/Uy2IEgZPDWBfeI5z/u9peVCOXeLVHZYMq74J4mKkDI1Jn6XzM+sCRiZYy6QIT LfeAoHyhKmwFTnPUfiuyy9OmYz6ITkWYqFv/SwOW2V//v4bX4ltb7oKAkr+1J+DUTWXr d8LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=HGOXaK6y; 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 h7-20020a170906590700b0072b21f7a839si809154ejq.238.2022.07.08.23.09.49; Fri, 08 Jul 2022 23:10:17 -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=HGOXaK6y; 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 S229688AbiGIGBC (ORCPT + 99 others); Sat, 9 Jul 2022 02:01:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbiGIGAw (ORCPT ); Sat, 9 Jul 2022 02:00:52 -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 701295B057; Fri, 8 Jul 2022 23:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1657346442; x=1688882442; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=NR9iNRPQAa66fCPpIPSZS3+ID1qCvirnJLJqeYPK8yo=; b=HGOXaK6yQ8qGrhGoOv4aTa7SzBxWSVwKqvqbt9i2B/TbpfBe8nJArNc1 Au52gur83BeHpo3IjDMk9p/dTbhgt9CoXJz2uGKz+sbhYO7vSx8dTHb/U FnuOjfb4iTjKooXMG8eBXU4lo0cGY4LNGdcVC9v6RAa7Iwug6TnvbWKdt 8=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 08 Jul 2022 23:00:42 -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; 08 Jul 2022 23:00:41 -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; Fri, 8 Jul 2022 23:00:41 -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; Fri, 8 Jul 2022 23:00:36 -0700 From: Akhil P Oommen To: freedreno , , , Rob Clark , Bjorn Andersson CC: Jonathan Marek , Jordan Crouse , Matthias Kaehlcke , "Douglas Anderson" , Akhil P Oommen , Abhinav Kumar , Daniel Vetter , David Airlie , Dmitry Baryshkov , Geert Uytterhoeven , Konrad Dybcio , Sean Paul , Subject: [PATCH v2 7/7] drm/msm/a6xx: Handle GMU prepare-slumber hfi failure Date: Sat, 9 Jul 2022 11:29:35 +0530 Message-ID: <20220709112837.v2.7.I54815c7c36b80d4725cd054e536365250454452f@changeid> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1657346375-1461-1-git-send-email-quic_akhilpo@quicinc.com> References: <1657346375-1461-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 --- (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 ec25f19..e033d6a 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -1086,7 +1086,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