From nobody Thu Sep 11 00:08:41 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E1512BFC62; Thu, 26 Jun 2025 09:03:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750928603; cv=none; b=FBBXZXKjVsTTaA1E6MJ9mUWtoptqQvkNh2FxgVIUHxiBYKUgXeWj4DzlKvziJGKlWsMaU23FKxVjtrDZzL6Ctnkyn6mR+X8l6XZKikrvKQ98bsmzhx8+QfkgMqbgqc+v85ZOD1ESXMl82I3mYEhjZpj4XeZRO8PwJg8UJFLMGLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750928603; c=relaxed/simple; bh=Jzp4H5XI2mNdXY7mf+xttkOOu68Xs66xVgu2w4KaY6c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IN3SN2uw6W4KG34SIIGQjq/9QNgBqQpys29k1hU7FgECqpoLnKk2L6SeKOyGhbNPNGO8P5OyMIcVAoQ5IDmlsMTjK3mteryfZnyap8fVsot3/0ONMFhYH55TsIKESRlb6HGqIY4//p2CC9P5vfmvrZTDR7IXrhANQXMJDgVins0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Yr5LUbN0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Yr5LUbN0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED207C4CEEE; Thu, 26 Jun 2025 09:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750928603; bh=Jzp4H5XI2mNdXY7mf+xttkOOu68Xs66xVgu2w4KaY6c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Yr5LUbN0cGNZAIVmhQukkRNo/OFb0Wcf6iXXTkSWk17b2MZ95oAqLR8G+vj1ItFwy G2l7qNnx4xfWs1Z/h6AZSUl+i3Zwe+zKgWKTLbguhBz0T2Lx1iE1DXfJVWhCw1VbV8 A5mfP+hySGUiPN6AYZDtjuSTDYCWTxVO16qhGtBkDQPwfERKgoDsEgpaZAfXd+5Rcq NIG+WdodjehTKs/ooLU7ddH8d+qOPR3djN8srzS9WGUAYwkwBBfaftZL2o2ye7+d0h OpHedXiZhGT6FXVT4q9/Gg0IUDUOS2qoxK0B5dh7rwMysa44W5YW3nj/6Gx5XLi6OV 2/B04bPTS80FQ== From: Konrad Dybcio Date: Thu, 26 Jun 2025 11:02:36 +0200 Subject: [PATCH v6 09/14] drm/msm/a6xx: Resolve the meaning of rgb565_predicator Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250626-topic-ubwc_central-v6-9-c94fa9d12040@oss.qualcomm.com> References: <20250626-topic-ubwc_central-v6-0-c94fa9d12040@oss.qualcomm.com> In-Reply-To: <20250626-topic-ubwc_central-v6-0-c94fa9d12040@oss.qualcomm.com> To: Bjorn Andersson , Konrad Dybcio , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Simona Vetter , Rob Clark , Abhinav Kumar , Jessica Zhang , Rob Clark , Akhil P Oommen Cc: Marijn Suijten , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Konrad Dybcio , Dmitry Baryshkov X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1750928557; l=2509; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=XfAVKpXihNq5QYjqmv6bbx9jLqRnqYwolc2Cu9hDUvU=; b=6YUdaLT61fiBU42DaWMPWEGLq53/TKHy8iSo99y6DufkOn18c/4H/E5SfxOraSBImKIOY8F+H wDFLj5BQRsxAYN3y/dBxP32Q+Q7ctajCsXmqfHTHtdZHxtW4xHMnUg3 X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Konrad Dybcio It's supposed to be on when the UBWC encoder version is >=3D 4.0. Drop the per-GPU assignments. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/ad= reno/a6xx_gpu.c index 78782f94ee678e13baa6eb1a009a412e13557d59..53493f68ead2113143dab594bfe= df492014d5aaa 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -610,7 +610,6 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu) if (IS_ERR(gpu->common_ubwc_cfg)) return PTR_ERR(gpu->common_ubwc_cfg); =20 - gpu->ubwc_config.rgb565_predicator =3D 0; gpu->ubwc_config.min_acc_len =3D 0; gpu->ubwc_config.ubwc_swizzle =3D 0x6; gpu->ubwc_config.macrotile_mode =3D 0; @@ -637,7 +636,6 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu) =20 if (adreno_is_a623(gpu)) { gpu->ubwc_config.highest_bank_bit =3D 16; - gpu->ubwc_config.rgb565_predicator =3D 1; gpu->ubwc_config.macrotile_mode =3D 1; } =20 @@ -651,13 +649,11 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *g= pu) adreno_is_a740_family(gpu)) { /* TODO: get ddr type from bootloader and use 2 for LPDDR4 */ gpu->ubwc_config.highest_bank_bit =3D 16; - gpu->ubwc_config.rgb565_predicator =3D 1; gpu->ubwc_config.macrotile_mode =3D 1; } =20 if (adreno_is_a663(gpu)) { gpu->ubwc_config.highest_bank_bit =3D 13; - gpu->ubwc_config.rgb565_predicator =3D 1; gpu->ubwc_config.macrotile_mode =3D 1; gpu->ubwc_config.ubwc_swizzle =3D 0x4; } @@ -686,6 +682,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu) */ BUG_ON(adreno_gpu->ubwc_config.highest_bank_bit < 13); u32 hbb =3D adreno_gpu->ubwc_config.highest_bank_bit - 13; + bool rgb565_predicator =3D cfg->ubwc_enc_version >=3D UBWC_4_0; u32 level2_swizzling_dis =3D !(cfg->ubwc_swizzle & BIT(1)); bool ubwc_mode =3D qcom_ubwc_get_ubwc_mode(cfg); bool amsbc =3D cfg->ubwc_enc_version >=3D UBWC_3_0; @@ -698,7 +695,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu) =20 gpu_write(gpu, REG_A6XX_RB_NC_MODE_CNTL, level2_swizzling_dis << 12 | - adreno_gpu->ubwc_config.rgb565_predicator << 11 | + rgb565_predicator << 11 | hbb_hi << 10 | amsbc << 4 | adreno_gpu->ubwc_config.min_acc_len << 3 | hbb_lo << 1 | ubwc_mode); --=20 2.50.0