From patchwork Wed Jun 28 20:35:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 114049 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9197911vqr; Wed, 28 Jun 2023 13:44:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ41mG6vZn4zBxLZj97mZ4K/EKu/zpPrPSlMlbawOU6vTKS2BP4/BnC/ueBHR81duMGn1sGV X-Received: by 2002:a17:906:72d8:b0:992:4f26:45d5 with SMTP id m24-20020a17090672d800b009924f2645d5mr3800933ejl.5.1687985097279; Wed, 28 Jun 2023 13:44:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687985097; cv=none; d=google.com; s=arc-20160816; b=xOcClIpAFWVyybEpViXDifSOcntcOyVoNC2sCjuZpvvygP1T6be2m/fbjT2jkH0X30 ssdNjajjNFzFyZmdcCgHGQt90Uh2zzlC5G1QXKruafub+PYvuSDl1z0wcFm2IC0sSmk7 qz+zbD3+N3cWoiK/25MW3vmi/8PQptfZSB//Zj+JpSS6+KuxR1sinu/BhZ127FPOGUYE bKnPjAbGV+y+s0afsVlXCbkG4nwoUU1+98vdhhNnhGaukF6N9PaJS012m3UEWSx1XkPL f7Zjm8CJs9tMWQ6zTwBhM0Ga0vpmH96o1Jj2CNmmukDv0MHLJgDUec4JcSAPW+M4ZxYa sC/A== 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=bTNFQ30TyWOh9qaBR5NIxyfhe015j8OGjUNEwiBiUBE=; fh=y5CufWdCvRG/D46wPUQAs6a5TaO9Xg7IL+UXm/FDyGE=; b=DpIBoA66SDH4OfHGSipjDq/lE4NJXDMG0wSuZ7EwABTt2Ep0K6jvr+HR/9ukV4vm18 ySusxe7DkjilzMfC4NA1Gxl8EHAMrxb5TZvkGXbWHQPyLFQQo0WyjTNyiTEkoahCIglS aMzNcajJXC9w5XCjFcfh6TPR6h3ZAR82553mfsQ9zpFe5vBhs4ubFawYO219yaJVAzFv pHgnRV1SLr6iWCOCy82ckEYXs1hMpbIPzMgvOrrN/Jrmx/cON5oK2JxJat4T7FR4dzWK roNcK84XdZF7r+cazSaLo99JVpISaMCHc1CefWU9Mx7zw10WHoUlAfp0pFYyhV08L8PU NL+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rNY7Sp4f; 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 k8-20020a170906054800b00986539d1693si5697512eja.924.2023.06.28.13.44.32; Wed, 28 Jun 2023 13:44:57 -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=rNY7Sp4f; 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 S232101AbjF1Ufv (ORCPT + 99 others); Wed, 28 Jun 2023 16:35:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231416AbjF1Ufg (ORCPT ); Wed, 28 Jun 2023 16:35:36 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A04A19B0 for ; Wed, 28 Jun 2023 13:35:33 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4f96d680399so118968e87.0 for ; Wed, 28 Jun 2023 13:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687984531; x=1690576531; 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=bTNFQ30TyWOh9qaBR5NIxyfhe015j8OGjUNEwiBiUBE=; b=rNY7Sp4fiyswXrormwfh3F4jUm/yunYpxnZlfQAtJ/AvZPwL+vV/wGyWr0K6lFNSda 5Hnu/6iuSef3jS7yX6TAxnxMcNPz6sZfU1QSLufeSdTgukQkjRdZ9AfgdHsIgC3P6dfq NulYenOtGjDULnywxISy6OVlUUJCpo7UaWVW+I/YFy5Vfc68HvgwZIWH7VSpy3P29vUH N90DlmQqoezeJmq9A16h1NMlYQNA37E1gptfpxlr1K9c531O5D4f/+aebzTPzgQtbKVa EFI9h4UzF+BGWfgng/jgfg3UuXszlcLZlb6fKp8hDn50SGZbqWtGm/mY7i/UJ4EdrOSs kQjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687984531; x=1690576531; 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=bTNFQ30TyWOh9qaBR5NIxyfhe015j8OGjUNEwiBiUBE=; b=A5Z/28hccD10czbUYIsYBR7qIVrAf+YEFSKuZEmFEd6A0E6h5aqM1NO5dyIqAUlyq/ lHmxnzKdcH5BtbSm8FZNhpyFX/0g/FlD7PDhaDCCRL6VliT+x4O5KIxfMuhVwQ7PGbNm BFYviX8kvmbj1ZAqGS7YY/p9bdSBcwrzVjtJztDyzLzgiKMdZZhlM/mPE8B2p4IOaQEK tO/BKTILuY7MTkvwYjHekJJhD2FLZMMQgMHgx9XGXMtr+CF1UFUxAS+HwsEg9XtXxHN0 0YhCxwyvXWkBUhRSQGRl0oHupdOzOLTvb0ZhaTlG3INbt1t6mww2XIGAlUHf6iymu5+F RHag== X-Gm-Message-State: AC+VfDzd2EPElyNGZyS/MschrqJCX7y4Zag2bseBG4KnzgwKuKjyfSMe qYa9Rb+LqeRTiTudiUaJrJOXrA== X-Received: by 2002:a19:6445:0:b0:4f8:74b5:b4ec with SMTP id b5-20020a196445000000b004f874b5b4ecmr19816568lfj.41.1687984531636; Wed, 28 Jun 2023 13:35:31 -0700 (PDT) Received: from [192.168.1.101] (abyk82.neoplus.adsl.tpnet.pl. [83.9.30.82]) by smtp.gmail.com with ESMTPSA id m25-20020a056512015900b004fb86c89fa1sm753363lfo.135.2023.06.28.13.35.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 13:35:31 -0700 (PDT) From: Konrad Dybcio Date: Wed, 28 Jun 2023 22:35:04 +0200 Subject: [PATCH 04/14] drm/msm/a6xx: Add missing regs for A7XX MIME-Version: 1.0 Message-Id: <20230628-topic-a7xx_drmmsm-v1-4-a7f4496e0c12@linaro.org> References: <20230628-topic-a7xx_drmmsm-v1-0-a7f4496e0c12@linaro.org> In-Reply-To: <20230628-topic-a7xx_drmmsm-v1-0-a7f4496e0c12@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687984524; l=2612; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=wKfWUDd2PVjs4yPffZ0/I61PRILfdZFsM/DDl//zeKY=; b=Tvw1x5Y2X4eZJDD2DwED7rXifTpV8rQciZkQwCwVkXm/qQ/OJEmH0+OFlZfs0P8zKhsW+IjMe RFcem22jVsZBbSWZI+/9EWnp/Xj81vBbz4jlWgkO8pcx/qpCtqejrkY 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=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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769980661577093881?= X-GMAIL-MSGID: =?utf-8?q?1769980661577093881?= Add some missing definitions required for A7 support. This may be substituted with a mesa header sync. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx.xml.h | 9 +++++++++ drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx.xml.h b/drivers/gpu/drm/msm/adreno/a6xx.xml.h index 1c051535fd4a..863b5e3b0e67 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx.xml.h +++ b/drivers/gpu/drm/msm/adreno/a6xx.xml.h @@ -1114,6 +1114,12 @@ enum a6xx_tex_type { #define REG_A6XX_CP_MISC_CNTL 0x00000840 #define REG_A6XX_CP_APRIV_CNTL 0x00000844 +#define A6XX_CP_APRIV_CNTL_CDWRITE 0x00000040 +#define A6XX_CP_APRIV_CNTL_CDREAD 0x00000020 +#define A6XX_CP_APRIV_CNTL_RBRPWB 0x00000008 +#define A6XX_CP_APRIV_CNTL_RBPRIVLEVEL 0x00000004 +#define A6XX_CP_APRIV_CNTL_RBFETCH 0x00000002 +#define A6XX_CP_APRIV_CNTL_ICACHE 0x00000001 #define REG_A6XX_CP_PREEMPT_THRESHOLD 0x000008c0 @@ -1939,6 +1945,8 @@ static inline uint32_t REG_A6XX_RBBM_PERFCTR_RBBM_SEL(uint32_t i0) { return 0x00 #define REG_A6XX_RBBM_CLOCK_HYST_TEX_FCHE 0x00000122 +#define REG_A7XX_RBBM_CLOCK_HYST2_VFD 0x0000012f + #define REG_A6XX_RBBM_LPAC_GBIF_CLIENT_QOS_CNTL 0x000005ff #define REG_A6XX_DBGC_CFG_DBGBUS_SEL_A 0x00000600 @@ -8252,5 +8260,6 @@ static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15(uint32_t val) #define REG_A6XX_CX_MISC_SYSTEM_CACHE_CNTL_1 0x00000002 +#define REG_A7XX_CX_MISC_TCM_RET_CNTL 0x00000039 #endif /* A6XX_XML */ diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h b/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h index fcd9eb53baf8..5b66efafc901 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h @@ -360,6 +360,12 @@ static inline uint32_t A6XX_GMU_GPU_NAP_CTRL_SID(uint32_t val) #define REG_A6XX_GMU_GENERAL_7 0x000051cc +#define REG_A6XX_GMU_GENERAL_8 0x000051cd + +#define REG_A6XX_GMU_GENERAL_9 0x000051ce + +#define REG_A6XX_GMU_GENERAL_10 0x000051cf + #define REG_A6XX_GMU_ISENSE_CTRL 0x0000515d #define REG_A6XX_GPU_CS_ENABLE_REG 0x00008920 @@ -471,6 +477,8 @@ static inline uint32_t A6XX_GMU_GPU_NAP_CTRL_SID(uint32_t val) #define REG_A6XX_RSCC_SEQ_BUSY_DRV0 0x00000101 +#define REG_A7XX_RSCC_SEQ_MEM_0_DRV0_A740 0x00000154 + #define REG_A6XX_RSCC_SEQ_MEM_0_DRV0 0x00000180 #define REG_A6XX_RSCC_TCS0_DRV0_STATUS 0x00000346