Message ID | 20230517-topic-a7xx_prep-v1-4-7a964f2e99c2@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1279280vqo; Wed, 17 May 2023 09:52:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4hvirYBjyGE/2eukYlr/45fwInPwKfuhkkKgK4hC1Ee6h7IzVXsxaiEgmQKyRRjCuEXf/A X-Received: by 2002:a17:902:7295:b0:1a2:6257:36b9 with SMTP id d21-20020a170902729500b001a2625736b9mr40351654pll.31.1684342321729; Wed, 17 May 2023 09:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684342321; cv=none; d=google.com; s=arc-20160816; b=qxrK/zUdR8hw924gCE4BIRnSonmne5zS10LooSrUeo1UeqUynaxoiRItsYYTSvUVVJ ykIltxDVgJmUdf2JZYVEuLLYNHvjzkkEsN62Io3XJTxOK4Bt0+KU3e4fUB6f17FhiQCo 2HRbNkyR8yluUhZSYLebKLGJRfYgCHtVLPjUUJnjtS3sjUgG9gHTOm7oFZMPtWt4h9US eEdeMujIjtBhZawON6TSQE7cpVJu2cqiXlHaV8y8svtT+7g4X5a6EHbG9sZiK5IwoQ5T P9/xJvhM9DfWuDLaEVhgSTA1pDmKXD0Q1G0DH2qOBg6igUmXKtu3/lyUpR4FtobVfqPS vzCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=Xbg/GarYLH0aFj2Z0GcGyUdxXKd4AWIEjgCUU5KwNKM=; b=ipfD9gJ4vDov6dqEfAqUWhDL2jaVO3UG7GlI7B+3vWYrs98PWKA5mlSPa7xEGGTRMT KyHW4x/t3Pi3//aDY5s5JQiVjB8IafUIueReC+2lb/fIYD27ZyHT2RtqY41AxZrZTw9v 2h5qGBhDU57VCI0udtjKelwkbDIewkjzK3upw1QVXgKza3o3TrpgXxDF2EADgR4zDUrs UzLHLSI5BJk2JQjxeReMHy4augrd3L4lbiSVrRnYOzbzRvJXP/pBvJu5PfJXvd8X2JlI +o85UB4NkHlRv/eHQyjGBaHx5PYhdt0TvGQwtc5nIvZjM5jkFiUhGQFcb3RE3RXNcG4I 7nWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zMaSSOs9; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c16-20020a170902b69000b001aafe3f40a7si20725408pls.579.2023.05.17.09.51.49; Wed, 17 May 2023 09:52:01 -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=@linaro.org header.s=google header.b=zMaSSOs9; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229763AbjEQQuj (ORCPT <rfc822;abdi.embedded@gmail.com> + 99 others); Wed, 17 May 2023 12:50:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbjEQQuX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 17 May 2023 12:50:23 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1778E420B for <linux-kernel@vger.kernel.org>; Wed, 17 May 2023 09:50:22 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2ac8ee9cf7aso10404921fa.2 for <linux-kernel@vger.kernel.org>; Wed, 17 May 2023 09:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684342220; x=1686934220; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Xbg/GarYLH0aFj2Z0GcGyUdxXKd4AWIEjgCUU5KwNKM=; b=zMaSSOs9zSEtB4oW2mhF2Q2/mXwdY7jTNC+h1bBoN34mmDx29JN+E/4OdpCeDpjp/v E6TrOiDrPwfFRRx/pYbm9kD7BAds9kRPwgy+6JTWZa+Z4gC9SBbo6xl/0nn4m/zUOF0U qJFfGb40qFoJL3w/GfllmK5PDlBXDSFslZJDroYHLd/dKTH2LdxIT6RIQAyEDwNFhUie /6iQmM0aqaaiKxjCUAEz8ZZOI/Qo6Iy9I6qW6rAktG+oZyibRB5RLuz6a8ccI8/H2UR7 7tuCVIld7pBvOWWlc1Y1W47Ob/psq38Gjwa8CXy5shBFgUsEETqNHWYth4ADmPTavRlX R6Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684342220; x=1686934220; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xbg/GarYLH0aFj2Z0GcGyUdxXKd4AWIEjgCUU5KwNKM=; b=lpJe5Ja/aonSCY307WmYNzPvOMGp8BULthb7DY3tEvTyF78nxqZoz/z71nfrd1ultI KhbpLi3olX59xuKsmwESrp7LwqHze3owB8AE6dIW24Hofz75Xe03BC4oKXpeTdUeaqy6 smWvf0StYvvrkwJToB5PvGJTSeNXJy4ibuM7dxk1eKfLj8tK20dCAEKoQNFiV/KSNtsb yd65TEYXmiM5GmJv3Qp2y7Er+eyxWnQnRDWmC/shIrsCwR62NC8+e47vC19wd154FWRI l1vbJwVXT6l5xveC9G/Be+NRQ22aE8gm+xMiL9tafQhDRmo9Jeh2NrcTcLXz/D0E27aW bedQ== X-Gm-Message-State: AC+VfDxhSfHfTkB3gfgjaw1YCkydkmbe67KTTfSpZAUH6INmt52pknqj fdpEXKYimF/sUMrHRHQvDcFvLabUERJhjTjMbgw= X-Received: by 2002:a2e:9252:0:b0:2a7:6fee:2503 with SMTP id v18-20020a2e9252000000b002a76fee2503mr10225196ljg.14.1684342220351; Wed, 17 May 2023 09:50:20 -0700 (PDT) Received: from [192.168.1.101] (abxi58.neoplus.adsl.tpnet.pl. [83.9.2.58]) by smtp.gmail.com with ESMTPSA id g6-20020a2e9cc6000000b002af0e9abaf6sm159224ljj.131.2023.05.17.09.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:50:20 -0700 (PDT) From: Konrad Dybcio <konrad.dybcio@linaro.org> Date: Wed, 17 May 2023 18:50:11 +0200 Subject: [PATCH 4/6] drm/msm/a6xx: Improve GMU force shutdown sequence MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230517-topic-a7xx_prep-v1-4-7a964f2e99c2@linaro.org> References: <20230517-topic-a7xx_prep-v1-0-7a964f2e99c2@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v1-0-7a964f2e99c2@linaro.org> To: Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch> Cc: Marijn Suijten <marijn.suijten@somainline.org>, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Konrad Dybcio <konrad.dybcio@linaro.org> X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1684342212; l=999; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=tIqOHRwnY5c8M0EJh8c6iF51VO5nfDTSDxvclL4zDow=; b=ippU5bfqmqMFyeRemvIfdDfB/dEI0Dag1wtnOk8dtad5ZqSn5m9G/Fn+WuYt4/235ZmGWag1a ysNfvVb+q/HCrjjoG85N3/1nkGUPR6jMjj0y9YHWyEaawakOzT8zf10 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= 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=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766160934343759474?= X-GMAIL-MSGID: =?utf-8?q?1766160934343759474?= |
Series |
Adreno QoL changes
|
|
Commit Message
Konrad Dybcio
May 17, 2023, 4:50 p.m. UTC
The GMU force shutdown sequence involves some additional register cleanup
which was not implemented previously. Do so.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++++++
1 file changed, 7 insertions(+)
Comments
Hi Konrad, kernel test robot noticed the following build errors: [auto build test ERROR on 065efa589871e93b6610c70c1e9de274ef1f1ba2] url: https://github.com/intel-lab-lkp/linux/commits/Konrad-Dybcio/drm-msm-a6xx-Explain-CP_PROTECT_CNTL-writes-in-a6xx_set_cp_protect/20230518-010130 base: 065efa589871e93b6610c70c1e9de274ef1f1ba2 patch link: https://lore.kernel.org/r/20230517-topic-a7xx_prep-v1-4-7a964f2e99c2%40linaro.org patch subject: [PATCH 4/6] drm/msm/a6xx: Improve GMU force shutdown sequence config: mips-allyesconfig compiler: mips-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/c8d08c2d02fc0a1ef0cdcc93d041e3802e01904e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Konrad-Dybcio/drm-msm-a6xx-Explain-CP_PROTECT_CNTL-writes-in-a6xx_set_cp_protect/20230518-010130 git checkout c8d08c2d02fc0a1ef0cdcc93d041e3802e01904e # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202305180505.bG7RPhZo-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/gpu/drm/msm/adreno/a6xx_gmu.c: In function 'a6xx_gmu_force_off': >> drivers/gpu/drm/msm/adreno/a6xx_gmu.c:934:24: error: 'REG_A6XX_GMU_AHB_FENCE_STATUS_CLR' undeclared (first use in this function); did you mean 'REG_A6XX_GMU_AHB_FENCE_STATUS'? 934 | gmu_write(gmu, REG_A6XX_GMU_AHB_FENCE_STATUS_CLR, 0x7); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | REG_A6XX_GMU_AHB_FENCE_STATUS drivers/gpu/drm/msm/adreno/a6xx_gmu.c:934:24: note: each undeclared identifier is reported only once for each function it appears in vim +934 drivers/gpu/drm/msm/adreno/a6xx_gmu.c 913 914 /* Force the GMU off in case it isn't responsive */ 915 static void a6xx_gmu_force_off(struct a6xx_gmu *gmu) 916 { 917 struct a6xx_gpu *a6xx_gpu = container_of(gmu, struct a6xx_gpu, gmu); 918 struct adreno_gpu *adreno_gpu = &a6xx_gpu->base; 919 struct msm_gpu *gpu = &adreno_gpu->base; 920 921 /* Flush all the queues */ 922 a6xx_hfi_stop(gmu); 923 924 /* Stop the interrupts */ 925 a6xx_gmu_irq_disable(gmu); 926 927 /* Force off SPTP in case the GMU is managing it */ 928 a6xx_sptprac_disable(gmu); 929 930 /* Make sure there are no outstanding RPMh votes */ 931 a6xx_gmu_rpmh_off(gmu); 932 933 /* Clear the WRITEDROPPED fields and put fence into allow mode */ > 934 gmu_write(gmu, REG_A6XX_GMU_AHB_FENCE_STATUS_CLR, 0x7); 935 gmu_write(gmu, REG_A6XX_GMU_AO_AHB_FENCE_CTRL, 0); 936 937 /* Make sure the above writes go through */ 938 wmb(); 939 940 /* Halt the gmu cm3 core */ 941 gmu_write(gmu, REG_A6XX_GMU_CM3_SYSRESET, 1); 942 943 a6xx_bus_clear_pending_transactions(adreno_gpu, true); 944 945 /* Reset GPU core blocks */ 946 gpu_write(gpu, REG_A6XX_RBBM_SW_RESET_CMD, 1); 947 udelay(100); 948 } 949
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index ea6d671e7c6c..8004b582e45f 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -930,6 +930,13 @@ static void a6xx_gmu_force_off(struct a6xx_gmu *gmu) /* Make sure there are no outstanding RPMh votes */ a6xx_gmu_rpmh_off(gmu); + /* Clear the WRITEDROPPED fields and put fence into allow mode */ + gmu_write(gmu, REG_A6XX_GMU_AHB_FENCE_STATUS_CLR, 0x7); + gmu_write(gmu, REG_A6XX_GMU_AO_AHB_FENCE_CTRL, 0); + + /* Make sure the above writes go through */ + wmb(); + /* Halt the gmu cm3 core */ gmu_write(gmu, REG_A6XX_GMU_CM3_SYSRESET, 1);