Message ID | 20250514-topic-ubwc_central-v2-12-09ecbc0a05ce@oss.qualcomm.com |
---|---|
State | New |
Headers | show |
Series | Add a single source of truth for UBWC configuration data | expand |
On 5/14/25 10:32 PM, Dmitry Baryshkov wrote: > On Wed, May 14, 2025 at 05:10:32PM +0200, Konrad Dybcio wrote: >> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> >> >> On A663 (SA8775P) the value matches exactly. >> >> On A610, the value matches on SM6115, but is different on SM6125. That >> turns out not to be a problem, as the bits that differ aren't even >> interpreted. > > We also don't set swizzle for a lot of UBWC 1.0 targets (as MDSS wasn't > programming those). Should we fix all of them to use 6 by default? Or 7? I don't think any default value is a good idea - this is the sort of programming error you track down 4 years after you go bald looking for it Konrad
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index ae0bb7934e7ed203aa3b81e28767de204f0a4d60..eaf468b67f97ff153e92a73a45581228fcf75e46 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -598,13 +598,10 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu) /* Copy the data into the internal struct to drop the const qualifier (temporarily) */ *cfg = *common_cfg; - cfg->ubwc_swizzle = 0x6; cfg->highest_bank_bit = 15; - if (adreno_is_a610(gpu)) { + if (adreno_is_a610(gpu)) cfg->highest_bank_bit = 13; - cfg->ubwc_swizzle = 0x7; - } if (adreno_is_a618(gpu)) cfg->highest_bank_bit = 14; @@ -631,10 +628,8 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu) cfg->highest_bank_bit = 16; } - if (adreno_is_a663(gpu)) { + if (adreno_is_a663(gpu)) cfg->highest_bank_bit = 13; - cfg->ubwc_swizzle = 0x4; - } if (adreno_is_7c3(gpu)) cfg->highest_bank_bit = 14;