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: 694557 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39B0CEB64DC for ; Tue, 20 Jun 2023 11:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232618AbjFTLK6 (ORCPT ); Tue, 20 Jun 2023 07:10:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232542AbjFTLKv (ORCPT ); Tue, 20 Jun 2023 07:10:51 -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 C0BE210D2 for ; Tue, 20 Jun 2023 04:10:47 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f954d7309fso442388e87.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=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=krjUIp0wPcPqRP2ilkQjEWXqkP6Bdm4BizEUY78zE83AHhwQ/21XQULlTtBvr4KO7S 5JROD96f9MvUetNzsLt+qTYsrCl2AhtfO9Z7zoT5d0M6WAYQkJ4i8SG0GXKbxOXgsrBf m4Ddl2YYzFy5+01irRdYrBKbgy+JM8bGHJ9gB+7e6UwNnododMuuptElX7cDc9jKGyx5 ZZT1RiFsmIVnDMp6IH6qUlHZKcihaGfMPHp1+QUYA4GK7JRHOmuriZT1wrymXnXSHfAD P88wtN6/Iy/KHnuR8SNN6ws9LNWG+6WeVKlmZDz8zDrkFJqAm+MPUY2013cT87NVm6kY OhlQ== X-Gm-Message-State: AC+VfDy2KqGaDqXklfXPHSVi+AfTChO7S5BNDKiW/oSJY/lCLrxrDfwQ mzkuGjSdPphPDzsBwYMkmvfs0w== X-Google-Smtp-Source: ACHHUZ4cLmiB2n46o0d35DMgPZGWuixYgUZon5/AJjYU5NyBvxkp8RnPYyge3jvjiOeQ6yEOMx05ew== 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= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: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: 694556 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BC3CEB64DD for ; Tue, 20 Jun 2023 11:11:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232511AbjFTLK7 (ORCPT ); Tue, 20 Jun 2023 07:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232502AbjFTLK5 (ORCPT ); Tue, 20 Jun 2023 07:10:57 -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 84D181BB for ; Tue, 20 Jun 2023 04:10:47 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f955def3a5so231021e87.0 for ; Tue, 20 Jun 2023 04:10:47 -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=MJfoS9VQwzNnbscE+TwoqyM1RSaPNG3xyDvtvDkKHh1uXCGq8UgcAFF0SNYwJN9UQL QGr/hUON63psLv6qjrGzv8bvP9i/D2BdZGL4Qhxso59uYU04tY6Nuodq/nkVrTbTmFwj QO/ZRtgW89WAUyo9Sm8ArZ5HZMo5wQk7OL9D8gdZaHQLvv9J9trjc/ak2Uzjrp5zfPW4 Axz9zd/Oe8X7tNaUYTA5fAo3G+IypCYWQMZzSB35SHAdGOi+cHJwOxo6VyIKDsocQ3bP 9asJwvKF55rr+EAMAJtQ6o/yGGfFWGl6XzR6FsgHFgS4Zbtsyg70vVzv1b01aa5JM3oa uDDg== X-Gm-Message-State: AC+VfDxwsytSXg3UfrFA6yZw5349VuoTPIekS4iTMmDca9p/537iqkB9 SYvVvhlHD5GnXrwH+8cX8a2AjQ== X-Google-Smtp-Source: ACHHUZ5eqZqdWUBigkTrmkmwCMGTjarq6T+1Y4fXQLi7UIXvf2LYvX4zPoiELEETJW3uy09iyxY4DQ== 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= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: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: 694555 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 383C2EB64DD for ; Tue, 20 Jun 2023 11:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232541AbjFTLLD (ORCPT ); Tue, 20 Jun 2023 07:11:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232599AbjFTLK5 (ORCPT ); Tue, 20 Jun 2023 07:10:57 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD57C10FF for ; Tue, 20 Jun 2023 04:10:51 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4f8467e39cfso5885230e87.3 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=jXMwjnYPC5Ahbx/VkVoSmpfI60ggD7yzCDANiJuMDLkkFBhtfDaSoBcmtE7Yu2IHPG 4H46q6a5TXG1C9FP/sakdQsNx8Mub2GQedV6RG40cYKWK0G6hy+3aiT2FjnDHjVn82m4 1CVGLbBED+xMBRwE0U3BGUUQHRolMkQq7FgNSxndK1YjMz/9/Pvz+Zk61RInk/fQdODP xmHK1mpdOo6cyBssIpJZ7k9Qujx3FpXqIEabvz9L0GE28ylBqj9wwXsFFW+Lj2OyuiZm 33owFf6CkKHFTBIl6DeCgMeog+QdJjAVX8MvXVRT5GRU1UTq6m1roE+8gv6KZuX3P9JI /QgQ== X-Gm-Message-State: AC+VfDx2K2O9SOlk8oo5yCK8WJNllfh5iOfv8qVpC8nwKQisslNYsL65 Y1gVQ9i0SdezfhEbIaoxFRdL4w== X-Google-Smtp-Source: ACHHUZ5okQOzj1cMQwrImDYKSsE7ilohlU83tzowZhi+LUS+lB7cGsb0N37uqiCJOu8CuW11a0KNOA== 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= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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;