Browse Source

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 <[email protected]>
Nilaan Gunabalachandran 5 years ago
parent
commit
ebc016b6e4
2 changed files with 2 additions and 2 deletions
  1. 1 1
      msm/sde/sde_hw_catalog.h
  2. 1 1
      msm/sde/sde_kms.h

+ 1 - 1
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))
 

+ 1 - 1
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;