mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konradybcio@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Rob Clark <robdclark@gmail.com>,
	 Abhinav Kumar <quic_abhinavk@quicinc.com>,
	 Dmitry Baryshkov <lumag@kernel.org>,
	 Akhil P Oommen <quic_akhilpo@quicinc.com>,
	Sean Paul <sean@poorly.run>,  David Airlie <airlied@gmail.com>,
	Simona Vetter <simona@ffwll.ch>
Cc: Marijn Suijten <marijn.suijten@somainline.org>,
	 linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	 dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org,
	 Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: [PATCH RFT v2 09/15] drm/msm/a6xx: Resolve the meaning of rgb565_predicator
Date: Wed, 14 May 2025 17:10:29 +0200	[thread overview]
Message-ID: <20250514-topic-ubwc_central-v2-9-09ecbc0a05ce@oss.qualcomm.com> (raw)
In-Reply-To: <20250514-topic-ubwc_central-v2-0-09ecbc0a05ce@oss.qualcomm.com>

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

It's supposed to be on when the UBWC encoder version is >= 4.0.
Drop the per-GPU assignments.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 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/adreno/a6xx_gpu.c
index 0a08837ab01b724489baeb217cc49779ddcdf146..5ee5f8dc90fe0d1647ce07b7dbcadc6ca2ecd416 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -592,7 +592,6 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu)
 	if (IS_ERR(gpu->common_ubwc_cfg))
 		return -EINVAL;
 
-	gpu->ubwc_config.rgb565_predicator = 0;
 	gpu->ubwc_config.min_acc_len = 0;
 	gpu->ubwc_config.ubwc_swizzle = 0x6;
 	gpu->ubwc_config.macrotile_mode = 0;
@@ -619,7 +618,6 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu)
 
 	if (adreno_is_a623(gpu)) {
 		gpu->ubwc_config.highest_bank_bit = 16;
-		gpu->ubwc_config.rgb565_predicator = 1;
 		gpu->ubwc_config.macrotile_mode = 1;
 	}
 
@@ -633,13 +631,11 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu)
 	    adreno_is_a740_family(gpu)) {
 		/* TODO: get ddr type from bootloader and use 2 for LPDDR4 */
 		gpu->ubwc_config.highest_bank_bit = 16;
-		gpu->ubwc_config.rgb565_predicator = 1;
 		gpu->ubwc_config.macrotile_mode = 1;
 	}
 
 	if (adreno_is_a663(gpu)) {
 		gpu->ubwc_config.highest_bank_bit = 13;
-		gpu->ubwc_config.rgb565_predicator = 1;
 		gpu->ubwc_config.macrotile_mode = 1;
 		gpu->ubwc_config.ubwc_swizzle = 0x4;
 	}
@@ -669,6 +665,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
 	 */
 	BUG_ON(adreno_gpu->ubwc_config.highest_bank_bit < 13);
 	u32 hbb = adreno_gpu->ubwc_config.highest_bank_bit - 13;
+	bool rgb565_predicator = cfg->ubwc_enc_version >= UBWC_4_0;
 	u32 level2_swizzling_dis = !(cfg->ubwc_swizzle & BIT(1));
 	bool ubwc_mode = qcom_ubwc_get_ubwc_mode(cfg);
 	bool amsbc = cfg->ubwc_enc_version >= UBWC_3_0;
@@ -677,7 +674,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
 
 	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);

