Bug 1469

Summary: qemuarm images have blue and red component channels reversed in X/pslash
Product: [Yocto Project Subprojects] Kernel Reporter: Richard Purdie <richard.purdie>
Component: kernel-toolingAssignee: Bruce Ashfield <bruce.ashfield>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: High CC: dvhart, liming.wang, poky.bs.watcher, poky.watcher, yi.zhao, yp.kernel.watcher, yp.watcher
Version: unspecified   
Target Milestone: 1.1   
Hardware: x86   
OS: arm   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
Patch demonstrating fixed colours on qemuarm none

Description Richard Purdie 2011-09-10 09:32:56 UTC
If you look at X or at psplash the blue and red changes are reversed (the yocto dot on the logo is orange, not blue as it should be).

This is likely a kernel issue reporting the wrong bitmasks to userspace since the pslash code hasn't changed recently (and for X and psplash to be showing the same problem).
Comment 1 Darren Hart 2011-09-15 15:06:01 UTC
Bruce, can you ask someone to look into this? I wonder if this may also be related to Bug 1260.
Comment 2 Bruce Ashfield 2011-09-15 17:53:05 UTC
We can have a look. I've never noticed this myself (and have tested sato). The 
kernel has been stable for some time, so if this is kernel, it's been there since
we jumped to 3.0.
Comment 3 Liming Wang 2011-09-16 03:07:25 UTC
9728c1b6a724daefc413b44e10253cdbb5e06d08 imports this issue. Specially, following line leads to the issue:

+       /* Always clear BGR for RGB565: we do the routing externally */
+       if (fb->fb.var.green.length == 6)
+               regs->cntl &= ~CNTL_BGR;
Comment 4 Richard Purdie 2011-09-16 03:22:41 UTC
Ok, this looks like an intentional upstream change and it therefore looks like the emulator is now "wrong" compared to what the real harware would do. We likely therefore need to fix qemu to handle this situation correctly. The function in question in pl110_update_display().
Comment 5 Richard Purdie 2011-09-16 06:46:36 UTC
Created attachment 238 [details]
Patch demonstrating fixed colours on qemuarm
Comment 6 Bruce Ashfield 2011-09-16 06:48:47 UTC
Who's running with getting the fix into the tree ? I just want to be sure.
Comment 7 Richard Purdie 2011-09-16 07:59:14 UTC
Since I was experimenting and had a reproducer I've put http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/commit/?h=rpurdie/qemu&id=d06781eab16881d2206a3306c66a0c4c1e178dde together so I'll take it.
Comment 8 Bruce Ashfield 2011-09-16 08:03:41 UTC
Great. And the patch looks fine to my eye.
Comment 10 Yi Zhao 2011-09-27 23:06:21 UTC
Verified it with 1.1 M4 RC3 20110925 build.

Tree/Branch: poky/edison
Poky Commit: 41c564fe605fa4685fd27b1721e3424ac8a96db1