All of lore.kernel.org
 help / color / mirror / Atom feed
* [PSPLASH 0/2] Few fixes for psplash
@ 2015-11-24 16:39 Juro Bystricky
  2015-11-24 16:39 ` [PSPLASH 1/2] psplash-fb.c: Fix BGR888 detection Juro Bystricky
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Juro Bystricky @ 2015-11-24 16:39 UTC (permalink / raw)
  To: yocto; +Cc: jurobystricky

These patches fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=7236                                                
Considering there was a bug in the BGR888 detection, it is probaly safe to 
assume it was never used. I modified handling of 24BPP modes somewhat as well,
but did not test it. 24BPP changes only affect big endian mode, little endian
should be the same as before. (If you are aware of anybody actually using 24BPP
modes, please let me know)
Tested with jethro/core-image-sato (qemuppc, qemumips, qemuarm).


Juro Bystricky (2):
  psplash-fb.c: Fix BGR888 detection
  psplash-fb.c: Fix some endian issues

 psplash-fb.c | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PSPLASH 1/2] psplash-fb.c: Fix BGR888 detection
  2015-11-24 16:39 [PSPLASH 0/2] Few fixes for psplash Juro Bystricky
@ 2015-11-24 16:39 ` Juro Bystricky
  2015-11-25 20:12   ` Aws Ismail
  2015-11-24 16:39 ` [PSPLASH 2/2] psplash-fb.c: Fix some endian issues Juro Bystricky
  2015-11-24 16:57 ` [PSPLASH 0/2] Few fixes for psplash Burton, Ross
  2 siblings, 1 reply; 8+ messages in thread
From: Juro Bystricky @ 2015-11-24 16:39 UTC (permalink / raw)
  To: yocto; +Cc: jurobystricky

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
---
 psplash-fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/psplash-fb.c b/psplash-fb.c
index bd9cd9d..e71af8f 100644
--- a/psplash-fb.c
+++ b/psplash-fb.c
@@ -185,7 +185,7 @@ psplash_fb_new (int angle)
          fb->rgbmode = RGB888;
   } else if (fb->red_offset == 0 && fb->red_length == 8 &&
       fb->green_offset == 8 && fb->green_length == 8 &&
-      fb->blue_offset == 8 && fb->blue_length == 8) {
+      fb->blue_offset == 16 && fb->blue_length == 8) {
          fb->rgbmode = BGR888;
   } else {
          fb->rgbmode = GENERIC;
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PSPLASH 2/2] psplash-fb.c: Fix some endian issues
  2015-11-24 16:39 [PSPLASH 0/2] Few fixes for psplash Juro Bystricky
  2015-11-24 16:39 ` [PSPLASH 1/2] psplash-fb.c: Fix BGR888 detection Juro Bystricky
@ 2015-11-24 16:39 ` Juro Bystricky
  2015-11-24 16:57 ` [PSPLASH 0/2] Few fixes for psplash Burton, Ross
  2 siblings, 0 replies; 8+ messages in thread
From: Juro Bystricky @ 2015-11-24 16:39 UTC (permalink / raw)
  To: yocto; +Cc: jurobystricky

The routine psplash_fb_plot_pixel implicitly assumed little endian
format when plotting pixels in RGB888 or BGR888 modes.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
---
 psplash-fb.c | 29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/psplash-fb.c b/psplash-fb.c
index e71af8f..7b352e0 100644
--- a/psplash-fb.c
+++ b/psplash-fb.c
@@ -14,6 +14,8 @@
  *  GNU General Public License for more details.
  *
  */
+
+#include <endian.h>
 #include "psplash.h"
 
 void
