Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/adreno: Add A306A support

Add support for Adreno 306A GPU what is found in MSM8917 SoC.
This GPU marketing name is Adreno 308.

Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de>
[use internal name of the GPU, reword the commit message]
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Barnabás Czémán <trabarni@gmail.com>
Patchwork: https://patchwork.freedesktop.org/patch/605403/
Signed-off-by: Rob Clark <robdclark@chromium.org>

authored by

Otto Pflüger and committed by
Rob Clark
a14b929b dbfbb376

+28 -3
+11
drivers/gpu/drm/msm/adreno/a3xx_catalog.c
··· 42 42 .inactive_period = DRM_MSM_INACTIVE_PERIOD, 43 43 .init = a3xx_gpu_init, 44 44 }, { 45 + .chip_ids = ADRENO_CHIP_IDS(0x03000620), 46 + .family = ADRENO_3XX, 47 + .revn = 308, 48 + .fw = { 49 + [ADRENO_FW_PM4] = "a300_pm4.fw", 50 + [ADRENO_FW_PFP] = "a300_pfp.fw", 51 + }, 52 + .gmem = SZ_128K, 53 + .inactive_period = DRM_MSM_INACTIVE_PERIOD, 54 + .init = a3xx_gpu_init, 55 + }, { 45 56 .chip_ids = ADRENO_CHIP_IDS( 46 57 0x03020000, 47 58 0x03020001,
+11 -3
drivers/gpu/drm/msm/adreno/a3xx_gpu.c
··· 145 145 gpu_write(gpu, REG_A3XX_VBIF_ROUND_ROBIN_QOS_ARB, 0x0003); 146 146 gpu_write(gpu, REG_A3XX_VBIF_OUT_RD_LIM_CONF0, 0x0000000a); 147 147 gpu_write(gpu, REG_A3XX_VBIF_OUT_WR_LIM_CONF0, 0x0000000a); 148 + } else if (adreno_is_a306a(adreno_gpu)) { 149 + gpu_write(gpu, REG_A3XX_VBIF_ROUND_ROBIN_QOS_ARB, 0x0003); 150 + gpu_write(gpu, REG_A3XX_VBIF_OUT_RD_LIM_CONF0, 0x00000010); 151 + gpu_write(gpu, REG_A3XX_VBIF_OUT_WR_LIM_CONF0, 0x00000010); 148 152 } else if (adreno_is_a320(adreno_gpu)) { 149 153 /* Set up 16 deep read/write request queues: */ 150 154 gpu_write(gpu, REG_A3XX_VBIF_IN_RD_LIM_CONF0, 0x10101010); ··· 241 237 gpu_write(gpu, REG_A3XX_UCHE_CACHE_MODE_CONTROL_REG, 0x00000001); 242 238 243 239 /* Enable Clock gating: */ 244 - if (adreno_is_a305b(adreno_gpu) || adreno_is_a306(adreno_gpu)) 240 + if (adreno_is_a305b(adreno_gpu) || 241 + adreno_is_a306(adreno_gpu) || 242 + adreno_is_a306a(adreno_gpu)) 245 243 gpu_write(gpu, REG_A3XX_RBBM_CLOCK_CTL, 0xaaaaaaaa); 246 244 else if (adreno_is_a320(adreno_gpu)) 247 245 gpu_write(gpu, REG_A3XX_RBBM_CLOCK_CTL, 0xbfffffff); ··· 340 334 gpu_write(gpu, REG_A3XX_CP_PFP_UCODE_DATA, ptr[i]); 341 335 342 336 /* CP ROQ queue sizes (bytes) - RB:16, ST:16, IB1:32, IB2:64 */ 343 - if (adreno_is_a305(adreno_gpu) || adreno_is_a306(adreno_gpu) || 344 - adreno_is_a320(adreno_gpu)) { 337 + if (adreno_is_a305(adreno_gpu) || 338 + adreno_is_a306(adreno_gpu) || 339 + adreno_is_a306a(adreno_gpu) || 340 + adreno_is_a320(adreno_gpu)) { 345 341 gpu_write(gpu, REG_AXXX_CP_QUEUE_THRESHOLDS, 346 342 AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START(2) | 347 343 AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START(6) |
+6
drivers/gpu/drm/msm/adreno/adreno_gpu.h
··· 324 324 return adreno_is_revn(gpu, 307); 325 325 } 326 326 327 + static inline bool adreno_is_a306a(const struct adreno_gpu *gpu) 328 + { 329 + /* a306a (marketing name is a308) */ 330 + return adreno_is_revn(gpu, 308); 331 + } 332 + 327 333 static inline bool adreno_is_a320(const struct adreno_gpu *gpu) 328 334 { 329 335 return adreno_is_revn(gpu, 320);