From patchwork Wed Mar 5 08:19:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Ringle X-Patchwork-Id: 3771271 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 4315C9F1EE for ; Wed, 5 Mar 2014 08:20:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7A7FB2017E for ; Wed, 5 Mar 2014 08:20:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 756AC2017B for ; Wed, 5 Mar 2014 08:20:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753670AbaCEIUM (ORCPT ); Wed, 5 Mar 2014 03:20:12 -0500 Received: from mail-qc0-f176.google.com ([209.85.216.176]:34565 "EHLO mail-qc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752016AbaCEIUL (ORCPT ); Wed, 5 Mar 2014 03:20:11 -0500 Received: by mail-qc0-f176.google.com with SMTP id m20so742296qcx.35 for ; Wed, 05 Mar 2014 00:20:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=H2/uaWkKdXU3jYh2jBPae4ASoVsK/TZPbH3h2P6bclE=; b=ZC6evUuwfc9ZgjdZHbLpysxyZr3IrcWnIM9ASzC9K9KzRIlBD8ZmA6Ii6k/6op9Gvg 7trFcCJCV36K22cAmkbItYVI3eyxQGvjfnFy62WjHjQ86tiRpWf/UIEpIVvbrUAEg+6O +12/T53bsLxi4CgCyr9EFa5yqe1+2o27+Fx5bE3uGmEZBmpDctdnv/N5Yh+K9EUdnYu6 QZMhSmbFFYAgQuXCuJYaz3qCM+5rpJzS9kmQ0HoaIWhmJlk8s9cLNEqQE84vNwyEHVnL vNMp+FMn8H5osAL+lrL17x5Hq0ZSVQ3npbOrSKkd9yFXc51oCVpIpKy8B/C89Pjm00kw 1Flw== X-Received: by 10.224.103.197 with SMTP id l5mr4935691qao.69.1394007610815; Wed, 05 Mar 2014 00:20:10 -0800 (PST) Received: from jringle-ubuntu.gridpoint.com (c-68-57-179-233.hsd1.va.comcast.net. [68.57.179.233]) by mx.google.com with ESMTPSA id q10sm5523017qaj.13.2014.03.05.00.20.08 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Mar 2014 00:20:09 -0800 (PST) From: jon@ringle.org To: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jon Ringle Subject: [PATCH] video: da8xx-fb: Fix casting of info->pseudo_palette Date: Wed, 5 Mar 2014 03:19:59 -0500 Message-Id: <1394007599-31429-1-git-send-email-jon@ringle.org> X-Mailer: git-send-email 1.8.5.4 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 From: Jon Ringle (Resending without corporate disclaimer in email footer) 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(-) 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;