From patchwork Mon Mar 3 08:43:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Ringle X-Patchwork-Id: 3752151 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 194309F1EE for ; Mon, 3 Mar 2014 08:49:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 436BA203AB for ; Mon, 3 Mar 2014 08:49:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 37371203A9 for ; Mon, 3 Mar 2014 08:49:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753905AbaCCIts (ORCPT ); Mon, 3 Mar 2014 03:49:48 -0500 Received: from mail1.bemta8.messagelabs.com ([216.82.243.195]:6340 "EHLO mail1.bemta8.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753760AbaCCIts convert rfc822-to-8bit (ORCPT ); Mon, 3 Mar 2014 03:49:48 -0500 X-Greylist: delayed 396 seconds by postgrey-1.27 at vger.kernel.org; Mon, 03 Mar 2014 03:49:47 EST Received: from [216.82.241.132:48889] by server-3.bemta-8.messagelabs.com id E6/C4-27390-E9044135; Mon, 03 Mar 2014 08:43:10 +0000 X-Env-Sender: Jonathan.Ringle@gridpoint.com X-Msg-Ref: server-16.tower-45.messagelabs.com!1393836190!34586401!1 X-Originating-IP: [67.200.113.45] X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 29486 invoked from network); 3 Mar 2014 08:43:10 -0000 Received: from owa.gridpoint.com (HELO corp-it-exch01.gridpoint.com) (67.200.113.45) by server-16.tower-45.messagelabs.com with RC4-SHA encrypted SMTP; 3 Mar 2014 08:43:10 -0000 Received: from jringle-ubuntu.gridpoint.com (10.201.141.112) by corp-it-exch01.gridpoint.com (172.17.15.10) with Microsoft SMTP Server (TLS) id 8.3.342.0; Mon, 3 Mar 2014 03:43:09 -0500 From: Jon Ringle To: CC: Jon Ringle Subject: [PATCH] video: da8xx-fb: Fix casting of info->pseudo_palette Date: Mon, 3 Mar 2014 03:43:03 -0500 Message-ID: <1393836183-26555-1-git-send-email-jringle@gridpoint.com> X-Mailer: git-send-email 1.8.5.4 MIME-Version: 1.0 X-EMS-Proccessed: KgU7Zc8frcTgvrN/cX2wdQ== X-EMS-STAMP: S15TwNZR83SHefnCiEhaOQ== Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The casting to (u16 *) on info->pseudo_palette is wrong and causes the display to show a blue (garbage) vertical line on every other pixel column Signed-off-by: Jon Ringle --- drivers/video/da8xx-fb.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) -- 1.8.5.4 The information contained in this transmission may contain confidential information. If the reader of this message is not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index d042624..83c43b2 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -678,15 +678,7 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green, (green << info->var.green.offset) | (blue << info->var.blue.offset); - switch (info->var.bits_per_pixel) { - case 16: - ((u16 *) (info->pseudo_palette))[regno] = v; - break; - case 24: - case 32: - ((u32 *) (info->pseudo_palette))[regno] = v; - break; - } + ((u32 *) (info->pseudo_palette))[regno] = v; if (palette[0] != 0x4000) { update_hw = 1; palette[0] = 0x4000;