Skip to content

Commit ac92654

Browse files
konradybciorobclark
authored andcommitted
drm/msm/a6xx: Use "else if" in GPU speedbin rev matching
The GPU can only be one at a time. Turn a series of ifs into if + elseifs to save some CPU cycles. 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/542770/ Signed-off-by: Rob Clark <[email protected]>
1 parent 3e90044 commit ac92654

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2276,16 +2276,16 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse)
22762276
if (adreno_cmp_rev(ADRENO_REV(6, 1, 8, ANY_ID), rev))
22772277
val = a618_get_speed_bin(fuse);
22782278

2279-
if (adreno_cmp_rev(ADRENO_REV(6, 1, 9, ANY_ID), rev))
2279+
else if (adreno_cmp_rev(ADRENO_REV(6, 1, 9, ANY_ID), rev))
22802280
val = a619_get_speed_bin(fuse);
22812281

2282-
if (adreno_cmp_rev(ADRENO_REV(6, 3, 5, ANY_ID), rev))
2282+
else if (adreno_cmp_rev(ADRENO_REV(6, 3, 5, ANY_ID), rev))
22832283
val = adreno_7c3_get_speed_bin(fuse);
22842284

2285-
if (adreno_cmp_rev(ADRENO_REV(6, 4, 0, ANY_ID), rev))
2285+
else if (adreno_cmp_rev(ADRENO_REV(6, 4, 0, ANY_ID), rev))
22862286
val = a640_get_speed_bin(fuse);
22872287

2288-
if (adreno_cmp_rev(ADRENO_REV(6, 5, 0, ANY_ID), rev))
2288+
else if (adreno_cmp_rev(ADRENO_REV(6, 5, 0, ANY_ID), rev))
22892289
val = a650_get_speed_bin(fuse);
22902290

22912291
if (val == UINT_MAX) {

0 commit comments

Comments
 (0)