@@ -294,11 +296,21 @@ psplash_fb_plot_pixel (PSplashFB    *fb,
     switch (fb->bpp)
       {
       case 24:
-      case 32:
-        *(fb->data + off)     = blue;
+#if __BYTE_ORDER == __BIG_ENDIAN
+        *(fb->data + off + 0) = red;
+        *(fb->data + off + 1) = green;
+        *(fb->data + off + 2) = blue;
+#else
+        *(fb->data + off + 0) = blue;
         *(fb->data + off + 1) = green;
         *(fb->data + off + 2) = red;
+#endif
+        break;
+      case 32:
+        *(volatile uint32_t *) (fb->data + off)
+          = (red << 16) | (green << 8) | (blue);
         break;
+
       case 16:
         *(volatile uint16_t *) (fb->data + off)
 	  = ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
@@ -311,10 +323,19 @@ psplash_fb_plot_pixel (PSplashFB    *fb,
     switch (fb->bpp)
       {
       case 24:
-      case 32:
-        *(fb->data + off)     = red;
+#if __BYTE_ORDER == __BIG_ENDIAN
+        *(fb->data + off + 0) = blue;
+        *(fb->data + off + 1) = green;
+        *(fb->data + off + 2) = red;
+#else
+        *(fb->data + off + 0) = red;
         *(fb->data + off + 1) = green;
         *(fb->data + off + 2) = blue;
+#endif
+        break;
+      case 32:
+        *(volatile uint32_t *) (fb->data + off)
+          = (blue << 16) | (green << 8) | (red);
         break;
       case 16:
         *(volatile uint16_t *) (fb->data + off)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PSPLASH 0/2] Few fixes for psplash
  2015-11-24 16:39 [PSPLASH 0/2] Few fixes for psplash Juro Bystricky
  2015-11-24 16:39 ` [PSPLASH 1/2] psplash-fb.c: Fix BGR888 detection Juro Bystricky
  2015-11-24 16:39 ` [PSPLASH 2/2] psplash-fb.c: Fix some endian issues Juro Bystricky
@ 2015-11-24 16:57 ` Burton, Ross
  2015-11-24 18:39   ` Bystricky, Juro
  2 siblings, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2015-11-24 16:57 UTC (permalink / raw)
  To: Juro Bystricky; +Cc: yocto, Juro Bystricky

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

On 24 November 2015 at 16:39, Juro Bystricky <juro.bystricky@intel.com>
wrote:

> These patches fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=7236
> Considering there was a bug in the BGR888 detection, it is probaly safe to
> assume it was never used. I modified handling of 24BPP modes somewhat as
> well,
> but did not test it. 24BPP changes only affect big endian mode, little
> endian
> should be the same as before. (If you are aware of anybody actually using
> 24BPP
> modes, please let me know)
> Tested with jethro/core-image-sato (qemuppc, qemumips, qemuarm).
>

Thanks Juro.  Merged to psplash master.

Ross

[-- Attachment #2: Type: text/html, Size: 1156 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PSPLASH 0/2] Few fixes for psplash
  2015-11-24 16:57 ` [PSPLASH 0/2] Few fixes for psplash Burton, Ross
@ 2015-11-24 18:39   ` Bystricky, Juro
  2015-11-24 20:46     ` Burton, Ross
  0 siblings, 1 reply; 8+ messages in thread
From: Bystricky, Juro @ 2015-11-24 18:39 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto, Juro Bystricky

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

Thanks. I’ll mark the bug 7236 as resolved/fixed.
Juro


From: Burton, Ross [mailto:ross.burton@intel.com]
Sent: Tuesday, November 24, 2015 8:58 AM
To: Bystricky, Juro
Cc: yocto@yoctoproject.org; Juro Bystricky
Subject: Re: [yocto] [PSPLASH 0/2] Few fixes for psplash


On 24 November 2015 at 16:39, Juro Bystricky <juro.bystricky@intel.com<mailto:juro.bystricky@intel.com>> wrote:
These patches fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=7236
Considering there was a bug in the BGR888 detection, it is probaly safe to
assume it was never used. I modified handling of 24BPP modes somewhat as well,
but did not test it. 24BPP changes only affect big endian mode, little endian
should be the same as before. (If you are aware of anybody actually using 24BPP
modes, please let me know)
Tested with jethro/core-image-sato (qemuppc, qemumips, qemuarm).

Thanks Juro.  Merged to psplash master.

Ross

[-- Attachment #2: Type: text/html, Size: 4183 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PSPLASH 0/2] Few fixes for psplash
  2015-11-24 18:39   ` Bystricky, Juro
@ 2015-11-24 20:46     ` Burton, Ross
  0 siblings, 0 replies; 8+ messages in thread
From: Burton, Ross @ 2015-11-24 20:46 UTC (permalink / raw)
  To: Bystricky, Juro; +Cc: yocto, Juro Bystricky

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

On 24 November 2015 at 18:39, Bystricky, Juro <juro.bystricky@intel.com>
wrote:

> Thanks. I’ll mark the bug 7236 as resolved/fixed.
>
>
The recipe needs updating first, just bumping the srcrev will do nicely.

Ross

[-- Attachment #2: Type: text/html, Size: 736 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PSPLASH 1/2] psplash-fb.c: Fix BGR888 detection
  2015-11-24 16:39 ` [PSPLASH 1/2] psplash-fb.c: Fix BGR888 detection Juro Bystricky
@ 2015-11-25 20:12   ` Aws Ismail
  2015-11-25 20:20     ` Burton, Ross
  0 siblings, 1 reply; 8+ messages in thread
From: Aws Ismail @ 2015-11-25 20:12 UTC (permalink / raw)
  To: Juro Bystricky; +Cc: yocto, jurobystricky

:) I have sent the same patch three years ago but no one picked it up...

https://lists.yoctoproject.org/pipermail/yocto/2012-October/009846.html

On Tue, Nov 24, 2015 at 11:39 AM, Juro Bystricky
<juro.bystricky@intel.com> wrote:
> Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
> ---
>  psplash-fb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/psplash-fb.c b/psplash-fb.c
> index bd9cd9d..e71af8f 100644
> --- a/psplash-fb.c
> +++ b/psplash-fb.c
> @@ -185,7 +185,7 @@ psplash_fb_new (int angle)
>           fb->rgbmode = RGB888;
>    } else if (fb->red_offset == 0 && fb->red_length == 8 &&
>        fb->green_offset == 8 && fb->green_length == 8 &&
> -      fb->blue_offset == 8 && fb->blue_length == 8) {
> +      fb->blue_offset == 16 && fb->blue_length == 8) {
>           fb->rgbmode = BGR888;
>    } else {
>           fb->rgbmode = GENERIC;
> --
> 1.9.1
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PSPLASH 1/2] psplash-fb.c: Fix BGR888 detection
  2015-11-25 20:12   ` Aws Ismail
@ 2015-11-25 20:20     ` Burton, Ross
  0 siblings, 0 replies; 8+ messages in thread
From: Burton, Ross @ 2015-11-25 20:20 UTC (permalink / raw)
  To: Aws Ismail; +Cc: yocto, Juro Bystricky

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

On 25 November 2015 at 20:12, Aws Ismail <aws.ismail@gmail.com> wrote:

> :) I have sent the same patch three years ago but no one picked it up...
>
> https://lists.yoctoproject.org/pipermail/yocto/2012-October/009846.html
>

I can only apologise.  At least it's merged now!

Ross

[-- Attachment #2: Type: text/html, Size: 823 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-11-25 20:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-24 16:39 [PSPLASH 0/2] Few fixes for psplash Juro Bystricky
2015-11-24 16:39 ` [PSPLASH 1/2] psplash-fb.c: Fix BGR888 detection Juro Bystricky
2015-11-25 20:12   ` Aws Ismail
2015-11-25 20:20     ` Burton, Ross
2015-11-24 16:39 ` [PSPLASH 2/2] psplash-fb.c: Fix some endian issues Juro Bystricky
2015-11-24 16:57 ` [PSPLASH 0/2] Few fixes for psplash Burton, Ross
2015-11-24 18:39   ` Bystricky, Juro
2015-11-24 20:46     ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.