"unsigned long" is a lousy data type when it comes to match peripheral
hardware registers with a fixed size.
Just do the obvious and match a 32-bit display format with an "u32"
data type for casting.
This fixes the logo display on 64-bit architectures, which produced
a black line on the right side of the logo with non-black backgrounds.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
}
#define FILL_32BIT_X888RGB(r,g,b) { \
- *(unsigned long *)fb = \
- SWAP32((unsigned long)(((r<<16) | \
+ *(u32 *)fb = \
+ SWAP32((unsigned int)(((r<<16) | \
(g<<8) | \
b))); \
fb += 4; \
break;
case GDF_32BIT_X888RGB:
for (i = 0; i < cnt; i++) {
- *(unsigned long *) addr = p[bm[*off]].ce.dw;
+ *(u32 *) addr = p[bm[*off]].ce.dw;
addr += 4;
}
break;
(b >> 3)));
break;
case GDF_32BIT_X888RGB:
- *(unsigned long *) dest =
- SWAP32((unsigned long) (
+ *(u32 *) dest =
+ SWAP32((u32) (
(r << 16) |
(g << 8) |
b));