From patchwork Tue Jun 24 12:42:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 363430 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 81C711400AB; Tue, 24 Jun 2014 22:42:45 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1WzQ3a-0006Dc-Lu; Tue, 24 Jun 2014 12:42:38 +0000 Received: from mail.tpi.com ([74.45.170.26]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1WzQ3W-0006DD-71 for kernel-team@lists.ubuntu.com; Tue, 24 Jun 2014 12:42:34 +0000 Received: from salmon.rtg.net (mail.tpi.com [10.0.0.205]) by mail.tpi.com (Postfix) with ESMTP id 97EB3359BB7 for ; Tue, 24 Jun 2014 05:42:56 -0700 (PDT) Received: by salmon.rtg.net (Postfix, from userid 1000) id DBA22203AA; Tue, 24 Jun 2014 06:42:32 -0600 (MDT) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH Trusty SRU] Revert "offb: Add palette hack for little endian" Date: Tue, 24 Jun 2014 06:42:32 -0600 Message-Id: <1403613752-3197-1-git-send-email-tim.gardner@canonical.com> X-Mailer: git-send-email 1.9.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Benjamin Herrenschmidt BugLink: http://bugs.launchpad.net/bugs/1333430 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 CC: [v3.13+] Signed-off-by: Tim Gardner --- (cherry picked from commit 68986c9f0f4552c34c248501eb0c690553866d6e) --- drivers/video/offb.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/video/offb.c b/drivers/video/offb.c index 7d44d66..43a0a52 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c @@ -91,15 +91,6 @@ extern boot_infos_t *boot_infos; #define AVIVO_DC_LUTB_WHITE_OFFSET_GREEN 0x6cd4 #define AVIVO_DC_LUTB_WHITE_OFFSET_RED 0x6cd8 -#define FB_RIGHT_POS(p, bpp) (fb_be_math(p) ? 0 : (32 - (bpp))) - -static inline u32 offb_cmap_byteswap(struct fb_info *info, u32 value) -{ - u32 bpp = info->var.bits_per_pixel; - - return cpu_to_be32(value) >> FB_RIGHT_POS(info, bpp); -} - /* * Set a single color register. The values supplied are already * 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, mask <<= info->var.transp.offset; value |= mask; } - pal[regno] = offb_cmap_byteswap(info, value); + pal[regno] = value; return 0; }