Commit aed4b787 authored by Mike Rapoport's avatar Mike Rapoport Committed by Greg Kroah-Hartman

staging: sm750fb: change definition of CRT_AUTO_CENTERING_BR fields

Use stratight-forward definition of CRT_AUTO_CENTERING_BR register fields
and use open-coded implementation for register manipulation
Signed-off-by: default avatarMike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 85943dae
...@@ -28,8 +28,9 @@ static unsigned long displayControlAdjust_SM750LE(mode_parameter_t *pModeParam, ...@@ -28,8 +28,9 @@ static unsigned long displayControlAdjust_SM750LE(mode_parameter_t *pModeParam,
POKE32(CRT_AUTO_CENTERING_TL, 0); POKE32(CRT_AUTO_CENTERING_TL, 0);
POKE32(CRT_AUTO_CENTERING_BR, POKE32(CRT_AUTO_CENTERING_BR,
FIELD_VALUE(0, CRT_AUTO_CENTERING_BR, BOTTOM, y - 1) (((y - 1) << CRT_AUTO_CENTERING_BR_BOTTOM_SHIFT) &
| FIELD_VALUE(0, CRT_AUTO_CENTERING_BR, RIGHT, x - 1)); CRT_AUTO_CENTERING_BR_BOTTOM_MASK) |
((x - 1) & CRT_AUTO_CENTERING_BR_RIGHT_MASK));
/* Assume common fields in dispControl have been properly set before /* Assume common fields in dispControl have been properly set before
calling this function. calling this function.
......
...@@ -1481,8 +1481,9 @@ ...@@ -1481,8 +1481,9 @@
#define CRT_AUTO_CENTERING_TL_LEFT_MASK 0x7ff #define CRT_AUTO_CENTERING_TL_LEFT_MASK 0x7ff
#define CRT_AUTO_CENTERING_BR 0x080284 #define CRT_AUTO_CENTERING_BR 0x080284
#define CRT_AUTO_CENTERING_BR_BOTTOM 26:16 #define CRT_AUTO_CENTERING_BR_BOTTOM_MASK (0x7ff << 16)
#define CRT_AUTO_CENTERING_BR_RIGHT 10:0 #define CRT_AUTO_CENTERING_BR_BOTTOM_SHIFT 16
#define CRT_AUTO_CENTERING_BR_RIGHT_MASK 0x7ff
#endif #endif
/* sm750le new register to control panel output */ /* sm750le new register to control panel output */
......
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