mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [For master PATCH 1/1] grapric_utils: set_pixel only write 16bit in 16bit mode
@ 2013-02-19  9:24 Jean-Christophe PLAGNIOL-VILLARD
  2013-02-21 13:56 ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-02-19  9:24 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 lib/gui/graphic_utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c
index 95687df..a1be5d0 100644
--- a/lib/gui/graphic_utils.c
+++ b/lib/gui/graphic_utils.c
@@ -104,7 +104,7 @@ void set_pixel(struct fb_info *info, void *adr, u32 px)
 	case 8:
 		break;
 	case 16:
-		*(u16 *)adr = px;
+		*(u16 *)adr = px & 0xffff;
 		break;
 	case 32:
 		*(u32 *)adr = px;
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [For master PATCH 1/1] grapric_utils: set_pixel only write 16bit in 16bit mode
  2013-02-19  9:24 [For master PATCH 1/1] grapric_utils: set_pixel only write 16bit in 16bit mode Jean-Christophe PLAGNIOL-VILLARD
@ 2013-02-21 13:56 ` Sascha Hauer
  2013-02-21 14:01   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2013-02-21 13:56 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Tue, Feb 19, 2013 at 10:24:14AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  lib/gui/graphic_utils.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c
> index 95687df..a1be5d0 100644
> --- a/lib/gui/graphic_utils.c
> +++ b/lib/gui/graphic_utils.c
> @@ -104,7 +104,7 @@ void set_pixel(struct fb_info *info, void *adr, u32 px)
>  	case 8:
>  		break;
>  	case 16:
> -		*(u16 *)adr = px;
> +		*(u16 *)adr = px & 0xffff;

What does this fix? The result should be the same.

Sascha

>  		break;
>  	case 32:
>  		*(u32 *)adr = px;
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [For master PATCH 1/1] grapric_utils: set_pixel only write 16bit in 16bit mode
  2013-02-21 13:56 ` Sascha Hauer
@ 2013-02-21 14:01   ` Jean-Christophe PLAGNIOL-VILLARD
  2013-02-21 14:08     ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-02-21 14:01 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 14:56 Thu 21 Feb     , Sascha Hauer wrote:
> On Tue, Feb 19, 2013 at 10:24:14AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > ---
> >  lib/gui/graphic_utils.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c
> > index 95687df..a1be5d0 100644
> > --- a/lib/gui/graphic_utils.c
> > +++ b/lib/gui/graphic_utils.c
> > @@ -104,7 +104,7 @@ void set_pixel(struct fb_info *info, void *adr, u32 px)
> >  	case 8:
> >  		break;
> >  	case 16:
> > -		*(u16 *)adr = px;
> > +		*(u16 *)adr = px & 0xffff;
> 
> What does this fix? The result should be the same.
not on qemu

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [For master PATCH 1/1] grapric_utils: set_pixel only write 16bit in 16bit mode
  2013-02-21 14:01   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2013-02-21 14:08     ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2013-02-21 14:08 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Thu, Feb 21, 2013 at 03:01:42PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 14:56 Thu 21 Feb     , Sascha Hauer wrote:
> > On Tue, Feb 19, 2013 at 10:24:14AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > > ---
> > >  lib/gui/graphic_utils.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c
> > > index 95687df..a1be5d0 100644
> > > --- a/lib/gui/graphic_utils.c
> > > +++ b/lib/gui/graphic_utils.c
> > > @@ -104,7 +104,7 @@ void set_pixel(struct fb_info *info, void *adr, u32 px)
> > >  	case 8:
> > >  		break;
> > >  	case 16:
> > > -		*(u16 *)adr = px;
> > > +		*(u16 *)adr = px & 0xffff;
> > 
> > What does this fix? The result should be the same.
> not on qemu

Isn't this a bug in qemu?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2013-02-21 14:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-19  9:24 [For master PATCH 1/1] grapric_utils: set_pixel only write 16bit in 16bit mode Jean-Christophe PLAGNIOL-VILLARD
2013-02-21 13:56 ` Sascha Hauer
2013-02-21 14:01   ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-21 14:08     ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox