Message ID | 20230517-topic-a7xx_prep-v3-2-a3ce3725385b@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3130336vqr; Mon, 19 Jun 2023 09:50:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7X/svBxo/xvEFcBzhWEsmuo9nTUpDc0aBrzKki0P6OqBycP/k2e5bLE300QI2Ax6FnyUKe X-Received: by 2002:a05:6a21:3a88:b0:10d:6dc6:32c8 with SMTP id zv8-20020a056a213a8800b0010d6dc632c8mr10180576pzb.32.1687193424508; Mon, 19 Jun 2023 09:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687193424; cv=none; d=google.com; s=arc-20160816; b=hAQx4imO6eompcWCnwGMPmKownEuL/1RzFbRZlvLsjP866S07Ipld9FAlIRiq0PYcz Od/SR+1LYtnLwqsbZw4PKcpu2Tt4ET3AtIzgE6iZtzyy7/OlJcG8TBkCzaO/yg0xsglN dXGtBB6V4o4u+mbtsh8lWfzUXWoC8L5U5bMncGq+zuxyRCqzJ/+U7bQK+WIgqhT8a2pm 2qRn+efQBNkWWCbhBtGkz2or7GphkBjRMkzvrdxHp1K/sR4ZSQQhPnHLq0YgGdTahwo5 XJhR7Vr1yQFxcubm2Yj0ALE66gXxtL65oVN6zaJWroIsznDhJxPNYor2std0Lum8tlEF Z8gA== 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=QubfL4PWG3Qkdn7Jup1M3+20t3ogTcgbRp6X+RErkfY=; b=DE007G+QpX/qIN/MVk40LabFXDyy0r8Ea7a/d04tsJCcxIj6fj/zhzcUNiP6vCV8Ql PjW9Kp5vAVtxPaZ7xQl0MAwzCNCN5eloMi/18bsNAU7dTSUd+yXYJbH19Jwwp3aQTcJK o5DnggXjb996C1/HeQ4at6GcopqIzB+7uyLVj/xX6IZp5Rs96voL7cvUFp+FGUQ535JD zsf+KfTY8DJ/KrxnqDXvsb4EAJVSExFJ+BXVBsSyqdqtr8U4wnskMAbdNcxxMFzjLq25 E9zQD+X9w9F8pq+78HalEkx5wrF/aVJFxzYlUn2WzaX4gRFl4sKRP/v6fmHPCBW+wQWk xV3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=izWEN3U+; 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 c131-20020a633589000000b0055397736c02si4457400pga.842.2023.06.19.09.50.11; Mon, 19 Jun 2023 09:50:24 -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=izWEN3U+; 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 S232356AbjFSQof (ORCPT <rfc822;duw91626@gmail.com> + 99 others); Mon, 19 Jun 2023 12:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232323AbjFSQo2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 19 Jun 2023 12:44:28 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53479E66 for <linux-kernel@vger.kernel.org>; Mon, 19 Jun 2023 09:44:27 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f7677a94d1so4796692e87.0 for <linux-kernel@vger.kernel.org>; Mon, 19 Jun 2023 09:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687193065; x=1689785065; 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=QubfL4PWG3Qkdn7Jup1M3+20t3ogTcgbRp6X+RErkfY=; b=izWEN3U+iWd1fPLMrr6/pQrV08vx1rjRIhZarw0N3zMJwbfHE8T7Bj42V+YD92ZJNQ gxPcx+GGpqSgFfvpvxf4bZR1gTqH0rXIbkMcUAVk7/2Jo9ekhLHTN1oR6x+lIlqUWs/W uGbOD0ZsW4VKmxKWzHOiP0uQjutB5g+CT2PRVxibnF6K0ukgoixLk/AaKtKwptQO2BpS 8TO6EUzAc3mesxxjaeYfecj5CYyXUgsxyVWKm3wGTXVImpzBxc+lpLrnOyy7XljSh7Vx SqFrfgHqURpyRPGBP+8iB+a1ZOyRMdCFGMBP6y73RKpBbYgOj831wAgHVfywJ1yXzHjP O4UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687193065; x=1689785065; 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=QubfL4PWG3Qkdn7Jup1M3+20t3ogTcgbRp6X+RErkfY=; b=YUa7lfviclPvgkdf1pCgQxDvb8Eoij4DjzCNYRxze9u9fQtRXECu1OpJtccRBuRU7B P/vmreoFEYNPqP+mUGjtUq9oAXhjStGSG01VmaXutdBDdf1PHIrQyupDvBoUQJfRSjki PjVLFrTyD+CYassajeqAxtCd/RplJtApcbdUBBKO7ZEFJ4A0H4oSbDYIP/145+T1LoML bWOQZqKyIW6X8juqQGhgf9Zo0THE8Ue4zChQsS7BX5c21HtBZ1i3ugJsXeUXEy2uk0ND b3R3ZqVN0Ba8nC562Fh9am2Q8F+Zhnn9sKOPHp3WNrBVTms2CR3kcT2MGbe0Be+11Tlt 6CKQ== X-Gm-Message-State: AC+VfDwVq6dg1GO63p2ziR7Dn5vNxADqcN1bjCr6cooiBFBjCVhsmoJX fbQwfMevolHN59fzg3tXC8wC1w== X-Received: by 2002:a19:6d0c:0:b0:4f8:4245:ed57 with SMTP id i12-20020a196d0c000000b004f84245ed57mr5968981lfc.35.1687193065508; Mon, 19 Jun 2023 09:44:25 -0700 (PDT) Received: from [192.168.1.101] (abyl242.neoplus.adsl.tpnet.pl. [83.9.31.242]) by smtp.gmail.com with ESMTPSA id d9-20020ac24c89000000b004f849605be7sm1774293lfl.292.2023.06.19.09.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 09:44:25 -0700 (PDT) From: Konrad Dybcio <konrad.dybcio@linaro.org> Date: Mon, 19 Jun 2023 18:44:22 +0200 Subject: [PATCH v3 2/6] drm/msm/a6xx: Use descriptive bitfield names for CP_PROTECT_CNTL MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230517-topic-a7xx_prep-v3-2-a3ce3725385b@linaro.org> References: <20230517-topic-a7xx_prep-v3-0-a3ce3725385b@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v3-0-a3ce3725385b@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>, Jonathan Marek <jonathan@marek.ca>, 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=1687193061; l=1047; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=M+YceCSQbhF8BD7s1Uycd683ewMShr4OUbGYlX/cKSo=; b=05fyUeuE1APciTv7RqvirSi20LUa6O3cBKWcbJhiSxYszAu7ZScuRA2/ZzhQT4ETFVRwRshdc aMX5IJHfw1pDY7MMvEffcq0+4ZHieGtJKYfUcP6+pwprQZhkceKutxE 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 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: <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?1769150532451687147?= X-GMAIL-MSGID: =?utf-8?q?1769150532451687147?= |
Series |
Adreno QoL changes
|
|
Commit Message
Konrad Dybcio
June 19, 2023, 4:44 p.m. UTC
We have the necessary information, so explain which bit does what.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Comments
Hi Konrad, kernel test robot noticed the following build errors: [auto build test ERROR on 47045630bc409ce6606d97b790895210dd1d517d] url: https://github.com/intel-lab-lkp/linux/commits/Konrad-Dybcio/drm-msm-a6xx-Add-some-missing-header-definitions/20230620-004639 base: 47045630bc409ce6606d97b790895210dd1d517d patch link: https://lore.kernel.org/r/20230517-topic-a7xx_prep-v3-2-a3ce3725385b%40linaro.org patch subject: [PATCH v3 2/6] drm/msm/a6xx: Use descriptive bitfield names for CP_PROTECT_CNTL config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20230620/202306201502.pisn6tpR-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 12.3.0 reproduce: (https://download.01.org/0day-ci/archive/20230620/202306201502.pisn6tpR-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202306201502.pisn6tpR-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/gpu/drm/msm/adreno/a6xx_gpu.c: In function 'a6xx_set_cp_protect': >> drivers/gpu/drm/msm/adreno/a6xx_gpu.c:934:19: error: 'A6XX_CP_PROTECT_CNTL_ACCESS_PROT_EN' undeclared (first use in this function) 934 | A6XX_CP_PROTECT_CNTL_ACCESS_PROT_EN | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/msm/adreno/a6xx_gpu.c:934:19: note: each undeclared identifier is reported only once for each function it appears in >> drivers/gpu/drm/msm/adreno/a6xx_gpu.c:935:19: error: 'A6XX_CP_PROTECT_CNTL_ACCESS_FAULT_ON_VIOL_EN' undeclared (first use in this function) 935 | A6XX_CP_PROTECT_CNTL_ACCESS_FAULT_ON_VIOL_EN | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/msm/adreno/a6xx_gpu.c:936:19: error: 'A6XX_CP_PROTECT_CNTL_LAST_SPAN_INF_RANGE' undeclared (first use in this function) 936 | A6XX_CP_PROTECT_CNTL_LAST_SPAN_INF_RANGE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for SM_GCC_8350 Depends on [n]: COMMON_CLK [=y] && COMMON_CLK_QCOM [=m] && (ARM64 || COMPILE_TEST [=n]) Selected by [m]: - SM_VIDEOCC_8350 [=m] && COMMON_CLK [=y] && COMMON_CLK_QCOM [=m] WARNING: unmet direct dependencies detected for SM_GCC_8450 Depends on [n]: COMMON_CLK [=y] && COMMON_CLK_QCOM [=m] && (ARM64 || COMPILE_TEST [=n]) Selected by [m]: - SM_GPUCC_8450 [=m] && COMMON_CLK [=y] && COMMON_CLK_QCOM [=m] - SM_VIDEOCC_8450 [=m] && COMMON_CLK [=y] && COMMON_CLK_QCOM [=m] WARNING: unmet direct dependencies detected for SM_GCC_8550 Depends on [n]: COMMON_CLK [=y] && COMMON_CLK_QCOM [=m] && (ARM64 || COMPILE_TEST [=n]) Selected by [m]: - SM_GPUCC_8550 [=m] && COMMON_CLK [=y] && COMMON_CLK_QCOM [=m] - SM_VIDEOCC_8550 [=m] && COMMON_CLK [=y] && COMMON_CLK_QCOM [=m] vim +/A6XX_CP_PROTECT_CNTL_ACCESS_PROT_EN +934 drivers/gpu/drm/msm/adreno/a6xx_gpu.c 899 900 static void a6xx_set_cp_protect(struct msm_gpu *gpu) 901 { 902 struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu); 903 const u32 *regs = a6xx_protect; 904 unsigned i, count, count_max; 905 906 if (adreno_is_a650(adreno_gpu)) { 907 regs = a650_protect; 908 count = ARRAY_SIZE(a650_protect); 909 count_max = 48; 910 BUILD_BUG_ON(ARRAY_SIZE(a650_protect) > 48); 911 } else if (adreno_is_a690(adreno_gpu)) { 912 regs = a690_protect; 913 count = ARRAY_SIZE(a690_protect); 914 count_max = 48; 915 BUILD_BUG_ON(ARRAY_SIZE(a690_protect) > 48); 916 } else if (adreno_is_a660_family(adreno_gpu)) { 917 regs = a660_protect; 918 count = ARRAY_SIZE(a660_protect); 919 count_max = 48; 920 BUILD_BUG_ON(ARRAY_SIZE(a660_protect) > 48); 921 } else { 922 regs = a6xx_protect; 923 count = ARRAY_SIZE(a6xx_protect); 924 count_max = 32; 925 BUILD_BUG_ON(ARRAY_SIZE(a6xx_protect) > 32); 926 } 927 928 /* 929 * Enable access protection to privileged registers, fault on an access 930 * protect violation and select the last span to protect from the start 931 * address all the way to the end of the register address space 932 */ 933 gpu_write(gpu, REG_A6XX_CP_PROTECT_CNTL, > 934 A6XX_CP_PROTECT_CNTL_ACCESS_PROT_EN | > 935 A6XX_CP_PROTECT_CNTL_ACCESS_FAULT_ON_VIOL_EN | > 936 A6XX_CP_PROTECT_CNTL_LAST_SPAN_INF_RANGE); 937 938 for (i = 0; i < count - 1; i++) 939 gpu_write(gpu, REG_A6XX_CP_PROTECT(i), regs[i]); 940 /* last CP_PROTECT to have "infinite" length on the last entry */ 941 gpu_write(gpu, REG_A6XX_CP_PROTECT(count_max - 1), regs[i]); 942 } 943
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index b3ada1e7b598..cd0c9bccdc19 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -930,7 +930,10 @@ static void a6xx_set_cp_protect(struct msm_gpu *gpu) * protect violation and select the last span to protect from the start * address all the way to the end of the register address space */ - gpu_write(gpu, REG_A6XX_CP_PROTECT_CNTL, BIT(0) | BIT(1) | BIT(3)); + gpu_write(gpu, REG_A6XX_CP_PROTECT_CNTL, + A6XX_CP_PROTECT_CNTL_ACCESS_PROT_EN | + A6XX_CP_PROTECT_CNTL_ACCESS_FAULT_ON_VIOL_EN | + A6XX_CP_PROTECT_CNTL_LAST_SPAN_INF_RANGE); for (i = 0; i < count - 1; i++) gpu_write(gpu, REG_A6XX_CP_PROTECT(i), regs[i]);