Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2012 02:31:08 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r243687 - head/sys/arm/broadcom/bcm2835
Message-ID:  <201211300231.qAU2V8Tq099370@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Fri Nov 30 02:31:08 2012
New Revision: 243687
URL: http://svnweb.freebsd.org/changeset/base/243687

Log:
  Fix RGB565 case

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_fb.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2835_fb.c	Fri Nov 30 01:38:00 2012	(r243686)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_fb.c	Fri Nov 30 02:31:08 2012	(r243687)
@@ -776,11 +776,11 @@ bcmfb_putc(video_adapter_t *adp, vm_offs
 				addr[3*j+2] = bcmfb_palette[color].b;
 				break;
 			case 16:
-				rgb = (bcmfb_palette[color].r >> 3) << 10;
-				rgb |= (bcmfb_palette[color].g >> 3) << 5;
+				rgb = (bcmfb_palette[color].r >> 3) << 11;
+				rgb |= (bcmfb_palette[color].g >> 2) << 5;
 				rgb |= (bcmfb_palette[color].b >> 3);
-				addr[2*j] = (rgb >> 8) & 0xff;
-				addr[2*j + 1] = rgb & 0xff;
+				addr[2*j] = rgb & 0xff;
+				addr[2*j + 1] = (rgb >> 8) & 0xff;
 			default:
 				/* Not supported yet */
 				break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211300231.qAU2V8Tq099370>