mirror of https://gitee.com/openkylin/linux.git
staging: sm750fb: change definition of DE_WINDOW_WIDTH fields
Use stratight-forward definition of DE_WINDOW_WIDTH register fields and use open-coded implementation for register manipulation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f7a61fde48
commit
8bac9c84cc
|
@ -103,8 +103,9 @@ int hw_fillrect(struct lynx_accel *accel,
|
||||||
(pitch / Bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */
|
(pitch / Bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */
|
||||||
|
|
||||||
write_dpr(accel, DE_WINDOW_WIDTH,
|
write_dpr(accel, DE_WINDOW_WIDTH,
|
||||||
FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, pitch/Bpp)|
|
((pitch / Bpp << DE_WINDOW_WIDTH_DST_SHIFT) &
|
||||||
FIELD_VALUE(0, DE_WINDOW_WIDTH, SOURCE, pitch/Bpp)); /* dpr44 */
|
DE_WINDOW_WIDTH_DST_MASK) |
|
||||||
|
(pitch / Bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr44 */
|
||||||
|
|
||||||
write_dpr(accel, DE_FOREGROUND, color); /* DPR14 */
|
write_dpr(accel, DE_FOREGROUND, color); /* DPR14 */
|
||||||
|
|
||||||
|
@ -235,8 +236,9 @@ unsigned int rop2) /* ROP value */
|
||||||
2D engine uses this value to calculate the linear address in frame buffer for a given point.
|
2D engine uses this value to calculate the linear address in frame buffer for a given point.
|
||||||
*/
|
*/
|
||||||
write_dpr(accel, DE_WINDOW_WIDTH,
|
write_dpr(accel, DE_WINDOW_WIDTH,
|
||||||
FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, (dPitch/Bpp)) |
|
((dPitch / Bpp << DE_WINDOW_WIDTH_DST_SHIFT) &
|
||||||
FIELD_VALUE(0, DE_WINDOW_WIDTH, SOURCE, (sPitch/Bpp))); /* dpr3c */
|
DE_WINDOW_WIDTH_DST_MASK) |
|
||||||
|
(sPitch / Bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr3c */
|
||||||
|
|
||||||
if (accel->de_wait() != 0)
|
if (accel->de_wait() != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -327,8 +329,9 @@ int hw_imageblit(struct lynx_accel *accel,
|
||||||
2D engine uses this value to calculate the linear address in frame buffer for a given point.
|
2D engine uses this value to calculate the linear address in frame buffer for a given point.
|
||||||
*/
|
*/
|
||||||
write_dpr(accel, DE_WINDOW_WIDTH,
|
write_dpr(accel, DE_WINDOW_WIDTH,
|
||||||
FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, (dPitch/bytePerPixel)) |
|
((dPitch / bytePerPixel << DE_WINDOW_WIDTH_DST_SHIFT) &
|
||||||
FIELD_VALUE(0, DE_WINDOW_WIDTH, SOURCE, (dPitch/bytePerPixel)));
|
DE_WINDOW_WIDTH_DST_MASK) |
|
||||||
|
(dPitch / bytePerPixel & DE_WINDOW_WIDTH_SRC_MASK));
|
||||||
|
|
||||||
/* Note: For 2D Source in Host Write, only X_K1_MONO field is needed, and Y_K2 field is not used.
|
/* Note: For 2D Source in Host Write, only X_K1_MONO field is needed, and Y_K2 field is not used.
|
||||||
For mono bitmap, use startBit for X_K1. */
|
For mono bitmap, use startBit for X_K1. */
|
||||||
|
|
|
@ -157,8 +157,9 @@
|
||||||
#define DE_MONO_PATTERN_HIGH_PATTERN 31:0
|
#define DE_MONO_PATTERN_HIGH_PATTERN 31:0
|
||||||
|
|
||||||
#define DE_WINDOW_WIDTH 0x00003C
|
#define DE_WINDOW_WIDTH 0x00003C
|
||||||
#define DE_WINDOW_WIDTH_DESTINATION 28:16
|
#define DE_WINDOW_WIDTH_DST_SHIFT 16
|
||||||
#define DE_WINDOW_WIDTH_SOURCE 12:0
|
#define DE_WINDOW_WIDTH_DST_MASK (0x1fff << 16)
|
||||||
|
#define DE_WINDOW_WIDTH_SRC_MASK 0x1fff
|
||||||
|
|
||||||
#define DE_WINDOW_SOURCE_BASE 0x000040
|
#define DE_WINDOW_SOURCE_BASE 0x000040
|
||||||
#define DE_WINDOW_SOURCE_BASE_EXT 27:27
|
#define DE_WINDOW_SOURCE_BASE_EXT 27:27
|
||||||
|
|
Loading…
Reference in New Issue