From patchwork Wed May 17 16:50:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 95431 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1278974vqo; Wed, 17 May 2023 09:51:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5a3IJiAFPZiYuMCexxo4ekhUP8xgK4YBeCCgQvMlcJWmB/EhYpRLQjGgeHdGo4mRY11FY4 X-Received: by 2002:a17:903:32c7:b0:1ac:7345:f254 with SMTP id i7-20020a17090332c700b001ac7345f254mr48280701plr.33.1684342289401; Wed, 17 May 2023 09:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684342289; cv=none; d=google.com; s=arc-20160816; b=DjqIqGZa1PaOzuAcwolJ+pELsdALh1ytDSoDQ/NsU8uKeRwtw27SV9a5/IGe7g0Ldp Zs33m7YFud67Pkl/k/kTkA4a7GN/h/0Vl+Kj3crrURiiqZnSam9SICrtwTjwUNNdzbo5 koEcP9dBk4IzdoGSOcBVukOmUe4xze01zdxhjeNJxetcBYINtxOeqa9A31kFY7O/Ty1+ 9oAU+6nnAU7GDwcPZ4C/jO8CD2XgbXSBFxnm0u0KBj/xL1iueT+vGJeLJN6klYARt9mW DLcuXQXDHhZDART2EFKkVUWwu+rKPyJwQbWNpDVCDX3q6VAPWFbJc5G1iiK1slQntyjt wlsg== 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=TYnjMvr3c+U3gEgGMSSumyjYrLuRnotb/3F/SfKgnsc=; b=Ao1qc3yV8umXD+UpeEglhI91nXM9PLnjBIvBDnqIyK1HTE7CJzlXdrMWeyy9z8Alvd n0LOYxKH2INU93DJPiEpXRNDj8ItywTN70i7ekaze0WILGIEEi/YBBd1Jr1FSk760CaJ 7Jp+onPvy8th/s69EYC/Ma37BdsTEBLGG8z+AG+LLOJMng3NO5IzZ1KQg/0sFz1irrrR FsQt/f/C4nT68TJK/o62qngYU3sGCcbLmyVwWaDAe5UYf0GgGPwnjvooHv7i2USz263J 96HPRPWm7g6SWl9KCZLRiZDiHtFscDUAQNAeHSV90htXDflgddaKb73Luv/G7J4/hOn2 H4Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H3+H6CK9; 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 ay12-20020a1709028b8c00b001a6565a16c4si20410215plb.493.2023.05.17.09.51.17; Wed, 17 May 2023 09:51:29 -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=H3+H6CK9; 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 S229642AbjEQQud (ORCPT + 99 others); Wed, 17 May 2023 12:50:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229752AbjEQQuT (ORCPT ); Wed, 17 May 2023 12:50:19 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84A6244A3 for ; Wed, 17 May 2023 09:50:17 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2ac785015d6so9894571fa.0 for ; Wed, 17 May 2023 09:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684342216; x=1686934216; 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=TYnjMvr3c+U3gEgGMSSumyjYrLuRnotb/3F/SfKgnsc=; b=H3+H6CK9OlvzfGPyRfjrVtlkNebZoZL80kYdFo90TWG3Kza3b1d9b0thw7XjQDCR5/ QkvT8L0j0o8qGLCDCGQydU8iLbrdgtBDsW/ZpYiw2JhmMT0g1laPA8k4AE8MPwwq9SUk RFBJBgrSlZyEVJZGtGhHlAHp7V4GjGM1CocFggbadNioiBCmT/lIrG3io2TYa6jaTHtf W7jlVRcCHeAfglEIhiR2G3LWrbrCCdPGgcNeuPdR0RxlTU803i06zS97/SN/P6dXHOIk ppAkxOddvRR+SZINU9HvalMy8Z4cJi2uMAe6i9RPVuZaTf1TBz0wwKx0lDggHVYH41EP NpDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684342216; x=1686934216; 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=TYnjMvr3c+U3gEgGMSSumyjYrLuRnotb/3F/SfKgnsc=; b=DLC9YWj/l5ZwvgXY7L2LHyYRdhlkedzwGSXqXvD8nhrLnh6EyjMah9m/B6J0HSd/++ 41AHUbDlhp52O41VjU7sp3y0C7JwKkviuYeHvek9KYUn+vDTrvCbofUOeyV5SDTLxH2Q lcgPKNVTdZgWGSv2nJXSZTx8bLskbl1V5qCbJg6NlEInF4X3NRT5ivq76F28MdUA/WLw WNA9VUleFaSSDA89BQ3XEzfBNKsPYMWmWN1N9UKX2TwITKsXsJv+qePn9M4HjutOhFY+ J+bECTEwtD1RYAG5tGeSbQ00SISUO0m/luHBQ8StK9K5Ko+U/PDm2d0Wf7VaqqNwbaxF T+Kw== X-Gm-Message-State: AC+VfDyplBYB9yn4yHGu5uyQQ3ChdQqR3WyuSxV/kNtFkIqMUiiyb/y1 q17qkCSKqFBCXQJDT5oIK0iR9Q== X-Received: by 2002:a2e:3211:0:b0:2a8:ba15:eb6f with SMTP id y17-20020a2e3211000000b002a8ba15eb6fmr9431605ljy.6.1684342215787; Wed, 17 May 2023 09:50:15 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:50:15 -0700 (PDT) From: Konrad Dybcio Date: Wed, 17 May 2023 18:50:08 +0200 Subject: [PATCH 1/6] drm/msm/a6xx: Explain CP_PROTECT_CNTL writes in a6xx_set_cp_protect MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v1-1-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 , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter Cc: Marijn Suijten , 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=1684342212; l=1118; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=aeaKOCz5rng2fUAGM03IzdiKTh6ymb1woS+RnpEksJ8=; b=kDW/wsHgJ4Xp1eVrDnOZAzxAODW5ws6Zqm/96IDWguKJ8oITdolvZOvBjyGjQEJPILzMHfobA T5r2ncZOohjCdxOLtmFco0HTV27E/+hyiab/rQ4ovzpEwkkpSRj6m5y 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?1766160900113107943?= X-GMAIL-MSGID: =?utf-8?q?1766160900113107943?= We have the necessary information, so explain which bit does what. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 9fb214f150dd..deed42675fe2 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -771,9 +771,10 @@ static void a6xx_set_cp_protect(struct msm_gpu *gpu) } /* - * Enable access protection to privileged registers, fault on an access - * protect violation and select the last span to protect from the start - * address all the way to the end of the register address space + * BIT(0) - Enable access protection to privileged registers + * BIT(1) - Enable fault on an access protect violation + * BIT(3) - 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));