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

staging: sm750fb: change definition of DE_DIMENSION fields

Use stratight-forward definition of DE_DIMENSION 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 aeaab186
...@@ -119,8 +119,8 @@ int hw_fillrect(struct lynx_accel *accel, ...@@ -119,8 +119,8 @@ int hw_fillrect(struct lynx_accel *accel,
(y & DE_DESTINATION_Y_MASK)); /* dpr4 */ (y & DE_DESTINATION_Y_MASK)); /* dpr4 */
write_dpr(accel, DE_DIMENSION, write_dpr(accel, DE_DIMENSION,
FIELD_VALUE(0, DE_DIMENSION, X, width)| ((width << DE_DIMENSION_X_SHIFT) & DE_DIMENSION_X_MASK) |
FIELD_VALUE(0, DE_DIMENSION, Y_ET, height)); /* dpr8 */ (height & DE_DIMENSION_Y_ET_MASK)); /* dpr8 */
deCtrl = deCtrl =
FIELD_SET(0, DE_CONTROL, STATUS, START)| FIELD_SET(0, DE_CONTROL, STATUS, START)|
...@@ -261,8 +261,8 @@ unsigned int rop2) /* ROP value */ ...@@ -261,8 +261,8 @@ unsigned int rop2) /* ROP value */
((dx << DE_DESTINATION_X_SHIFT) & DE_DESTINATION_X_MASK) | ((dx << DE_DESTINATION_X_SHIFT) & DE_DESTINATION_X_MASK) |
(dy & DE_DESTINATION_Y_MASK)); /* dpr04 */ (dy & DE_DESTINATION_Y_MASK)); /* dpr04 */
write_dpr(accel, DE_DIMENSION, write_dpr(accel, DE_DIMENSION,
FIELD_VALUE(0, DE_DIMENSION, X, width) | ((width << DE_DIMENSION_X_SHIFT) & DE_DIMENSION_X_MASK) |
FIELD_VALUE(0, DE_DIMENSION, Y_ET, height)); /* dpr08 */ (height & DE_DIMENSION_Y_ET_MASK)); /* dpr08 */
de_ctrl = FIELD_VALUE(0, DE_CONTROL, ROP, rop2) | de_ctrl = FIELD_VALUE(0, DE_CONTROL, ROP, rop2) |
FIELD_SET(0, DE_CONTROL, ROP_SELECT, ROP2) | FIELD_SET(0, DE_CONTROL, ROP_SELECT, ROP2) |
...@@ -359,8 +359,8 @@ int hw_imageblit(struct lynx_accel *accel, ...@@ -359,8 +359,8 @@ int hw_imageblit(struct lynx_accel *accel,
(dy & DE_DESTINATION_Y_MASK)); /* dpr04 */ (dy & DE_DESTINATION_Y_MASK)); /* dpr04 */
write_dpr(accel, DE_DIMENSION, write_dpr(accel, DE_DIMENSION,
FIELD_VALUE(0, DE_DIMENSION, X, width) | ((width << DE_DIMENSION_X_SHIFT) & DE_DIMENSION_X_MASK) |
FIELD_VALUE(0, DE_DIMENSION, Y_ET, height)); /* dpr08 */ (height & DE_DIMENSION_Y_ET_MASK)); /* dpr08 */
write_dpr(accel, DE_FOREGROUND, fColor); write_dpr(accel, DE_FOREGROUND, fColor);
write_dpr(accel, DE_BACKGROUND, bColor); write_dpr(accel, DE_BACKGROUND, bColor);
......
...@@ -34,8 +34,9 @@ ...@@ -34,8 +34,9 @@
#define DE_DESTINATION_Y_MASK 0xffff #define DE_DESTINATION_Y_MASK 0xffff
#define DE_DIMENSION 0x8 #define DE_DIMENSION 0x8
#define DE_DIMENSION_X 28:16 #define DE_DIMENSION_X_SHIFT 16
#define DE_DIMENSION_Y_ET 15:0 #define DE_DIMENSION_X_MASK (0x1fff << 16)
#define DE_DIMENSION_Y_ET_MASK 0x1fff
#define DE_CONTROL 0xC #define DE_CONTROL 0xC
#define DE_CONTROL_STATUS 31:31 #define DE_CONTROL_STATUS 31:31
......
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