Thread (15 messages) flat view 15 messages, 3 authors, 2016-04-18
STALE3775d

[PATCH 4/7 v2] video: ARM CLCD: support pads connected in reverse order

From: Russell King - ARM Linux <hidden>
Date: 2016-02-23 10:35:18
Also in: linux-fbdev

On Tue, Feb 23, 2016 at 11:01:41AM +0100, Linus Walleij wrote:
-		if (var->red.offset == 0)
-			val &= ~CNTL_BGR;
-		else
-			val |= CNTL_BGR;
+		if (!fb->panel->bgr_connection) {
+			if (var->red.offset == 0)
+				val &= ~CNTL_BGR;
+			else
+				val |= CNTL_BGR;
+		} else {
+			if (var->blue.offset == 0)
+				val &= ~CNTL_BGR;
+			else
+				val |= CNTL_BGR;
+		}
		if (fb->panel->bgr_connection)
			val ^= CNTL_BGR;

is a shorter way to write the above, and probably easier on the compiler
too.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help