Commit ac926549 authored by Konrad Dybcio's avatar Konrad Dybcio Committed by Rob Clark

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: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarAkhil P Oommen <quic_akhilpo@quicinc.com>
Signed-off-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/542770/Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 3e90044d
...@@ -2276,16 +2276,16 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse) ...@@ -2276,16 +2276,16 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse)
if (adreno_cmp_rev(ADRENO_REV(6, 1, 8, ANY_ID), rev)) if (adreno_cmp_rev(ADRENO_REV(6, 1, 8, ANY_ID), rev))
val = a618_get_speed_bin(fuse); val = a618_get_speed_bin(fuse);
if (adreno_cmp_rev(ADRENO_REV(6, 1, 9, ANY_ID), rev)) else if (adreno_cmp_rev(ADRENO_REV(6, 1, 9, ANY_ID), rev))
val = a619_get_speed_bin(fuse); val = a619_get_speed_bin(fuse);
if (adreno_cmp_rev(ADRENO_REV(6, 3, 5, ANY_ID), rev)) else if (adreno_cmp_rev(ADRENO_REV(6, 3, 5, ANY_ID), rev))
val = adreno_7c3_get_speed_bin(fuse); val = adreno_7c3_get_speed_bin(fuse);
if (adreno_cmp_rev(ADRENO_REV(6, 4, 0, ANY_ID), rev)) else if (adreno_cmp_rev(ADRENO_REV(6, 4, 0, ANY_ID), rev))
val = a640_get_speed_bin(fuse); val = a640_get_speed_bin(fuse);
if (adreno_cmp_rev(ADRENO_REV(6, 5, 0, ANY_ID), rev)) else if (adreno_cmp_rev(ADRENO_REV(6, 5, 0, ANY_ID), rev))
val = a650_get_speed_bin(fuse); val = a650_get_speed_bin(fuse);
if (val == UINT_MAX) { if (val == UINT_MAX) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment