Skip to content

Commit cd036d5

Browse files
konradybciorobclark
authored andcommitted
drm/msm/a6xx: Add A610 speedbin support
A610 is implemented on at least three SoCs: SM6115 (bengal), SM6125 (trinket) and SM6225 (khaje). Trinket does not support speed binning (only a single SKU exists) and we don't yet support khaje upstream. Hence, add a fuse mapping table for bengal to allow for per-chip frequency limiting. Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Akhil P Oommen <[email protected]> Signed-off-by: Konrad Dybcio <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/542780/ Signed-off-by: Rob Clark <[email protected]>
1 parent 20c8e39 commit cd036d5

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,6 +2204,30 @@ static bool a6xx_progress(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
22042204
return progress;
22052205
}
22062206

2207+
static u32 a610_get_speed_bin(u32 fuse)
2208+
{
2209+
/*
2210+
* There are (at least) three SoCs implementing A610: SM6125 (trinket),
2211+
* SM6115 (bengal) and SM6225 (khaje). Trinket does not have speedbinning,
2212+
* as only a single SKU exists and we don't support khaje upstream yet.
2213+
* Hence, this matching table is only valid for bengal and can be easily
2214+
* expanded if need be.
2215+
*/
2216+
2217+
if (fuse == 0)
2218+
return 0;
2219+
else if (fuse == 206)
2220+
return 1;
2221+
else if (fuse == 200)
2222+
return 2;
2223+
else if (fuse == 157)
2224+
return 3;
2225+
else if (fuse == 127)
2226+
return 4;
2227+
2228+
return UINT_MAX;
2229+
}
2230+
22072231
static u32 a618_get_speed_bin(u32 fuse)
22082232
{
22092233
if (fuse == 0)
@@ -2301,6 +2325,9 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_gpu *adreno_gpu, u3
23012325
{
23022326
u32 val = UINT_MAX;
23032327

2328+
if (adreno_is_a610(adreno_gpu))
2329+
val = a610_get_speed_bin(fuse);
2330+
23042331
if (adreno_is_a618(adreno_gpu))
23052332
val = a618_get_speed_bin(fuse);
23062333

0 commit comments

Comments
 (0)