From patchwork Tue Jun 20 11:10:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 110436 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3600188vqr; Tue, 20 Jun 2023 04:43:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5GNZ5hMWtoXR9p7jZ94AyPWmBHzN0fmCkkp8FHn7ww4X+ORdC46sW8JQRIB+zY1HgCX5tK X-Received: by 2002:a05:6870:6184:b0:1ab:b4e6:22d1 with SMTP id a4-20020a056870618400b001abb4e622d1mr2124420oah.10.1687261424213; Tue, 20 Jun 2023 04:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687261424; cv=none; d=google.com; s=arc-20160816; b=iC1tU+W7csVpyX72MC4aZHSXL6LYtemar09CX0cRkGK/JWe7yaO3qHbjUw9HDm7tWK SYpBihZw8nJv+HC9BEZQZyERGzcbOrLBie7GU6m90uNoxbG23Zjn/JhBtdfNxdA6o2RY vDlP5fkK81lZ50Nz47NY5Dz545SI4Ul7W07cRAenrw9s+4JKtg43++q+XZMuYYYgsDMc PC6isg0cKwaYsgTJshXwF6LZcNLH26/i6QGld+MxAX2bqvamtQxdrf3L7zeicQtusXOL l9XA5mL0VDsTLAyrB+2uLanacG6NMsB4Kh5R7kY+bQ3g+vfXHCXzeRpBfS0JOk+KkOC1 Jq3w== 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=tkWRn+h6xkygImqtaQx4KpYutKkbF50StX6n/eitmXs=; b=kUsB5926LkhTMqyMwEELw13muJtFuaKgcBOPP3NNY6b3YrHbcns1/abG8HHWF8cL/F B4LzlLMoPzZKWCZRs3vW5Nc+MLLk9cl4YA/5eloN2yJTVkae9l507FmL57FQmjRizXKo cWv80+D/b/kVlqUIClfIvucvTxyNWCLecxpc2+KXQwGngwZM/2b36n/pY204GoZTlNLB 358HSHbompYgvFulse0DAyHLGDoEveE653jkyWQgqhw34n2+Rhlz+3TnxUaiXzGwzavd 3sfCrV1FOP9LaogHOh7MlBi/ng7tGs1dc/t0xlrQzwC1zYTTC6ap0pdJRCyaYjTN4rpW J4ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lE6PqAGi; 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 m16-20020a63fd50000000b0054869ad7424si1519200pgj.155.2023.06.20.04.43.27; Tue, 20 Jun 2023 04:43:44 -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=lE6PqAGi; 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 S232442AbjFTLKs (ORCPT + 99 others); Tue, 20 Jun 2023 07:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232276AbjFTLKp (ORCPT ); Tue, 20 Jun 2023 07:10:45 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFF4DC4 for ; Tue, 20 Jun 2023 04:10:43 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f8467e39cfso5885052e87.3 for ; Tue, 20 Jun 2023 04:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687259441; x=1689851441; 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=tkWRn+h6xkygImqtaQx4KpYutKkbF50StX6n/eitmXs=; b=lE6PqAGie4zRPIrct4WYU6mFM1dSyjOBhre5QMlGi+1OgovgiTbMbF9KA6VEIcxl7G PER1ypnwevSf73+x7HX6akXnluMZySomV9SjYtxFLiRUeuuedCRNLDNPynRi/16BT0ae j5spkYsWbFF3Af0//7s6CkLonhsB7a0BVsZPtIToQdFUEmG7vgYXSuwwcfsomcV6rrA4 lL7tva5ESLKtXfS26axDwSns9PzNqog50lHHCnDH1vb1L7E3X4dyIApBw4acVAt1m2Uu 0F/e3hSDKFEeWDUZi0l+lALmLoiZeeaqDzTctKHeknLd/RwmQ3362WbQSGc8xS3rtd4r 40og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687259441; x=1689851441; 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=tkWRn+h6xkygImqtaQx4KpYutKkbF50StX6n/eitmXs=; b=A5UWyaH+9sFcK4qHFFJfbzxXskYna6WhoGkGWFMIpsvNlC3X5OUGEcZGtatSmbOCZ0 afkn0KX25SgbVgvHaCBdmOfGEfDXaehrmWDOugiM3pna9tndy22ippP6bKz7Dt1dfsfi 3Xvz9yFNwpT64bOySOBsOMQpmm8VppWqOwCAcTuviyinPQN+ok2MH7JrFzCxv/VrUvr4 mak7hUeiG3A0C35WSsu2TkBeNlFmO2ZEX/n8vGuX6lLLsK6QSwSQ3ZNVFggd69NTZWhI 0Sb4LdrkR/IIjf8ZdhW8RMbzg6ClJbg/rIB+bkB3Ee9aIvG/CjvC+gajuEtjBMc2A1Ig olqQ== X-Gm-Message-State: AC+VfDwNNqexKwSprKl7xn70s5B4K/i0KSEKAWHd3J2U6UJQH8UilNgy Gcp02AZvXFJfkz7PjAqJ2OkqPQ== X-Received: by 2002:a19:6452:0:b0:4f8:7524:8431 with SMTP id b18-20020a196452000000b004f875248431mr2673772lfj.44.1687259441623; Tue, 20 Jun 2023 04:10:41 -0700 (PDT) Received: from [192.168.1.101] (abxj193.neoplus.adsl.tpnet.pl. [83.9.3.193]) by smtp.gmail.com with ESMTPSA id u26-20020a056512041a00b004f764716afdsm314395lfk.257.2023.06.20.04.10.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 04:10:41 -0700 (PDT) From: Konrad Dybcio Date: Tue, 20 Jun 2023 13:10:36 +0200 Subject: [PATCH v4 1/6] drm/msm/a6xx: Add some missing header definitions MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v4-1-b16f273a91d4@linaro.org> References: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter Cc: Marijn Suijten , Jonathan Marek , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687259438; l=1618; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=nFCkHKYu6fZpo1oSnNEiddoJoyEVOdH0h7thI2vrgRc=; b=nRNs41vgr+n4vunmbBJGhbFUhF0rOqAyzhYIrSjBneYnE0v0zDOxr59b2gyZGFeWygzWk4kvG lAeBkS8ItJnBMVlRG4ufwqSIzZt+uXkEJYGprGmhpUrCCrRH7krksb9 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?1769221835361489570?= X-GMAIL-MSGID: =?utf-8?q?1769221835361489570?= Add a definition of the GMU_AHB_FENCE_STATUS_CLR reg and CP_PROTECT_CNTL bitfields. This may be substituted with a mesa header sync. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx.xml.h | 3 +++ drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx.xml.h b/drivers/gpu/drm/msm/adreno/a6xx.xml.h index 4dc3be6ed45d..1c051535fd4a 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx.xml.h +++ b/drivers/gpu/drm/msm/adreno/a6xx.xml.h @@ -1166,6 +1166,9 @@ static inline uint32_t A6XX_CP_ROQ_THRESHOLDS_2_ROQ_SIZE(uint32_t val) #define REG_A6XX_CP_DBG_ECO_CNTL 0x00000843 #define REG_A6XX_CP_PROTECT_CNTL 0x0000084f +#define A6XX_CP_PROTECT_CNTL_LAST_SPAN_INF_RANGE 0x00000008 +#define A6XX_CP_PROTECT_CNTL_ACCESS_FAULT_ON_VIOL_EN 0x00000002 +#define A6XX_CP_PROTECT_CNTL_ACCESS_PROT_EN 0x00000001 static inline uint32_t REG_A6XX_CP_SCRATCH(uint32_t i0) { return 0x00000883 + 0x1*i0; } diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h b/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h index 9ab15d91aced..fcd9eb53baf8 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h @@ -425,6 +425,8 @@ static inline uint32_t A6XX_GMU_GPU_NAP_CTRL_SID(uint32_t val) #define REG_A6XX_GMU_AHB_FENCE_STATUS 0x00009313 +#define REG_A6XX_GMU_AHB_FENCE_STATUS_CLR 0x00009314 + #define REG_A6XX_GMU_RBBM_INT_UNMASKED_STATUS 0x00009315 #define REG_A6XX_GMU_AO_SPARE_CNTL 0x00009316 From patchwork Tue Jun 20 11:10:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 110419 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3583810vqr; Tue, 20 Jun 2023 04:11:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5kEJO6q8IN6uyx4GCZaRofPgnTAWo2eVxnWuuhVlMKBlKL0lHxDYkk4fGae1/rZCpofngk X-Received: by 2002:a05:6a00:14c1:b0:668:8493:2552 with SMTP id w1-20020a056a0014c100b0066884932552mr4667983pfu.18.1687259505596; Tue, 20 Jun 2023 04:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687259505; cv=none; d=google.com; s=arc-20160816; b=pwZ07i+kK/CvTI8yqAQ1VggIQIYcvIRQZO7X6Ohjmw3ry4N26hV5OOKK5zOHzss9kh rbANo70zqDwqCrswE1iEhOT0ym42pf/aGKSOAZ6um4tifIpeh/OpX96jxhim7cNeNE2Z wy0sU6u2RrLStixDXbnvyAByGyvq37w0aqi9fazSL9OxrXACmXcsoBdxU7OLTT/mLigP 2M+hCPFfOnMlW5S2jXzPYM0A2uquQXUqtIuxSKzXozZ1T9VbDWCMKmb4bi1awISnpPSa /aYrbsByfzLUx1qFHqyq5ozjSopr+YhEyBVMgapT6gxq5oVC70Q4wOn+jkMWYBwcpuwc +3hQ== 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=Z/UqWc8PYvTWGaNBe1Eu9QwDLyQk7LT9igsRfScGdct6J20tMSZKl2Yn8WLV9wx1LV kbrf7kfKrwUYcmbFJhJgy+BHgQdK7fwcBH/45tLKnxpbwY17RfitHBWmIh7MhgVNo5II E9R+SwhYSXcjB2UZ3azciL3MmWfP4CkBoT/6qq7BX7u1PfqQb3JmLgJKOL5Of4o6DayL NTbqGeF5Xh9e0RRrWSpj2bnJLoWLpZRkPcqrS07obZHrtq4w2up0UsQXLpj5vuSXq2IB Ml58yYi9hS8no6um97tBTgLfZHWPUCL3hHtHImDOYRKZ5BM0vAgl7fbbWjXOV8qMw094 DiYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZvW5wJKl; 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 h123-20020a636c81000000b005428e832059si1427449pgc.468.2023.06.20.04.11.31; Tue, 20 Jun 2023 04:11:45 -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=ZvW5wJKl; 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 S232480AbjFTLKw (ORCPT + 99 others); Tue, 20 Jun 2023 07:10:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbjFTLKq (ORCPT ); Tue, 20 Jun 2023 07:10:46 -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 5F1C8101 for ; Tue, 20 Jun 2023 04:10:45 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f86e6e4038so2755831e87.0 for ; Tue, 20 Jun 2023 04:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687259443; x=1689851443; 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=ZvW5wJKlc0ib7KLmbQKG/rVpS9HZS9jYvVSEj8JYRVn4eObHkRHOkkm7crkF6kLM8b 3SR4fcwtGmnUgO6rOCh6N+vlVj0NSbWMpbPc/GNj9GwlXjKiJ0FA/L/kgsChGliYhdMt MZFBBGOL8Byoh/wdNP/CdTYmFU/a7zxS30LiA+yi1PpyavL4BwW7GAtXqCFIB7/WZilg PcxSufEtzt57Fb1GiaFrXh59KDCX2lYy0XxhzLDvxUkNQN04g5XeHpAxBzEjXSV5o102 tZrLrIEdf357gW2sw1Y+vXdTOMTHjl5GroN4pkjXPqXzyylG+gMLVm3ElPGxudkxYY8a XYYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687259443; x=1689851443; 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=jk6xaWltD/g0cOcmVXU1IMOgX86qSpLgUdr3NSMyl611eo1zA0bkee4BTKKpfXXpCX oPYvln1vsT5rfnLYD5SN4vQrxd9LgDXx9bbA3cf5u/+mCIBqm7GYsFiDL5Ixuks2Ayre 4ReNV/6h0HQX1CCxCztTrTxPCI/WYyWikvOJF0lbSJ+ztWNFZM9NmpgbHdkG+cuqq28K xuCe0hDmx651AAxpKPNdO8qqDqCPMB4Isz1j4TbVfpz5BYqYAhBA/wn+eWTy13TTXlbA lfkdox1S4K4wMcdUoxV89mxQMjr/j+5TWUdOjT0txIXU0BA9dxbZAFadsKWQAwGC9T+u M7vw== X-Gm-Message-State: AC+VfDwBhZHmZelkL9CfXxT4IFQA2zO39aBiPgdx0t3AiBgDJ9D4+uJt 0EXO0FeS2KthTG/xWb/0f3gEHfK6RSyZ+4fVLCE= X-Received: by 2002:a19:4f12:0:b0:4f8:6253:540 with SMTP id d18-20020a194f12000000b004f862530540mr3086610lfb.19.1687259442875; Tue, 20 Jun 2023 04:10:42 -0700 (PDT) Received: from [192.168.1.101] (abxj193.neoplus.adsl.tpnet.pl. [83.9.3.193]) by smtp.gmail.com with ESMTPSA id u26-20020a056512041a00b004f764716afdsm314395lfk.257.2023.06.20.04.10.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 04:10:42 -0700 (PDT) From: Konrad Dybcio Date: Tue, 20 Jun 2023 13:10:37 +0200 Subject: [PATCH v4 2/6] drm/msm/a6xx: Use descriptive bitfield names for CP_PROTECT_CNTL MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v4-2-b16f273a91d4@linaro.org> References: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter Cc: Marijn Suijten , Jonathan Marek , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687259438; l=1047; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=M+YceCSQbhF8BD7s1Uycd683ewMShr4OUbGYlX/cKSo=; b=Xf8hG5l+ir4khCTVmKbLCZnf4B5dK4hruBv6ZR33xJp5az1Bv32pwYt6r/ytPDp6yrEHct+hI KhUiDXIjdShDMyyvJymRLqYM0VWGJt1rbRunrDvooo1y6+oYXaH6RDa 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?1769219823088159839?= X-GMAIL-MSGID: =?utf-8?q?1769219823088159839?= We have the necessary information, so explain which bit does what. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]); From patchwork Tue Jun 20 11:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 110421 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3584022vqr; Tue, 20 Jun 2023 04:12:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7yz8S6izGUgSND7XUoA9nKsoeIkFMXWND8ZQjU72ShPGUcOjczr7yvJdggGXQYFUVBb9Lo X-Received: by 2002:a92:da48:0:b0:340:8b48:8d71 with SMTP id p8-20020a92da48000000b003408b488d71mr10737220ilq.13.1687259528458; Tue, 20 Jun 2023 04:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687259528; cv=none; d=google.com; s=arc-20160816; b=dZuqNXu0ApyWOm3l85zS6SzWwJH7tWxxAWQTjcmvbn5+ZhqBFYnCWutmHv1JoUuQHI pUHgxmxAQGWHHVgX8Us+BGkGpNdv1NhnhJZoPqgAthHOpTv2kWTjLQ3Xkkob4e/mPoPv 5DEhzf7YtgH1kGCXx2dGpsXkkprqCDNN1SDdQ7J2ImtcWEyBFEGJz9j/GN3YUAf/Cydq t9dW/6zHSvAFkmedafKBupeDKX7hTcWfJ6GxgjAWry1qfuiK3gztr4fEJhvmUiZ/0ypA mAquyipOd4M/LHxjRBadz4byK0iBECcy2LpPST/gGx/O2xACTa8tAyaTdJxxhGRMU8fc CEqQ== 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=qXvgXObuLUXgh3jnIU3RKwPMBc4ZARc1+vOEfqXJtnQ=; b=wuNqRlfaXxdn7QOGYVAQpq/0twXmSIZwYJGYecEu7aVm2muX3mcLWA5v+zEM/b8r++ XnixqzI5da3y7flY54EhcE+HSUNg+exmANJLss9RcykokZw4N1ZrbMnnJZc1O5BYj9/a OAk+3zK8/MiCb6q2jfJ2x5aV867DwYn/iCvhPeINXGvur0SpPienDhH+ZWLI3KtSQFgx F7MicZuOeAO0XzrB6VSY0NaIEv3W7elkPBaxUPEFjzsCPURQSaJ2229bsnFKQ1Lk2+rl jtD3uxRo7Zma0mrCmDuKy0ehcpxOyhGHyAjYaij//FLREYtCnpcFn1F/wWc+DtDeotkj WDDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nj1bLjFx; 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 m24-20020a637d58000000b00553b5116cefsi1633924pgn.16.2023.06.20.04.11.53; Tue, 20 Jun 2023 04:12:08 -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=nj1bLjFx; 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 S232579AbjFTLKz (ORCPT + 99 others); Tue, 20 Jun 2023 07:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232502AbjFTLKt (ORCPT ); Tue, 20 Jun 2023 07:10:49 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 891C0B2 for ; Tue, 20 Jun 2023 04:10:46 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4f6283d0d84so6031661e87.1 for ; Tue, 20 Jun 2023 04:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687259444; x=1689851444; 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=qXvgXObuLUXgh3jnIU3RKwPMBc4ZARc1+vOEfqXJtnQ=; b=nj1bLjFxDQ8N1dngAIoD5fFA5vBatazLEV7Rkl0NVSdLk7EjRHn3nPn4q7ZzwtgXn7 tefqdg+t7D7rjBfnifRhTu8ym5omzboW5s1nHWfyceXGDZtFvr2pZWVSPoK/TJDe96Ah SnBI6tzr6oJJ6aWQKzesHnLdvvBQNsvxBLHq6tDJsFVz+zNjLIC5L34SX7pT3/ziD6M0 LF6bvc2/iH9ZAGbbrlcvrR2X+t38B5zSLvcldDfW2HMyAv4oXs7EAIa/242H6P5RI45X fTRACPTRJ06NnffMOsUA//H9n/kwB1d8MbVfiP0Yw5D7M44x14/5EWok0qua/xoSP02a IsOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687259444; x=1689851444; 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=qXvgXObuLUXgh3jnIU3RKwPMBc4ZARc1+vOEfqXJtnQ=; b=NuRfL3DvdP8KsB00cX6j49jMiT6zUhITN8IGpF73ae2PqJ8/XU3Zyvk7mNDaXyYvQK LRcFq4oaBdTfGkqxXVm7ZPUqrYuIKMUprPRW/TI6/klt92tYLUTrOPbsV/JumPpbW2By 7nCg2TDwS9WzlqVj2rCENz7yfzm1ui6nmQgi9egVSVN4vucUuY9ruD8HmDsSqr/QWsi+ QmeZZUeY4sv+iaTNitomY+jSGmCyY4aH0Nnr+J9YaGwEps8ZE2dW1FSDG65MBYdB2p1z AYjarPVI+VhFdyqD4LHYfwsA3FZxukxNUS6yoR8Kz7jku181UR67WD7jAN9CaoJgrpCK BflA== X-Gm-Message-State: AC+VfDwRCxVJbBo9Fc6lWSOKPNS/gMz0zIDAMca3nEWULkHWqkNtAxTJ KinJTHsZx7YS4LuqQf/s+BVrfQ== X-Received: by 2002:a19:e346:0:b0:4f8:3b17:e0c7 with SMTP id c6-20020a19e346000000b004f83b17e0c7mr6453920lfk.7.1687259444302; Tue, 20 Jun 2023 04:10:44 -0700 (PDT) Received: from [192.168.1.101] (abxj193.neoplus.adsl.tpnet.pl. [83.9.3.193]) by smtp.gmail.com with ESMTPSA id u26-20020a056512041a00b004f764716afdsm314395lfk.257.2023.06.20.04.10.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 04:10:44 -0700 (PDT) From: Konrad Dybcio Date: Tue, 20 Jun 2023 13:10:38 +0200 Subject: [PATCH v4 3/6] drm/msm/a6xx: Skip empty protection ranges entries MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v4-3-b16f273a91d4@linaro.org> References: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter Cc: Marijn Suijten , Jonathan Marek , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687259438; l=1073; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=p7u0J4uljF3tZrz5h1ZuKJqCS/MqBnjZGFZOc1JmV0E=; b=aa/j+YpmthCxcgLQSQsqmjhv6KqCYw+HpswdGPxAmK2MGKVBAQcwQbn13IonEP6CnlhShwK15 MsAo00yuU40DIum5DT5f74Z+YZ1dhhJaV2mUJOkFqvPWhqBVEVF+Grs 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?1769219847074462857?= X-GMAIL-MSGID: =?utf-8?q?1769219847074462857?= Some specific SKUs leave certain protection range registers empty. Allow for that behavior. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index cd0c9bccdc19..488c69cf08d3 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -935,8 +935,11 @@ static void a6xx_set_cp_protect(struct msm_gpu *gpu) 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]); + for (i = 0; i < count - 1; i++) { + /* Intentionally skip writing to some registers */ + if (regs[i]) + gpu_write(gpu, REG_A6XX_CP_PROTECT(i), regs[i]); + } /* last CP_PROTECT to have "infinite" length on the last entry */ gpu_write(gpu, REG_A6XX_CP_PROTECT(count_max - 1), regs[i]); } From patchwork Tue Jun 20 11:10:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 110432 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3594537vqr; Tue, 20 Jun 2023 04:32:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ67jr48a2xIFqISP14NrZG3o/VQRiiIrvkIt1BguEZ4Fs60gXssZLGqCTfKMZejp+1V/Xpb X-Received: by 2002:a92:c10e:0:b0:335:7be2:26ca with SMTP id p14-20020a92c10e000000b003357be226camr11611343ile.19.1687260741125; Tue, 20 Jun 2023 04:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687260741; cv=none; d=google.com; s=arc-20160816; b=QJt+TG5SGU8jH1xj5motizol+WKfIogftL/PzJng6UzfWVPsSc/jiK36pla1l7KU0E DNnMo0fiq8dDnWssGT0jherPvGs9XZ3NjEVDKN3sDYPFWl+EkfliDS3vJXdjYodFxH6J QB6Rh2upJiJ4Ee3PnINZjUXnYkzanKBEHHp8X4k4B+1LJWb+H2zXnBQogIYZOJoRlAT+ moubkW0VEizYds1rmATUY02pg/TRud6z8aMXc3sYkUVWcsYh12pf3b+ysLHhPh4mLFAp AgNRqd/4/XF/Ha+hvb6STRwdRrp9WDssgz8t+2RK0XQYd1AqSnFQTwnTTHzF46buwJMh HO3g== 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=QFAqDiLltNdklyeWnFl2VhcGAm3uwoOV8Onj4m150Sc=; b=yepiYdkJp3ns67E1LnzAw4D2h6/ypMQS+uUne+3TYoxAofgG4F61vaoxrYP4F8yVHu 6+lZqvVrPv45LFJUW7685wQSJVwxw2rO4qP5dj9sXTPSde4Ke+2yd/UXEIVhReR+um2H +69k9Yz5ymJB76av7bIBxWTJ3dpzHkOltmp16+MKEHbRv9PnguJSppe07Hsk6sv3YArC yXbhT42Wx+P3CqAg6atYCTa+3MgClqsNXY9pVK4OHdr82W4x/3y5vO8tt4/eKBYppWf8 yKYz8tS6zV5eTF80J4YqkjVbBqaifxW9qohdOzS7hmJk6A9QR99FJ3soQyEjw+gxb1Ik TIrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=INJmXdEm; 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 b7-20020a656687000000b0054f904a0a0dsi1515633pgw.624.2023.06.20.04.32.08; Tue, 20 Jun 2023 04:32:21 -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=INJmXdEm; 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 S232625AbjFTLK7 (ORCPT + 99 others); Tue, 20 Jun 2023 07:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232530AbjFTLKv (ORCPT ); Tue, 20 Jun 2023 07:10:51 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FB6210D5 for ; Tue, 20 Jun 2023 04:10:48 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4f640e48bc3so5887319e87.2 for ; Tue, 20 Jun 2023 04:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687259445; x=1689851445; 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=QFAqDiLltNdklyeWnFl2VhcGAm3uwoOV8Onj4m150Sc=; b=INJmXdEmpvVXTm7i3mjAO0uySCULJiYlAGfi0xAC/HQG0TNF6pFPNOl3lRfnOcJmLV YTAsarOxgMOd1VtScH9QWuJzdxutC+CQzcDTWZzAggCpPr5HFxLK8PzB2hMeth75CCsK TDsMWhdivHMJC9nHTOEQnQCZZ9jgdgExA6AYseO9hp02lA4+ZoEnP/PJBsARms+8+2Uf iblB322RwEQAfICyC2mTbMlhG0UpgCiM/jOj7kw8dbYWUrEh789B1K+iwllvIjipSm0k UX68ERtZsgYYR7FQTUuBw4HXtDhcELRLDaiwqcFIrVqWn/AJvfNdJNW+vD3cDjKqRomQ 7Vvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687259445; x=1689851445; 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=QFAqDiLltNdklyeWnFl2VhcGAm3uwoOV8Onj4m150Sc=; b=C1GB4C3H6viq37eLdhzdOkHtr9nR6EgSYj6ZsqPdCB5SJ604qkycFla1D2TBTx5dXD QX4scacM1XFzWBzvqq3/nGFwrf0OnUAqFe0+2vDzzlxawu+aSDFN6mqhXnYLPpx/YWnP UoqTSFp+Zyfy/M1BJH2rWASvFZ3j2Tt2OCTWYlp/Ogub/6i2ll4Rv1r+rwVcpdk0kpOt AvuserInmEm9GpygrG8o3oGwKDx3MVMbbucHc7Z6BD6n0ZPksyeYrHhDqxlkdkCnqIPB Le6VeU5Fe8c1YweA14PvZw51/RUN4oOlv2gc/LBq8j+UWutCsVO/BDB5A3zew+6GCQOQ QaZg== X-Gm-Message-State: AC+VfDyJiyAPBjx06v+KEbvwo2XlSgeiohSJodvsJGRtX3OMfqRflvRe +sGVRPvx3rureS6NEe9ikhTeyw== X-Received: by 2002:a19:8c18:0:b0:4f8:6ac4:84 with SMTP id o24-20020a198c18000000b004f86ac40084mr3396390lfd.8.1687259445484; Tue, 20 Jun 2023 04:10:45 -0700 (PDT) Received: from [192.168.1.101] (abxj193.neoplus.adsl.tpnet.pl. [83.9.3.193]) by smtp.gmail.com with ESMTPSA id u26-20020a056512041a00b004f764716afdsm314395lfk.257.2023.06.20.04.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 04:10:45 -0700 (PDT) From: Konrad Dybcio Date: Tue, 20 Jun 2023 13:10:39 +0200 Subject: [PATCH v4 4/6] drm/msm/a6xx: Ensure clean GMU state in a6xx_gmu_fw_start MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v4-4-b16f273a91d4@linaro.org> References: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter Cc: Marijn Suijten , Jonathan Marek , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687259438; l=1213; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=xLnqc6AHpOSP+ED80kyz8V2j7nuk18OJ2Jy8h13Cf1I=; b=QopZRc6EUyhns0KVw6SVS/mXnt2VY3dxbBXKlHwjamd0sOsHi9ILo2buRVPW4sflNOLzCCv/3 uwALjCxRCfDCC8KElFRyXVUV2TMrXf3AA/bOjOARIuUN8DEdT/p0VHy 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?1769221118782031101?= X-GMAIL-MSGID: =?utf-8?q?1769221118782031101?= While it's not very well understood, there is some sort of a fault handler implemented in the GMU firmware which triggers when a certain bit is set, resulting in the M3 core not booting up the way we expect it to. Write a magic value to a magic register to hopefully prevent that from happening. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index 5deb79924897..9929ff187368 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -790,6 +790,12 @@ static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state) gmu_write(gmu, REG_A6XX_GMU_AHB_FENCE_RANGE_0, (1 << 31) | (0xa << 18) | (0xa0)); + /* + * Snapshots toggle the NMI bit which will result in a jump to the NMI + * handler instead of __main. Set the M3 config value to avoid that. + */ + gmu_write(gmu, REG_A6XX_GMU_CM3_CFG, 0x4052); + chipid = adreno_gpu->rev.core << 24; chipid |= adreno_gpu->rev.major << 16; chipid |= adreno_gpu->rev.minor << 12; From patchwork Tue Jun 20 11:10:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 110423 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3588988vqr; Tue, 20 Jun 2023 04:21:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4bdapA5UH/dOsZRbpc7hpqFlrGcNSNGHequB5RwC79HxICNFgu+gXW6/3PPkOJlutASYsB X-Received: by 2002:a05:6830:1e0d:b0:6b4:6858:3788 with SMTP id s13-20020a0568301e0d00b006b468583788mr4971159otr.34.1687260100525; Tue, 20 Jun 2023 04:21:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687260100; cv=none; d=google.com; s=arc-20160816; b=mg1HPsLMhEvcRxR5N00W7fqQDqdHzoptQPcCSiYiB2QEEqGOxzoUDPF365rMleEX50 zwVy40nQIhntkmJUKDUeKi5GsOBrFi4698Htcr8ET5bvu2LW2Pyc36iqoJrb1AfbBu2D DRVKEynQKRIHw5xY/YrUNGJbtzCjuzwkSTG+LAgAPePAKdHH0TjjNCMopVH5Rj2S+Vj7 JTEb8bV3I20n8PuWw3HEk1xlx02ZW0CRJZm9MJA58jexsJVlA6kd9b4pFOloiWo5CnJl +tPqHfD+r4zIRwQRQC4IgdISyrDcxF+ptVLlcIbkOZtWrsR8b6+ZLraQ3FikEKERGaCR U46g== 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=uceOjOeFYW3YrOQKTUQY3Yfirv5mMIrxQprXiD+0ONY=; b=ypOhqHnaiYRUobAGgJDjoTrXPsNC/mdbSL4BJRBNMxH4ZA6FcOIrP9xADDnmlqaim7 YZ28qGb9FpoEBO5YkQ1LflObblXwb8ft3MBQPHjhWRlPGqkxoadVh+m5wWHf1wwyJdlH jLhyoyC+WIOGnn0Df6U7agdTnaIadot0fnx3boTS4Gf1SiIS06CbnSQtRwlN6IxX+vX9 I5rF7Y1/I54095GS3y1R2VhTH+yg4Qz4F/thVZ3bqKi6RVSOyrqpmUbAgcmIRNpGuZ8U sqBe0TvMNcCG96XY3kvfqWxUzBvSOpOg4A6gSzStEf7Irwrr9YKqdQcYPlZGBjMmIYsf tDqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ztMM6FNq; 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 z6-20020a63ac46000000b00540107fc033si1515916pgn.282.2023.06.20.04.21.26; Tue, 20 Jun 2023 04:21:40 -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=ztMM6FNq; 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 S232635AbjFTLLC (ORCPT + 99 others); Tue, 20 Jun 2023 07:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232596AbjFTLK5 (ORCPT ); Tue, 20 Jun 2023 07:10:57 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CDDD10DC for ; Tue, 20 Jun 2023 04:10:49 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4f8777caaa1so1597990e87.3 for ; Tue, 20 Jun 2023 04:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687259447; x=1689851447; 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=uceOjOeFYW3YrOQKTUQY3Yfirv5mMIrxQprXiD+0ONY=; b=ztMM6FNqBkOpSwDiWJL2e7rSNq6VWJS8i56x3Kg1UAKPk0mqK5tp4Z1Yhfj5wkK3lN deZ21ZkowskLeiZHgh7zmp7/Lhfuj/Cg9mLEwp6mbEpH5ubKPgFBqZ8zu30Av1kh3Vnd VeAmnCDWoFAGVeG0iMCJ5B+MIi4+xOFb86cf62GiET18fIvyiejPMzBZ9Sy2VB7fDrbW 3Gm9yidK2o2UX1cdMyJMGrSsQ58BFD88ZMrhvX/K9nXFV/grqVT1Vp+mf559E/JD9Dnm uFuc/WLqEaUi+hZmZPcLjl3Bq7AHXEwLwxiuccTkDcj9OAGRRXCEHfWucy1MMWyIeDT8 gzyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687259447; x=1689851447; 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=uceOjOeFYW3YrOQKTUQY3Yfirv5mMIrxQprXiD+0ONY=; b=TtnO3xgEBZur7S/e8bfCM96HoLQp736aAUNPqw853mQBwhwPjLnjBxI5eFFC5nnoKr BwOIPg0+9kCN7K67ppNlXLeiRIQLP/JrjqP6+clhu+GR8wioFOj57SHyU773rx6KP4fK oIIQo5dTwu1XolBPrOWf/JgdSr72StVw6pLlpiTIqBlFNHLX223v0IIVC2kn0s/dp6iA UN86uAIAZ04/CTUJPcvX5Rs3Vhsk/lyXh24MKtZ3/aCgEMCHIj41sfvyDMiU9M0ON0c3 wufNT5xypASrPET8tDkRb2PgtOFjKPLFbj4FVizeGeEN+zMx6kC7U9mdvIw8hf2PUj35 0Oqw== X-Gm-Message-State: AC+VfDzjuWozTVGqjiM77qcxyfnbY9/lpeY1xJucMpXXKdbWdmLTHau3 ekFOwZKdnxKLdBSJuA7nCjDrBw== X-Received: by 2002:a05:6512:47c:b0:4eb:3fb2:c56d with SMTP id x28-20020a056512047c00b004eb3fb2c56dmr6884482lfd.12.1687259446701; Tue, 20 Jun 2023 04:10:46 -0700 (PDT) Received: from [192.168.1.101] (abxj193.neoplus.adsl.tpnet.pl. [83.9.3.193]) by smtp.gmail.com with ESMTPSA id u26-20020a056512041a00b004f764716afdsm314395lfk.257.2023.06.20.04.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 04:10:46 -0700 (PDT) From: Konrad Dybcio Date: Tue, 20 Jun 2023 13:10:40 +0200 Subject: [PATCH v4 5/6] drm/msm/a6xx: Improve GMU force shutdown sequence MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v4-5-b16f273a91d4@linaro.org> References: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter Cc: Marijn Suijten , Jonathan Marek , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687259438; l=999; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=HgL0AdZtJqxx0twaid3jHnuqKqCDcBlTAxb3JHJlxVw=; b=6OUxqP1UratNBHaIvk/AXKzEsNL/3F8JlTdQ9lFpHEpyOPk+LGEI4QiHbJ5NtMR/bxi4Su24H 3Szj+ZmchkmAR44vkHol0KW08DCQRUASJZGxokA55rQj2A3CcjObSQ4 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769220447162855864?= X-GMAIL-MSGID: =?utf-8?q?1769220447162855864?= The GMU force shutdown sequence involves some additional register cleanup which was not implemented previously. Do so. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index 9929ff187368..55b12a8066ee 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -893,6 +893,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); From patchwork Tue Jun 20 11:10:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 110434 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3599839vqr; Tue, 20 Jun 2023 04:42:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7NY0BRYqhQrpiOSpx2wucm93I+DVzwMHvZOes57Yd1xR4N7NDEoiEcow9VdU3wRf2MEloe X-Received: by 2002:a17:90a:64c8:b0:25c:2cf:1d20 with SMTP id i8-20020a17090a64c800b0025c02cf1d20mr8892353pjm.4.1687261379281; Tue, 20 Jun 2023 04:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687261379; cv=none; d=google.com; s=arc-20160816; b=J25z/Ua6PVQkL22vC+YCtqgqfqB4hhXs7ujEAdqNiketRKGi/DK0V5gydZIPwx7OtS 1lg0OtXErzXlrbf9dLqgIJgyW9oBPmDFCYs5uYFUq6opWOJP5ivlXmNYuWGvINsbXlK2 JlDaWV5YMmZEF92/Y4mdrmUaH4wsz509pUVf7iDI/3O72qYjtXuWQ9//zEVFTX+HU6hK kgSQuT+6YAGlT7oSGBrGknAwtc0uzESrQqGu3qB/FcFpcfLuH61vJgoP+Cn1qyotgZAe 9l2Osh5ol2g+qJJQ5/+aUn26wX3a/iDvnNY9VdRQvn7t/NUhZEHbpceFWAOdqPj5xvXt SVGg== 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=pwTI7UHTcKqCvzBNFhABN4+E8WkvXM5Y1T6fiTPNJV4=; b=i/mXRcFfLkqlfB+Ipccov7Li7xWD0NHknTMVkGbeMa3/apUNaLlXaCPJ+59ZujAg3t 3VK8onDgrXH1cEu3ZRX3+4ekF21wTYxYqszcicgKjaLFEMxOOvgwzoXoIuhgp6vM34m3 KExAx5BHnW7js/v32y/xbx0bNB4Hh+FncEPrtqfOBkSDY4jWM+EuKJFVAW/D2/SceVWU DmHKNyu9sOL5K/HXa3THGm1rJgwr00bJRg4jcEE+tl+rcxngucrGf4Gp+0lmBzXvzhuN 4eVxTfTx/b3YiyiXGrFo5jcBUn23b3PzQHlm/8r+twEQuJQp9xJmQNH3+QUiYJMvq3Rl GL/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jt2P+IIo; 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 lj8-20020a17090b344800b0025bdebbbf76si1693123pjb.91.2023.06.20.04.42.46; Tue, 20 Jun 2023 04:42:59 -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=jt2P+IIo; 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 S232647AbjFTLLG (ORCPT + 99 others); Tue, 20 Jun 2023 07:11:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232608AbjFTLK6 (ORCPT ); Tue, 20 Jun 2023 07:10:58 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36F86E41 for ; Tue, 20 Jun 2023 04:10:51 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4f640e48bc3so5887371e87.2 for ; Tue, 20 Jun 2023 04:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687259448; x=1689851448; 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=pwTI7UHTcKqCvzBNFhABN4+E8WkvXM5Y1T6fiTPNJV4=; b=jt2P+IIoyrMUIbyiSpdBY++NFIk6ttI3RdDAnkK6G7tKIx+GdGOLRSRlz8W3CvtL55 143qAJo5noCZFYsgJ4v3Xqc4VM4rHGPgeTC5z9BUoa2gGVNNDpjRCQXDRNZ3/IfX8tCQ MjcUnJpm4T4fCHYtrN6Y1vdYgiS96MFfWBO6ltPxb+ltTHtncey+kiivDPrydkxtGu85 wjpOxKZs6711sDHJhi0txe8LKOKKzu/GLB85Qk2+sE1qQijJ0qZXBFtMvHFguzXNrkMa z7yJLT8h7JHC9NkCEcGSbl2Sqyt/5S5bJhP893+eYtkawq/hsf5UZLiSx1T9ks0glPhK nCPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687259448; x=1689851448; 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=pwTI7UHTcKqCvzBNFhABN4+E8WkvXM5Y1T6fiTPNJV4=; b=NimA102EzWRUQ6DIZiQq1Ym3iybc4nIk39icrr9zYqopk8WYijoQdWx3dXA1YX0R7a ITru89wJSBMFgtYP61D4XrSl+O44bRrl+OOGqwCn2R0sPIsLa0dXiEOyJGjzXwO5200D l7pW98kmAtummJJWoxt8d5y4PmTfj0lD/Z4aT9KOZMrBxWhiE0quBegohiOsMNv/+NEv RjcBpoyl0ZlbHdhgTwcoSeokcnfkGh9wuP1lTXKFrB5OkrWRWaHFgCn3NQr/vIIhM4VI qbZ5/4doFrj13wp6NPucfeMSb0Ab9r2lz7u88T9RPvxcyC7I2A9EKH2cSMGLe1khebkq yqUg== X-Gm-Message-State: AC+VfDz6toB8vvEiGNsUo0eKn2Ps9Gfn8GFBi81ECiZaLNGWTbss125X VUF7bnwwu8lOcG3C/vPwtin1Jv156PsV4dW5cAA= X-Received: by 2002:a19:2d19:0:b0:4f8:6dbf:401d with SMTP id k25-20020a192d19000000b004f86dbf401dmr3578630lfj.57.1687259448165; Tue, 20 Jun 2023 04:10:48 -0700 (PDT) Received: from [192.168.1.101] (abxj193.neoplus.adsl.tpnet.pl. [83.9.3.193]) by smtp.gmail.com with ESMTPSA id u26-20020a056512041a00b004f764716afdsm314395lfk.257.2023.06.20.04.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 04:10:47 -0700 (PDT) From: Konrad Dybcio Date: Tue, 20 Jun 2023 13:10:41 +0200 Subject: [PATCH v4 6/6] drm/msm/a6xx: Fix up GMU region reservations MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v4-6-b16f273a91d4@linaro.org> References: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter Cc: Marijn Suijten , Jonathan Marek , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687259438; l=1342; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=yg0CsUYst1MC0yCvcYjryDQIsWMdtt76iHZrZNL17WI=; b=GB3+ryq3V2BFvCAghxWY0vExkzY2tN7nu7hHmqLlYbOvEVQ11xjN4tpj9GRNP9ReuITm1JCY6 e6ZBGvYqexUAuYjiW/9pR7KYSYyhlgIf3t2j677KPojp0fufFkJ2xG6 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769221788357948683?= X-GMAIL-MSGID: =?utf-8?q?1769221788357948683?= Change the order of region allocations to make the addresses match downstream. This shouldn't matter very much, but helps eliminate one more difference when comparing register accesses. Also, make the log region 16K long. That's what it is, unconditionally on A6xx and A7xx. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index 55b12a8066ee..d682c1ed48db 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -1640,13 +1640,13 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node) goto err_memory; } - /* Allocate memory for for the HFI queues */ - ret = a6xx_gmu_memory_alloc(gmu, &gmu->hfi, SZ_16K, 0, "hfi"); + /* Allocate memory for the GMU log region */ + ret = a6xx_gmu_memory_alloc(gmu, &gmu->log, SZ_16K, 0, "log"); if (ret) goto err_memory; - /* Allocate memory for the GMU log region */ - ret = a6xx_gmu_memory_alloc(gmu, &gmu->log, SZ_4K, 0, "log"); + /* Allocate memory for for the HFI queues */ + ret = a6xx_gmu_memory_alloc(gmu, &gmu->hfi, SZ_16K, 0, "hfi"); if (ret) goto err_memory;