From ebc016b6e42f71ee02eac00537051ae59f2ba9ec Mon Sep 17 00:00:00 2001 From: Nilaan Gunabalachandran Date: Wed, 27 May 2020 17:22:37 -0400 Subject: [PATCH] disp: msm: sde: make all HW definitions unsigned Treating hw version as a signed int results in a negative number when major version is more than 7, leading to errors when comparing versions in the driver. Fix this by making sure all HW version definitions and variables are unsigned. Change-Id: Ic77183f85e5408092e05817cf95df5b0f0fcac75 Signed-off-by: Nilaan Gunabalachandran --- msm/sde/sde_hw_catalog.h | 2 +- msm/sde/sde_kms.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_hw_catalog.h b/msm/sde/sde_hw_catalog.h index 3017aee8c5f3..f54c69f0a061 100644 --- a/msm/sde/sde_hw_catalog.h +++ b/msm/sde/sde_hw_catalog.h @@ -21,7 +21,7 @@ */ #define MAX_BLOCKS 12 -#define SDE_HW_VER(MAJOR, MINOR, STEP) (((MAJOR & 0xF) << 28) |\ +#define SDE_HW_VER(MAJOR, MINOR, STEP) ((u32)((MAJOR & 0xF) << 28) |\ ((MINOR & 0xFFF) << 16) |\ (STEP & 0xFFFF)) diff --git a/msm/sde/sde_kms.h b/msm/sde/sde_kms.h index 468c5d94c116..7a9db1ae24ba 100644 --- a/msm/sde/sde_kms.h +++ b/msm/sde/sde_kms.h @@ -248,7 +248,7 @@ struct sde_kms_frame_event_cb_data { struct sde_kms { struct msm_kms base; struct drm_device *dev; - int core_rev; + uint32_t core_rev; struct sde_mdss_cfg *catalog; struct generic_pm_domain genpd;