]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/adreno: fix cast in adreno_get_param()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 7 Mar 2022 13:31:05 +0000 (16:31 +0300)
committerRob Clark <robdclark@chromium.org>
Tue, 8 Mar 2022 17:49:00 +0000 (09:49 -0800)
commit452451b20a5ddf85fe3607639a4f1a51ebfee07b
tree6b7f4522ef0d6a70d425b69f9c7fcedc44c290ff
parent6cf1ba54d6910472a4b8a663e61bee6f9ea5556f
drm/msm/adreno: fix cast in adreno_get_param()

These casts need to happen before the shift.  The only time it would
matter would be if "rev.core" is >= 128.  In that case the sign bit
would be extended and we do not want that.

Fixes: 9c31d0f7efdb ("drm/msm/adreno: Expose speedbin to userspace")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
Link: https://lore.kernel.org/r/20220307133105.GA17534@kili
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/adreno_gpu.c