Skip to content

Commit a14b929

Browse files
affenull2345robclark
authored andcommitted
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 <[email protected]> [use internal name of the GPU, reword the commit message] Reviewed-by: Konrad Dybcio <[email protected]> Signed-off-by: Barnabás Czémán <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/605403/ Signed-off-by: Rob Clark <[email protected]>
1 parent dbfbb37 commit a14b929

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

drivers/gpu/drm/msm/adreno/a3xx_catalog.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ static const struct adreno_info a3xx_gpus[] = {
4141
.gmem = SZ_128K,
4242
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
4343
.init = a3xx_gpu_init,
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,
4455
}, {
4556
.chip_ids = ADRENO_CHIP_IDS(
4657
0x03020000,

drivers/gpu/drm/msm/adreno/a3xx_gpu.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ static int a3xx_hw_init(struct msm_gpu *gpu)
145145
gpu_write(gpu, REG_A3XX_VBIF_ROUND_ROBIN_QOS_ARB, 0x0003);
146146
gpu_write(gpu, REG_A3XX_VBIF_OUT_RD_LIM_CONF0, 0x0000000a);
147147
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);
148152
} else if (adreno_is_a320(adreno_gpu)) {
149153
/* Set up 16 deep read/write request queues: */
150154
gpu_write(gpu, REG_A3XX_VBIF_IN_RD_LIM_CONF0, 0x10101010);
@@ -237,7 +241,9 @@ static int a3xx_hw_init(struct msm_gpu *gpu)
237241
gpu_write(gpu, REG_A3XX_UCHE_CACHE_MODE_CONTROL_REG, 0x00000001);
238242

239243
/* Enable Clock gating: */
240-
if (adreno_is_a305b(adreno_gpu) || adreno_is_a306(adreno_gpu))
244+
if (adreno_is_a305b(adreno_gpu) ||
245+
adreno_is_a306(adreno_gpu) ||
246+
adreno_is_a306a(adreno_gpu))
241247
gpu_write(gpu, REG_A3XX_RBBM_CLOCK_CTL, 0xaaaaaaaa);
242248
else if (adreno_is_a320(adreno_gpu))
243249
gpu_write(gpu, REG_A3XX_RBBM_CLOCK_CTL, 0xbfffffff);
@@ -334,8 +340,10 @@ static int a3xx_hw_init(struct msm_gpu *gpu)
334340
gpu_write(gpu, REG_A3XX_CP_PFP_UCODE_DATA, ptr[i]);
335341

336342
/* CP ROQ queue sizes (bytes) - RB:16, ST:16, IB1:32, IB2:64 */
337-
if (adreno_is_a305(adreno_gpu) || adreno_is_a306(adreno_gpu) ||
338-
adreno_is_a320(adreno_gpu)) {
343+
if (adreno_is_a305(adreno_gpu) ||
344+
adreno_is_a306(adreno_gpu) ||
345+
adreno_is_a306a(adreno_gpu) ||
346+
adreno_is_a320(adreno_gpu)) {
339347
gpu_write(gpu, REG_AXXX_CP_QUEUE_THRESHOLDS,
340348
AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START(2) |
341349
AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START(6) |

drivers/gpu/drm/msm/adreno/adreno_gpu.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,12 @@ static inline bool adreno_is_a306(const struct adreno_gpu *gpu)
324324
return adreno_is_revn(gpu, 307);
325325
}
326326

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+
327333
static inline bool adreno_is_a320(const struct adreno_gpu *gpu)
328334
{
329335
return adreno_is_revn(gpu, 320);

0 commit comments

Comments
 (0)