diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-06-16 05:40:20 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-06-16 05:45:45 -0400 |
commit | 68986c9f0f4552c34c248501eb0c690553866d6e (patch) | |
tree | 5705e72f02a264760cfe6a4c9cd7d022218a4f21 /drivers/video | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) |
Revert "offb: Add palette hack for little endian"
This reverts commit e1edf18b20076da83dd231dbd2146cbbc31c0b14.
This patch was a misguided attempt at fixing offb for LE ppc64
kernels on BE qemu but is just wrong ... it breaks real LE/LE
setups, LE with real HW, and existing mixed endian systems
that did the fight thing with the appropriate device-tree
property. Bad reviewing on my part, sorry.
The right fix is to either make qemu change its endian when
the guest changes endian (working on that) or to use the
existing foreign endian support.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: <stable@vger.kernel.org> [v3.13+]
---
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/offb.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c index 7d44d669d5b6..43a0a52fc527 100644 --- a/drivers/video/fbdev/offb.c +++ b/drivers/video/fbdev/offb.c | |||
@@ -91,15 +91,6 @@ extern boot_infos_t *boot_infos; | |||
91 | #define AVIVO_DC_LUTB_WHITE_OFFSET_GREEN 0x6cd4 | 91 | #define AVIVO_DC_LUTB_WHITE_OFFSET_GREEN 0x6cd4 |
92 | #define AVIVO_DC_LUTB_WHITE_OFFSET_RED 0x6cd8 | 92 | #define AVIVO_DC_LUTB_WHITE_OFFSET_RED 0x6cd8 |
93 | 93 | ||
94 | #define FB_RIGHT_POS(p, bpp) (fb_be_math(p) ? 0 : (32 - (bpp))) | ||
95 | |||
96 | static inline u32 offb_cmap_byteswap(struct fb_info *info, u32 value) | ||
97 | { | ||
98 | u32 bpp = info->var.bits_per_pixel; | ||
99 | |||
100 | return cpu_to_be32(value) >> FB_RIGHT_POS(info, bpp); | ||
101 | } | ||
102 | |||
103 | /* | 94 | /* |
104 | * Set a single color register. The values supplied are already | 95 | * Set a single color register. The values supplied are already |
105 | * rounded down to the hardware's capabilities (according to the | 96 | * rounded down to the hardware's capabilities (according to the |
@@ -129,7 +120,7 @@ static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | |||
129 | mask <<= info->var.transp.offset; | 120 | mask <<= info->var.transp.offset; |
130 | value |= mask; | 121 | value |= mask; |
131 | } | 122 | } |
132 | pal[regno] = offb_cmap_byteswap(info, value); | 123 | pal[regno] = value; |
133 | return 0; | 124 | return 0; |
134 | } | 125 | } |
135 | 126 | ||