Bug 7236 - psplash: endian problem
Summary: psplash: endian problem
Status: VERIFIED FIXED
Alias: None
Product: System Startup
Classification: Runtime
Component: system-startup (show other bugs)
Version: 1.8
Hardware: Other ppc
: Medium normal
Target Milestone: 2.1
Assignee: Juro Bystricky
QA Contact: Yi Zhao
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-01-23 02:57 UTC by Yi Zhao
Modified: 2015-12-16 06:18 UTC (History)
9 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
splash screen (14.11 KB, image/png)
2015-01-23 02:57 UTC, Yi Zhao
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2015-01-23 02:57:23 UTC
Created attachment 2362 [details]
splash screen

Image location: http://autobuilder.yoctoproject.org/pub/releases/yocto-1.8_M2.rc1
Git rev: master/d9d5b8b499af3ae01a1e33d0d3969c54c2d4ab1b

When the qemuppc launched, the color of splash screen looks weird. Please see the attached image.
Comment 1 Saul Wold 2015-01-28 14:45:35 UTC
Can you verify this against 1.8M1 and/or on the MPC hardware, I think it might 
be a qemu related bug and want someone else to verify the failure.  I saw 
yellow with both 1.7 and 1.8M1.
Comment 2 Yi Zhao 2015-01-29 06:43:01 UTC
(In reply to comment #1)
> Can you verify this against 1.8M1 and/or on the MPC hardware, I think it
> might 
> be a qemu related bug and want someone else to verify the failure.  I saw 
> yellow with both 1.7 and 1.8M1.

Yes. It exists on qemuppc with both 1.7 and 1.8M1. MPC8315 doesn't support fbdev, there is no splash for it. I found there is a similar bug 1469 .
Comment 3 Yi Zhao 2015-02-05 09:13:30 UTC
Still exists in 1.8 M2 RC2
git rev: master/22c38e2d8a058619e3d05534b5e830b750aa4241
Comment 4 Alexandru Georgescu 2015-04-09 15:34:29 UTC
found during 1.8_M4.rc2 testing
fido:33558eacc8a2d3dce3396b9ab2fd0773ac5076bc
Comment 5 Saul Wold 2015-04-10 22:02:49 UTC
This issue has existed since before 1.8, it seems that this might be a problem within qemu and using 32bit, might be a byte ordering issue.
Comment 6 Saul Wold 2015-04-29 17:12:27 UTC
Please find an owner in WR for this
Comment 7 Juro Bystricky 2015-07-02 22:03:15 UTC
Endian problem in psplash-fb.c, routine "psplash_fb_plot_pixel"
assumes little endian:
.......
   if (fb->rgbmode == RGB565 || fb->rgbmode == RGB888) {
      case 32:
        *(fb->data + off)     = blue;
        *(fb->data + off + 1) = green;
        *(fb->data + off + 2) = red;
        break;

....
One way to fix this so it works for both endians:

     case 32:
         *(volatile uint32_t *) (fb->data + off)
	  = (red << 16) | (green << 8) | (blue);
         break;

Other cases (i.e. 24BPP and BGR888 should be probably also revisited)
Comment 8 Ross Burton 2015-11-11 20:33:54 UTC
Juro, can you submit that as a patch for psplash (I might have commit right there, so can merge that) and a corresponding upgrade to the recipe gitrev?
Comment 9 Juro Bystricky 2015-11-24 16:48:19 UTC
Sent patches to yocto@yoctoproject.org
Comment 11 Juro Bystricky 2015-11-24 19:09:21 UTC
Reopened, because a patch to psplash recipe is still needed.
Comment 12 Juro Bystricky 2015-11-24 23:26:48 UTC
sent recipe patch to mailing list
Comment 14 Yi Zhao 2015-12-16 06:18:00 UTC
Verified with 2.1 M1
git rev: master/5e3e2e0cbb0a49986f4653e64c4c8d2b5461645e