From patchwork Fri May 19 13:29:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 96428 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1242661vqo; Fri, 19 May 2023 06:38:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7aBrL3ivfqoY878D8nOGFvqx1FsVCIZ2bbO80klJTSQBfutpeVIYVjW3B0BxDs1GB8hwOq X-Received: by 2002:a05:6a20:2591:b0:109:1310:958b with SMTP id k17-20020a056a20259100b001091310958bmr2492048pzd.37.1684503515779; Fri, 19 May 2023 06:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684503515; cv=none; d=google.com; s=arc-20160816; b=b5JoMwvUTRH0pPrHO3CnnUHoA36rLtU5rZFe4zgvm0qB+TO/V4+KHryG4fOVil92Np 3XDrzY/2VM0aUNsiNxeYzVLVicdjIWdASIsjeyBCZfZDPgPcxsrZDXrOIkqTM43yL0fB 0b23eS8ikG5HpcUTGNglpxkyirOfZJN0XML/UAU3Z3vt/z5MGg41wrP7lVXMbijDDor0 dKsp2RftDsejRMo5Gh5L+Ev5HKc36KzWw7L0Mesk5W3Ke1K5OyoEQ58W+A6219wjyo3F PQ/RzOD3QhzpTjt2P8BGMS6Z02BTQKIfL6EEkTpty/fDCqk0nLtPu0Uaja6JW5aUoCmL N8rw== 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=GBhLY1RBB0gRiRHK2AH+Ew8caVNbMAw5AWStImZv0V4=; b=rPM7AocUVFcvQWNyHscOi73jhvApwzwIKpAxVUlQQjOx48ERdXu5QT8z193PzIjLMS IONoYObfo55wHDMKWAqx2nIj4OtrMdQXUp8Nv+I9uWDTayhOBZAOThNoRvPOTF68kmP5 qyF+PV+dxgQL/m9oF/a6/um2ExUX3NZ2DJln7jJoX0b/FOt9z0ipYJlCKJBVvQvPajFe MqYLWhdeOMRFfNcWSlGxv54MS1D5yazclVEN3O4iB+Ihe9n7ALrF5bvqyLyFIt49QpVW Cm31Xe9428/lKhhSjCx16FKC98RD9AiagWIF8mBW1rITHvFob1RQggweXvkhDrhF9ZEP HQGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fUM9Sf1C; 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 p5-20020a637f45000000b00528c170e4f3si3691435pgn.544.2023.05.19.06.38.17; Fri, 19 May 2023 06:38:35 -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=fUM9Sf1C; 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 S231756AbjESN3Z (ORCPT + 99 others); Fri, 19 May 2023 09:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjESN3V (ORCPT ); Fri, 19 May 2023 09:29:21 -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 34B8A13A for ; Fri, 19 May 2023 06:29:20 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2af1822b710so21302031fa.1 for ; Fri, 19 May 2023 06:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684502958; x=1687094958; 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=GBhLY1RBB0gRiRHK2AH+Ew8caVNbMAw5AWStImZv0V4=; b=fUM9Sf1CFj5DJCwIfKnYJ6R5zl2ELQpvHxg4T+Iq5cQR/PQng4wmMYRSvNbvO0eJF4 g1aJ16Uo40Ktef25eTPMWy7PLk/e4lk0O7uzoFvJijUxf2WNmZH2NZ2qRkB0Mur02YQA Y0smjgE3TKcczJMI+A+vKHWYDmX7T2ymW9XE+s3OX3BXUvMr9HyUZEuuTbr2KpvXOaMg zVWvUitWelt2i0IR9pbfz+CV2DAb4b9q3QHQkWnXuTtkRzGs+ooL+1FZpwchKUT+SHbk oPnMUS+41ypDb3YT4X1ZI+OrN4BOy1xBKrC/1QGxmP09N4gucmGIs1Bn/c4FmMNwGcP8 ZVZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684502958; x=1687094958; 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=GBhLY1RBB0gRiRHK2AH+Ew8caVNbMAw5AWStImZv0V4=; b=foGUHYZhNlD6TXetAoLq6QsRhUJC0p0JO2403cnwV8DhEplvhGyZEdkmjygR769pDi 1/X5opwWAxELxOoWECsVPbEFtpGGWUezgWuJ4igX9kfNbA2LOPImCjmULDSL4SHncVuT hUeUWXCmrMrPCF96b3qlobrCT3lOzj6Qg4eH3GVi3EOMkZyUJalV9tE696gQuO+R+mez 533O3jxxhfstY4I+p0iokJhP7VYrVq9ny/cQ8Q0bYP2fGnzZA0kozOV5GMEaB4PJ/DtD wSk39nrmiUaV/bhPZD6Qsejou0MnZz3UKghkUSaIJkGBo1m325WuQhhtOKc3tCIIYx6E Omhg== X-Gm-Message-State: AC+VfDza4dgX1UZ5fu1qgFZhW3gl7bU2Jipcy85wdynhunT43JcCdsG4 2YfW955/xKOe8WqqJRie/pmLpWe46OkTMGfjpDQ= X-Received: by 2002:a2e:8695:0:b0:2ae:db65:2d01 with SMTP id l21-20020a2e8695000000b002aedb652d01mr795280lji.23.1684502958286; Fri, 19 May 2023 06:29:18 -0700 (PDT) Received: from [192.168.1.101] (abxi58.neoplus.adsl.tpnet.pl. [83.9.2.58]) by smtp.gmail.com with ESMTPSA id q24-20020a2e9698000000b002ad92dff470sm821384lji.134.2023.05.19.06.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 06:29:17 -0700 (PDT) From: Konrad Dybcio Date: Fri, 19 May 2023 15:29:06 +0200 Subject: [PATCH v2 1/6] drm/msm/a6xx: Add REG_A6XX_GMU_AHB_FENCE_STATUS_CLR definition MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v2-1-5b9daa2b2cf0@linaro.org> References: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@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=1684502955; l=867; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=OCiKX/I/i3QBFBCW7ZU+1vuahZ35pMyKYqaVhGEDcJM=; b=mg01xARFIrulLxUI9/I/yVrcCgcgVFbSedvUodXJrTp6m2XCaCM/yiyj5pgGMeTbKrWXmVHu9 zyYpddTSpXVAJBKkYpPZaAmHxLlmc3SwrXNoWJEA65Ga9aAO20VxL6E 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?1766329958763449631?= X-GMAIL-MSGID: =?utf-8?q?1766329958763449631?= Add a definition of the REG_A6XX_GMU_AHB_FENCE_STATUS_CLR register. This may be substituted with a mesa header sync after MR22901 is merged. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h | 2 ++ 1 file changed, 2 insertions(+) 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 Fri May 19 13:29:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 96426 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1241409vqo; Fri, 19 May 2023 06:36:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ49YDV4t0oYepr1j6edRNqmVB9HN7siafk+XNp1BA7nokeK8odJnIYNPDDH7JOCXbXtuCfb X-Received: by 2002:a17:902:d717:b0:1ab:7fb:aac1 with SMTP id w23-20020a170902d71700b001ab07fbaac1mr2606768ply.24.1684503394554; Fri, 19 May 2023 06:36:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684503394; cv=none; d=google.com; s=arc-20160816; b=fCrxNTZ6b1A748Ng+WuaiKSwZbOgp0me+KXNIWKNqI112oLImdfp04XngcUY9TkjSF QcLkEPLTN5k4SUd1hD9VhdmVmsSqKlsGN/GURKLVHOBnHdc/Cw9ouCAHNonRx+dTpguf Np3iI8MRR1mcw4PVKyKW6zvIt1FRT8pnuqKag2Qv8mN44hbkygqp+fVi9lfkxKZs5Qfy lUhxnZGXXsHmXPc5x52zzDin5gmGOK0UAotlGHeWz/CBshPuqAKK53tPrObpV0Dlq01t Fy3GVS/JBHwnaqfkQGmOWSP1k68T6lgjJg82iKUOnECN119L30Y6e/MMmY1wyV6i8chT 6aSQ== 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=mw+TKEYIhKANjN8A+cGWAQjGaOiXW7b6lAoE9VZQHwhBGKnC5TMDFK6sJege+qv/UM J+CNejDpcfw+LtoiDBGL9sscErBlJUJ5Z/W3m/dAJd5eWlKjwaXui+RXQ7jiHZ2KOV7R hR+cy/kh51me7o0XAH/l1hUAhG2H3YTwJRAE/68f+nvcN0JRje7VZ8Z2naLHvCRrqc29 yZp4TiKMYa5QIbBetqR0UIaldT0+0Wor+TtuvT3NTJ3uR5qpNeVxI2PmVjznicSSV2OS s/6RgkXk4x7tRpNFsMrGKBPmrYn82MAMbv2Ot9iWrzciMwFtC5MWdGO3q4R9Oa0SS7Xy VJmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DMQ+agUA; 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 l12-20020a170902d34c00b001adc73620a0si3548273plk.410.2023.05.19.06.36.22; Fri, 19 May 2023 06:36:34 -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=DMQ+agUA; 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 S231771AbjESN32 (ORCPT + 99 others); Fri, 19 May 2023 09:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231726AbjESN3X (ORCPT ); Fri, 19 May 2023 09:29:23 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55D1813E for ; Fri, 19 May 2023 06:29:21 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2ac785015d6so36001091fa.0 for ; Fri, 19 May 2023 06:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684502959; x=1687094959; 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=DMQ+agUAp0tVNmLZx211/kwHmQhA3PYSkImSPr1de5DG9lEgq4alZSaX6p95SAz3hY wv5c0046bZQXHumWaK2qLFuu9YlwglpXq5VYYKSyvvfj11lEsBbJB0XXM/LtW86BRw9J wGqE4SFkPaAA6+Wkr4Zv1VN3iyvR8r9wpjIVSxDdcXhyeaA9/SzEqB5G5GXNi9AJ459+ vbzCYVPIYayYu5WstLPBayYQ43XAeLBIuFdJCUGvYciPzHuCGzN3D7Q5AcxjKodpItPn 8dpFD1sV4QTJB32OV7KrN2bOjx4m+FME77vyckxxcdPmNCMGbzz6I0AvTHGQtxBr6zrC lv1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684502959; x=1687094959; 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=goaCqm0bqMHRJ3CPRfx/vG5f84jrp1j+1g9IlY7JZGEbbvsq42MlTrVHryoQgMnUNu vWtUKT3AfPLsmQ8romeTOJ6BO53QCQWNY5uauMMM0/TBoszM2D0fZNE2G85vMYykXKds P5uy2ldN7U4y4ylX7K6PeWJ35IYdxmU2Gbp4AbPcQ40yH3Fa+nhhKZ6rrsSUee+Zt4sS sqk/tTykQbCH61wKf92UguFJLAKdUwy7Tt5X5QwiwBaqMVvieO4qaBE079r2/k65n/KB bGVA6E2KPILwNF/bJMTGDVj+je+L/9KIDFNwjoAy4JOlC1d8YsEK+ra0Z1h+g/u3/Xl6 RzzA== X-Gm-Message-State: AC+VfDxnxxE6jcfToyrmfQ7+wxV6n7JoAwLiYj5AIu0twuweCOZrNJno f+G5t4b3QCUB8BeCUNPOmFihBdRoehL4IlXmyYg= X-Received: by 2002:a2e:888c:0:b0:2af:1760:e48e with SMTP id k12-20020a2e888c000000b002af1760e48emr720157lji.39.1684502959499; Fri, 19 May 2023 06:29:19 -0700 (PDT) Received: from [192.168.1.101] (abxi58.neoplus.adsl.tpnet.pl. [83.9.2.58]) by smtp.gmail.com with ESMTPSA id q24-20020a2e9698000000b002ad92dff470sm821384lji.134.2023.05.19.06.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 06:29:19 -0700 (PDT) From: Konrad Dybcio Date: Fri, 19 May 2023 15:29:07 +0200 Subject: [PATCH v2 2/6] drm/msm/a6xx: Explain CP_PROTECT_CNTL writes in a6xx_set_cp_protect MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v2-2-5b9daa2b2cf0@linaro.org> References: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@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=1684502955; l=1118; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=aeaKOCz5rng2fUAGM03IzdiKTh6ymb1woS+RnpEksJ8=; b=AojotZIf3CpXJZMM9oyS1CcyqM0LpHMLBCu7/eIZPDvNXJwMkWZ1OAeVWc1n9mtAsxdc07emI ZIZAHobVZHLDjYoHqqKFAVyQIXDix5wXN5itsFsOLkXWGrHYgugQab/ 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?1766329831679284483?= X-GMAIL-MSGID: =?utf-8?q?1766329831679284483?= 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)); From patchwork Fri May 19 13:29: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: 96423 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1238595vqo; Fri, 19 May 2023 06:32:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Qmse0C6wQL6OiZg01vDMsHZAgXMwZIBa12GGrBrcyu73vqSP3caeS8KEPFd/siNDWvKN3 X-Received: by 2002:a05:6a20:918b:b0:104:e240:c365 with SMTP id v11-20020a056a20918b00b00104e240c365mr2158274pzd.44.1684503145897; Fri, 19 May 2023 06:32:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684503145; cv=none; d=google.com; s=arc-20160816; b=RLBTIB6NUpWiDH1pXZPUkPvUyvecyjf8QL6XXVX9nE4/RXNWa2t3RGt21ylnYWqE0U rn4X+0p+jLhIKMwq3beNwGVh4f6KUGhCFPk+f4RpfmA+NhMzo6vLiOYb4qtgE6k9MwFC 86NulIpisdOF97IfUA8aqpufG0yhMBleGaHL5scwUXd2jQCVLqY3ZheoBVyDizoEJ69W SHaBux5Kcd0nCtLqvqsUDaWJqH70KmGIXBy/LSvICuJ5hkxMPnvZ/26m2rA2Sw9J/JcM 56lINKJjf7wjIHtaIi51Gb9lQf3rnd85xFSAkXBQ2CzUqydl/zKKF7uo52BfC2W++SR3 QHbg== 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=doFIHuCbi1YVLGjN4vxnw9b75i10GnebCx9q/QOL15k=; b=VmQF91GsOZxpKPknmeMOp/n+3fgwPzFTxvbQUakneeffkgFaH9YgEuxPMyijqQIsXg NL0hhOIH10Ror8FuXUyQAjyENLfWVcWmu/6KWz+8UZervzPuHmmV1Bh0cMG+HfSLaZnR ld8sa99RxUJtzYR/RRxMAhthIBUj0bZaADEDRtt6mn3Lo7BXfv/Ooy3guqfT5yhwVud0 stX1j85briKQPJLrsJ11XqxtuEJ9lfQwQEtaR+xP7JcboqifyVbJL4Gvq5dzx9VY3XbN FF3BE7t87h6Yzievz0AhkjQRTt014qKpEKvRdHDRFukSEYn2eJIAqHxs8m6HcHfEcpRH 0TKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vpC3ulkA; 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 j64-20020a638043000000b0053481532d32si2578199pgd.454.2023.05.19.06.32.12; Fri, 19 May 2023 06:32:25 -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=vpC3ulkA; 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 S231845AbjESN3b (ORCPT + 99 others); Fri, 19 May 2023 09:29:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231702AbjESN3X (ORCPT ); Fri, 19 May 2023 09:29:23 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C439180 for ; Fri, 19 May 2023 06:29:21 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2ac90178fdaso35585501fa.3 for ; Fri, 19 May 2023 06:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684502960; x=1687094960; 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=doFIHuCbi1YVLGjN4vxnw9b75i10GnebCx9q/QOL15k=; b=vpC3ulkASRqGn8JDBs5tnXu2hHqQIx4ICIOpPmVLaDtQLh9IcY1j2VIAg4oQTPi2VZ 5+1WsiWBj47Au35av90euQMg8riW7tadqA1QMvKRCqt8Q2Pq2K2rKPQtTWV4kmvwTQqK S/WjN4MxV3mBkbDcbJ2upI+GVVpJGrsY4SmOEIZOGqauNhy7qFaSH6SmZ9s7IUCyUOo+ gUuMN74J6bJ62kPEIICPLxEb5VnjMNdaHfzh4Fv1NFz2uXAcLHy4hOAU6PoSe2Cl/+ju LB8SRb767qiigjewmeKGZBr7UANxz4ACVhjSqRkZI5rn3qZTRpDMjlzRaBg/M2uS9N9z 6NxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684502960; x=1687094960; 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=doFIHuCbi1YVLGjN4vxnw9b75i10GnebCx9q/QOL15k=; b=ik3uIyxwhQE3APz2ZJBJ/hnSd6NDabqljdjRdldr4aCIod+jmzsVohTUzFLxNaOSCq yC2/U4tHOQ7km/OPgN88fyarGrPuuzfFobW+1LpJeql0ORnzsIkIi/dIj7ollC1A1Bz4 fO2lYYBdT7ey21H5T2n7xWiB4tCQsZf5R/oCiu17WrtKeRv9wU1lthnwG3SsN8+d/lW5 xWR7/KRZQOdeCG9NFO3UWDLoiMLRzRhahoNqzLtbYPkllkrck+EA+alCiUiJxdFWmIf0 ghM36pAVY8/3BcxQN1eXBIwoqli3rl5Y8xjJJFSpAZyc3AgANt2fadzhKViB5YytJPEM 0JTA== X-Gm-Message-State: AC+VfDxDVqZkn3WBNN544xKlqTg0FWx/CDm7TwhLdl8khDc6laJawV8U dg8h59XJlGoh9m685oOiqfTI8jrPUCPeUr57JwM= X-Received: by 2002:a2e:9008:0:b0:2a8:e44e:c75a with SMTP id h8-20020a2e9008000000b002a8e44ec75amr701082ljg.32.1684502960706; Fri, 19 May 2023 06:29: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 q24-20020a2e9698000000b002ad92dff470sm821384lji.134.2023.05.19.06.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 06:29:20 -0700 (PDT) From: Konrad Dybcio Date: Fri, 19 May 2023 15:29:08 +0200 Subject: [PATCH v2 3/6] drm/msm/a6xx: Skip empty protection ranges entries MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v2-3-5b9daa2b2cf0@linaro.org> References: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@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=1684502955; l=1049; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=3GlljK/1BVjiAo5f22OuFyyc96OvFEAFjCCjuTjlQ3o=; b=bKZaZzUq5kYs/sf4jVMg+tulUXXSPOs9cKM9Zmu9anxjshVp8a3LrjoUZMPM461mYhJbXqfEg qMBLVFezKetD8NdwTyoRO+QuKHUO87LXt8BxebSTJjMvJVRYH/9MjAv 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?1766329570429501887?= X-GMAIL-MSGID: =?utf-8?q?1766329570429501887?= 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 deed42675fe2..8707e8b6ac7e 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -778,8 +778,11 @@ static void a6xx_set_cp_protect(struct msm_gpu *gpu) */ gpu_write(gpu, REG_A6XX_CP_PROTECT_CNTL, BIT(0) | BIT(1) | BIT(3)); - 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 Fri May 19 13:29:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 96424 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1238763vqo; Fri, 19 May 2023 06:32:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ70nuj2iAoMgr5xrc1Eknv4+T4HujFgzIYBiPbTr/a0OPoY1enJyWUlveMRHZccyV309TIN X-Received: by 2002:a05:6a20:7d87:b0:105:dafa:febd with SMTP id v7-20020a056a207d8700b00105dafafebdmr2611185pzj.21.1684503161389; Fri, 19 May 2023 06:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684503161; cv=none; d=google.com; s=arc-20160816; b=ooGTDaf8xdOSWOg45Tl+1qMwcCkrOcFAvTkSKf/24YEcuMVallHVZj+5ZBCwbQoKm2 Sw9iDZ0/tyxIypNjMcTy77/4nbhbs1ah0di8MKvP3HlAF+oxigN5Sm6e4F/YuczOdZz/ jdBUB/4KHJCqo7CAzhJCQXOdmX9+BDKCmABhATBVWTQmsBPaDFIKLvBBnpY2d53qAXjQ 9p1CUC7SqwlnR2Y6vr+2vQni0wHGv469c1xwdABCNmy8kZl78Jq3wRi+oakYOGL8DidZ di9JRoKVPv+qKtWgB9RxyQMJy5KuTSFlI5dO+UwG80UR4kjibYNle/zFseA1CAWxmuaA Nr0A== 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=aSc4FWFPOC7I3VWo73gY6L/30rahECGBPz2uIJ+lIl8=; b=V8xKRtyczbhwU14UB373LjzSr7t6+G+HmBxsFvn9P7DDf+KO8RjNwX4t7QFx3WVdyw MXWy/TIrU16scZWsOWT1w2TgOxQBonFtyx8Jm+fOzhqTrXsLKXGdh6Udukw/uoW87G/1 O7/ROn+ZSfHEbQRUzqpPayMv38QyPEs9QeJIugIIZ7JJDwogeAIfEX9rOAEkdh6p5Jon zLJ43TUGJ+0vAAiGKAj2IyFeX1RFbYiqEXI8bPDRlymjq39W6dhDFXPqxsTCsqdtPjdZ yKxRBgpfMmcgq3FvXPcKGNG9+MhQW4JfegycIAlLLoONRQ+DpDXLFDp8652CoMVNRfDZ husw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WhLqizIU; 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 x22-20020a656ab6000000b00502d73d59f4si3940658pgu.222.2023.05.19.06.32.29; Fri, 19 May 2023 06:32:41 -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=WhLqizIU; 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 S231860AbjESN3f (ORCPT + 99 others); Fri, 19 May 2023 09:29:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231744AbjESN3Z (ORCPT ); Fri, 19 May 2023 09:29:25 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D469012C for ; Fri, 19 May 2023 06:29:23 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2ad89c7a84fso36162121fa.2 for ; Fri, 19 May 2023 06:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684502962; x=1687094962; 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=aSc4FWFPOC7I3VWo73gY6L/30rahECGBPz2uIJ+lIl8=; b=WhLqizIUe0ihV8op6KYQ0ETVO1lZwrmjCRYqWNskYT4M3x6dwxEX/V+1VnG7Nb1DyG 0GQfht9+nzzHag994JeqCPRSHTLir5EovjTPlbjcFfRY8iNgvHcdzuszw76BufcbftcR bbHC1HS2uRbBmdWLpaTJh2akWO8ABZe2e1xPTFJxzqErbQcAe6so5wu5yVOxrFY9WYS6 ObVRDZz6qOQIQphahTtRDSndv3iDWoRg+kodvI38/oQsEr3dj64qmjjkNty9lBu6u61o cRBeb+WTDxkNMdRXl1dHwkthjorYO6mk46zBmfa93w2hQ1MTh/NKgJLNzcJJvD6okzig HtAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684502962; x=1687094962; 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=aSc4FWFPOC7I3VWo73gY6L/30rahECGBPz2uIJ+lIl8=; b=CGgG5RFbYv4bZY3qenHAzAv8phhhEiInTxkBDduPiUdkP5TGdTJzQQEjPcBQFWje2h A0zVDEROGUHQUMeH0tSYNwI795JyrnKwUY9sBm4TThIywL3IerT+03MMlAdltYokFqve 70mM1jGpvvcXbVejp7cZCuxQYt8G9NKnTl0DpLydLyuoCjnl8aI7DQ9PrMc0glgxyhdX OblpIdiAJ8zl3kWHwhzA/Evr38AZO4BvfZxnFd1sKDDw6zzHPr2TVnMpjO3XjkI9JXsE iI+OVB3YNpnpy5zla8TfpJUBRrMTwXkIktBVaNGcVf0vxf141BcWd7eD3Co2CYswA8nU uBJg== X-Gm-Message-State: AC+VfDzJlGQwKqH545Y7eU5RbFELHH/K0aasGKkuhYHqI4tYCnhqLv30 RYQdnGpF+rGktVEMj/Mq2MPCLi0RjHU5xN40ipk= X-Received: by 2002:a2e:87c4:0:b0:2af:164c:fe2 with SMTP id v4-20020a2e87c4000000b002af164c0fe2mr912523ljj.5.1684502962058; Fri, 19 May 2023 06:29:22 -0700 (PDT) Received: from [192.168.1.101] (abxi58.neoplus.adsl.tpnet.pl. [83.9.2.58]) by smtp.gmail.com with ESMTPSA id q24-20020a2e9698000000b002ad92dff470sm821384lji.134.2023.05.19.06.29.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 06:29:21 -0700 (PDT) From: Konrad Dybcio Date: Fri, 19 May 2023 15:29:09 +0200 Subject: [PATCH v2 4/6] drm/msm/a6xx: Ensure clean GMU state in a6xx_gmu_fw_start MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v2-4-5b9daa2b2cf0@linaro.org> References: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@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=1684502955; l=1213; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=AafR4gmpdLdCW49giEqj+iQDIXWZqQQlcHizyhfpHRg=; b=pn8OzaI5Ri6hDvb1u3A6LhAH/dRqj6QnBpKwRfCAUssKQJEc/UFbcCZZluulJqAJ8z5pIPGJ3 Tgrjt9hQs5UCewF2cCU5c8ZpISMVuhyKSrMMyazf8e/v79yi6BQEW+K 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?1766329587385659831?= X-GMAIL-MSGID: =?utf-8?q?1766329587385659831?= 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 e16b4b3f8535..ea6d671e7c6c 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -796,6 +796,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 Fri May 19 13:29:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 96425 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1238799vqo; Fri, 19 May 2023 06:32:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/sCS5V9FX2FfVBMlHkysGaV4hLk/14PctpBGDqFG9ZuH9tEPZLcxbNjvDsMA63+DYS8L8 X-Received: by 2002:a17:902:c403:b0:1a9:4cd5:e7e0 with SMTP id k3-20020a170902c40300b001a94cd5e7e0mr7742112plk.17.1684503163077; Fri, 19 May 2023 06:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684503163; cv=none; d=google.com; s=arc-20160816; b=t4OkA07n0B3qaGeZu2FKnzEH9Gl5Dhx/GCHdbFNN2W/eqKrw4bifYilQ2+3/x3+aTY Qg4NfpPLOwq4fp/pp7rXaWWlJNPzIyv6LaILnMDLnTfqyQ7rKx7WhmAnZ/bm6m3SOQa3 ACsdMCf80eGSx1EPyY1ono4NAAi7dBlVJsydpTgeCK9NjLwB+T45nhjM1L8oF+qFxh0l MJTP4JN/0Ve7GpyqZUDFCLqIE66Q7arx6eQn74/2IyR0wEv5PTSV6PwKNhUDv2FgbV6S An0ZdhNYZMG7alc6MJJ90rfUlQpd1NarlcDf0B/H7bspLjTwXjxvrxV8KzZewCbncx/R 6JTw== 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=E1qtkgnk2UanV0SwNvMpelo0+BdhEMAtfe/cld4v2WN9WiX+lVBDDF1ncEBEj8nG3/ 3rGp0pFdoJsjw8QoP/FXuHW8dRZcUsBJobZiOWcy+HWDgE2EyPConcFzwLQUmKXuazoX JUD3/kncYhXdLyrRiE5pHMcI1mCzSbcbu6Y9hoQSHCBHaVo6o0n9EOHES4zG2wIDP+6q RyCKTR/gYpg4SXpz6Oy7uNc+sIHRgjylC3eVqaKsVsaUrrTtptCF5B+5iA2SV5QGq/xu wjN6CS2PvGlRtaS4rypXznEhB5Pz8ghkLVZl5KPSb8PktaBm0STqKrlP5OGDuMRrkn6q TxKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vJuSxGYk; 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 l12-20020a170902d34c00b001adc73620a0si3548273plk.410.2023.05.19.06.32.30; Fri, 19 May 2023 06:32:43 -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=vJuSxGYk; 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 S231824AbjESN3i (ORCPT + 99 others); Fri, 19 May 2023 09:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231775AbjESN30 (ORCPT ); Fri, 19 May 2023 09:29:26 -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 28AF913E for ; Fri, 19 May 2023 06:29:25 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2af2451b3f1so7929771fa.2 for ; Fri, 19 May 2023 06:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684502963; x=1687094963; 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=vJuSxGYk/KQ7DJM8LMmmyVUgzqptU4GWlxJl2iPW+t5MM4OSpQeXAOGSISVK5GBoZ5 lQLfAMinnu3hVvPIQx7So0vMnFfLrNF1Xbro3spArt3sitaMsyprZCiRmesL3LzsFqTe bue4u8C7eXuVRgCx9jdHpIMOF6JkQKkkJESB2rUnksQ/SuBvAYmKLxTebQALspUgY6iZ GLFAgQ3iOk64ezVs0Q37K3j1Vw81Wyv97Pvo11VMrMS1eqAO/+o+vQCrBBGzlbfvWjHB 2GkLVfJ1zfm5Hz1mKURus7lkBUYYNighIwJoXV0cFsrJxqxhcq9op8TMrb5/WPlOLjJY /fdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684502963; x=1687094963; 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=ccX/uAsXJSgT1EFn4k5C8NpqE82yhCKCdKekw1AIfzzVEpCx6whDhaOuX06nU3Tkzz UuvwqNEEG5cODxOpy3h56hhYDGizO9DSRq1JXxCdHVw5AEFKvVczX3QfJEQO6l5N2CPM IOM0fY0VZfPRlTsVZBzznrrEs7ukEc/jTbv1NpVCF+s6fJ1U8/lWP4yQgR7tlrW2QsdP cxMD/DWC48rM3bEhSCYNhUQVjgsAWQw1KndvxSVimlGrbmSUY4btPjATcELlMtftje1s Pk7R5XxcyOm7YdVUo7rBKfQnGKH5Pa4QXwkK/Wbd8t6e7mNAMbya1z2dRHhTMT4VeefR Uz0w== X-Gm-Message-State: AC+VfDxtPKl6O3Pwq4rEoNweEZNO559aA0tF30DJWbBnONQNtJDo9TJ5 z2o789/vZLEGj0EmDl69hQwoZpIbeRTGG2YWujc= X-Received: by 2002:a2e:2417:0:b0:2aa:3cee:c174 with SMTP id k23-20020a2e2417000000b002aa3ceec174mr887376ljk.13.1684502963335; Fri, 19 May 2023 06:29:23 -0700 (PDT) Received: from [192.168.1.101] (abxi58.neoplus.adsl.tpnet.pl. [83.9.2.58]) by smtp.gmail.com with ESMTPSA id q24-20020a2e9698000000b002ad92dff470sm821384lji.134.2023.05.19.06.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 06:29:23 -0700 (PDT) From: Konrad Dybcio Date: Fri, 19 May 2023 15:29:10 +0200 Subject: [PATCH v2 5/6] drm/msm/a6xx: Improve GMU force shutdown sequence MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v2-5-5b9daa2b2cf0@linaro.org> References: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@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=1684502955; l=999; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=tIqOHRwnY5c8M0EJh8c6iF51VO5nfDTSDxvclL4zDow=; b=KYPo2qeuYKLdvjj9oKoR1uGIGtpjAhcYDxd18dm3Lwi5iPiyTSKITY8bEUzM2vOEEa3w8ByAg sTMUWlNlnzwBn7Mt3wFvyNRhmol24Y9mXySPWHFi9n360y5ZUZIDaAF 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?1766329588936850110?= X-GMAIL-MSGID: =?utf-8?q?1766329588936850110?= 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 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); From patchwork Fri May 19 13:29:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 96427 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1241672vqo; Fri, 19 May 2023 06:37:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7YcGrIUaDt5AyJ7U+kQX/ctjjdIoLvCDGmroLjRnzwVKjAgDlg9WaNqZ4HLbD53h/QFsbp X-Received: by 2002:a17:902:c14a:b0:1ad:d1ab:9cc9 with SMTP id 10-20020a170902c14a00b001add1ab9cc9mr2911736plj.12.1684503420397; Fri, 19 May 2023 06:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684503420; cv=none; d=google.com; s=arc-20160816; b=swodH1PfsfYGrVeYbPdIWCpNiAYj2t6exup8qbdNnuXDPIiQ8/EMJ5MU+naSutXv3Z hWArrlpAYDzNXuQv8F1N6nmTBsCn76BYDoNXxVo/pmPdMLh8GVHa5dwTZtP0orwU1mqY OFC7W2r55Q7NDPqzg7dhiNh6b0WGhrdjwRsiWbq5V3rr9bTlgkrqdnXsQ9iEhJ+fmcjx Wo3Q/4pHA0OC8u0Xgsx+jPsiqyd95O35L8PRQZUD8SQiY6exE8gV0KDAosCpLScWGxcd hoASb02gPOggEg7DtSkVyjL5km2lkSW/8RwcA06t4G/Q93HriXnaxmd5uGkqiO2ygl2x MFZw== 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=CoLKDA4nls3CGbrXvxh61SjvP4v8d9SGkB682PI8Y9w=; b=A4I9gndHFuAc/lXo8Brvp2Bt/y/3rEoaGEsvGl0wn/TJjhbDkDqUAsXjjQNfuhcuX7 dypeHnepSIJf1HMPoywvgUuuvqC3KhQSNO0b5BPSq7X5C2DIAMqxNgvtZNpoSjcD2WdW f+sGai/gxg9krkDOTLDcRnAiEMma/xlVdOfi2c6NOVQbJ1wADEbXGTymvvQ0hwTUCbRF SpCuWfJFQHyOL4a2QBoZeB6WGQiUBoG+e0ebmRbaOkiUdRe76UMp5xDEynsjqUQb+IfD CF1tJxceq8VnftN0TJkMVe0tI/WwrYGtWaYed+vj+3Fegi0JxyxLUxTZawNKcJo7sYWQ IFpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z2m27kLS; 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 l12-20020a170902d34c00b001adc73620a0si3548273plk.410.2023.05.19.06.36.47; Fri, 19 May 2023 06:37:00 -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=Z2m27kLS; 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 S231947AbjESN3m (ORCPT + 99 others); Fri, 19 May 2023 09:29:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231803AbjESN31 (ORCPT ); Fri, 19 May 2023 09:29:27 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D6A312C for ; Fri, 19 May 2023 06:29:26 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ac836f4447so35929881fa.2 for ; Fri, 19 May 2023 06:29:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684502964; x=1687094964; 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=CoLKDA4nls3CGbrXvxh61SjvP4v8d9SGkB682PI8Y9w=; b=Z2m27kLSE1/hw4iXIE43fi41wpKcFGxK0Xnz1w3T0lvfvcVk7Le/dEr+zi+NGu1tJf /OKfe10DfnNwtrOoIjkKfQVAUfzj1PZRmT8MEw6tANJx9t9XoxSvsB/Go/dOwGpkfSvi Lb0vcRU1NXSqRbpzFuwYtJQ0M5MkGiPzGD+GpyLJGC+1otOlmpnKQzFzuijUnp610wRL f93k4HuHiZM1WfeSuOYffIrpdKQ6KwV4WkxxgEcPK/WPFMC9Qm6xJp2wwXU0SCVvOeZv yfA8zWafiXtaFx0IQYXhtZPOS1COVU+JOV6hYDyHf6fqP6pkl/A7YrypOO69nsxDmsXw PWbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684502964; x=1687094964; 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=CoLKDA4nls3CGbrXvxh61SjvP4v8d9SGkB682PI8Y9w=; b=CBQm3ek6NAamYpMxrSYJMp3Ewj463w/WVsZXPFiJ0TjxxXYuzLfutZNnIKycoeX4O9 c/rqryhkkmHgrbmtIpCRTaH5G9wo/NouHAifo+hr8pgABsr9yFuJu39kiJiGw0l/dE4z Ex81EaeZIEC6u1Vl++GTaA3Au8rB7LymMvizOhw5cyVUQG7ar4Bkphb7pAf7n3rEo9eC z0Cw3t0qslOdb62o0BgHPwfHvdIi3MBweUTIkfUEV0nFYisseEDYawZFEzmyCt62ezs1 wh6xdUNX0LAYUtepOzP0kj1rlOKJ7JjzjMYmGCtazp63W8yrUj/wtXCaxlwHM5RAsiID nqDQ== X-Gm-Message-State: AC+VfDwzti8HrxISLlq1xZprpq/KAElJ8LtglH/H8VjTaP2eSCkHdNMm NILcpOjzcbnqH9uOPqvgktwnAXUy/qZuJhLwzQA= X-Received: by 2002:a2e:8091:0:b0:2ad:fef4:94f8 with SMTP id i17-20020a2e8091000000b002adfef494f8mr797526ljg.6.1684502964590; Fri, 19 May 2023 06:29:24 -0700 (PDT) Received: from [192.168.1.101] (abxi58.neoplus.adsl.tpnet.pl. [83.9.2.58]) by smtp.gmail.com with ESMTPSA id q24-20020a2e9698000000b002ad92dff470sm821384lji.134.2023.05.19.06.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 06:29:24 -0700 (PDT) From: Konrad Dybcio Date: Fri, 19 May 2023 15:29:11 +0200 Subject: [PATCH v2 6/6] drm/msm/a6xx: Fix up GMU region reservations MIME-Version: 1.0 Message-Id: <20230517-topic-a7xx_prep-v2-6-5b9daa2b2cf0@linaro.org> References: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@linaro.org> In-Reply-To: <20230517-topic-a7xx_prep-v2-0-5b9daa2b2cf0@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=1684502955; l=1342; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=btUFgb1HmX4JzaeMKMcU2R1/tETWRJTF/5M21P54ufE=; b=uge7jhsa+6TMgVnbDiql/KjRMCa2Zb0JOe9R2GsPOzeoMYLsykOQCCB6qAuMi5PGNRRC++0uR dFwe/8HcIVVBFtJho3vrH41g3hspVEGRLxiuZX69M1/8Ix2IBah+mWC 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?1766329858161709372?= X-GMAIL-MSGID: =?utf-8?q?1766329858161709372?= 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 8004b582e45f..386c81e1a2f3 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -1614,13 +1614,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;