-- 
2.49.0


  parent reply	other threads:[~2025-05-14 15:11 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14 15:10 [RFT PATCH v2 00/15] Add a single source of truth for UBWC configuration data Konrad Dybcio
2025-05-14 15:10 ` [PATCH RFT v2 01/15] soc: qcom: Add UBWC config provider Konrad Dybcio
2025-05-14 15:29   ` Konrad Dybcio
2025-05-14 19:03   ` Dmitry Baryshkov
2025-05-15 15:50     ` Konrad Dybcio
2025-05-14 15:10 ` [PATCH RFT v2 02/15] drm/msm: Offset MDSS HBB value by 13 Konrad Dybcio
2025-05-14 19:04   ` Dmitry Baryshkov
2025-05-14 15:10 ` [PATCH RFT v2 03/15] drm/msm: Use the central UBWC config database Konrad Dybcio
2025-05-14 19:05   ` Dmitry Baryshkov
2025-05-15 10:32   ` kernel test robot
2025-05-14 15:10 ` [PATCH RFT v2 04/15] drm/msm/a6xx: Get a handle to the common UBWC config Konrad Dybcio
2025-05-14 15:10 ` [PATCH RFT v2 05/15] drm/msm/a6xx: Resolve the meaning of AMSBC Konrad Dybcio
2025-05-14 19:16   ` Dmitry Baryshkov
2025-05-14 15:10 ` [PATCH RFT v2 06/15] drm/msm/a6xx: Simplify uavflagprd_inv detection Konrad Dybcio
2025-05-14 19:14   ` Dmitry Baryshkov
2025-05-14 15:10 ` [PATCH RFT v2 07/15] drm/msm/a6xx: Resolve the meaning of UBWC_MODE Konrad Dybcio
2025-05-14 19:14   ` Dmitry Baryshkov
2025-05-14 20:02     ` Rob Clark
2025-05-14 15:10 ` [PATCH RFT v2 08/15] drm/msm/a6xx: Replace '2' with BIT(1) in level2_swizzling_dis calc Konrad Dybcio
2025-05-14 19:15   ` Dmitry Baryshkov
2025-05-14 15:10 ` Konrad Dybcio [this message]
2025-05-14 19:15   ` [PATCH RFT v2 09/15] drm/msm/a6xx: Resolve the meaning of rgb565_predicator Dmitry Baryshkov
2025-05-14 15:10 ` [PATCH RFT v2 10/15] drm/msm/a6xx: Simplify min_acc_len calculation Konrad Dybcio
2025-05-14 19:19   ` Dmitry Baryshkov
2025-05-15 15:51     ` Konrad Dybcio
2025-05-14 15:10 ` [PATCH RFT v2 11/15] drm/msm/adreno: Switch to the common UBWC config struct Konrad Dybcio
2025-05-14 19:22   ` Dmitry Baryshkov
2025-05-15 15:51     ` Konrad Dybcio
2025-05-14 15:10 ` [PATCH RFT v2 12/15] drm/msm/a6xx: Drop cfg->ubwc_swizzle override Konrad Dybcio
2025-05-14 20:32   ` Dmitry Baryshkov
2025-05-15 15:52     ` Konrad Dybcio
2025-05-14 15:10 ` [PATCH RFT v2 13/15] soc: qcom: ubwc: Fix SM6125's ubwc_swizzle value Konrad Dybcio
2025-05-14 19:23   ` Dmitry Baryshkov
2025-05-14 20:05     ` Konrad Dybcio
2025-05-14 20:33       ` Dmitry Baryshkov
2025-05-15 16:18         ` Konrad Dybcio
2025-05-15 16:21           ` Dmitry Baryshkov
2025-05-15 16:35             ` Konrad Dybcio
2025-05-15 17:15               ` Dmitry Baryshkov
2025-05-15 17:56                 ` Konrad Dybcio
2025-05-15 17:58                   ` Dmitry Baryshkov
2025-05-14 15:10 ` [PATCH RFT v2 14/15] soc: qcom: ubwc: Add #defines for UBWC swizzle bits Konrad Dybcio
2025-05-14 19:24   ` Dmitry Baryshkov
2025-05-14 20:09     ` Konrad Dybcio
2025-05-14 20:33       ` Dmitry Baryshkov
2025-05-14 15:10 ` [PATCH RFC RFT v2 15/15] drm/msm/a6xx: Warn if the highest_bank_bit value is overwritten Konrad Dybcio
2025-05-14 19:25   ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250514-topic-ubwc_central-v2-9-09ecbc0a05ce@oss.qualcomm.com \
    --to=konradybcio@kernel.org \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_akhilpo@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®