All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Setting RGB
@ 2016-02-04 14:28 Gabriel Andrés Castillo
  2016-02-04 19:55 ` Peter Seiderer
  0 siblings, 1 reply; 12+ messages in thread
From: Gabriel Andrés Castillo @ 2016-02-04 14:28 UTC (permalink / raw)
  To: buildroot

Hi, i have running my board, but the only problem are colors. I don't know
where to configure RGB on buildroot.
The problem is that my blue is red, and the red is blue when i run a qt5
application.
Regards.

--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160204/ae77eff1/attachment.html>

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

* [Buildroot] Setting RGB
  2016-02-04 14:28 [Buildroot] Setting RGB Gabriel Andrés Castillo
@ 2016-02-04 19:55 ` Peter Seiderer
  2016-02-10 17:40   ` GabrielCastillo
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2016-02-04 19:55 UTC (permalink / raw)
  To: buildroot

Hello Gabriel Andr?s Castillo,

On Thu, 4 Feb 2016 11:28:24 -0300, Gabriel Andr?s Castillo <gcastillo@controlnet.com.ar> wrote:

> Hi, i have running my board, but the only problem are colors. I don't know
> where to configure RGB on buildroot.
> The problem is that my blue is red, and the red is blue when i run a qt5
> application.

Not much information about which board, which architecture, which display (vga, hdmi, lvds?),
which buildroot version (and which configuration file)...

Colors only wrong when using qt5 (x11, linuxfb or eglfs?)?
Try qt4, directfb etc...

Regards,
Peter

> Regards.
> 
> --

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

* [Buildroot] Setting RGB
  2016-02-04 19:55 ` Peter Seiderer
@ 2016-02-10 17:40   ` GabrielCastillo
  2016-02-11 14:06     ` Ezequiel Garcia
  0 siblings, 1 reply; 12+ messages in thread
From: GabrielCastillo @ 2016-02-10 17:40 UTC (permalink / raw)
  To: buildroot

I'm using:
- SAMA5D3x
-Atmel
- The Display is a Multiino MI0500PT-7

I don't know if on QT4 works, but i need to make an App on QT5.

I have configure a panel-simple.c with:
 
static const struct drm_display_mode multiinno_mi0500pt_mode = {               
  ????.clock = 30000,                                                            
  ????.hdisplay = 800,                                                           
  ????.hsync_start = 800 + 2,                                                    
  ????.hsync_end = 800 + 2 + 41,                                                 
  ????.htotal = 800 + 2 + 41 + 2,                                                
  ????.vdisplay = 480,                                                           
  ????.vsync_start = 480 + 2,                                                    
  ????.vsync_end = 480 + 2 + 41,                                                 
  ????.vtotal = 480 + 2 + 41 + 2,                                                
  ????.vrefresh = 60,                                                            
  ????.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,                      
  };                                                                             
                                                                                 
  static const struct panel_desc multiinno_mi0500pt = {                          
  ????.modes = &multiinno_mi0500pt_mode,                                         
  ????.num_modes = 1,                                                            
  ????.bpc = 8,                                                                  
  ????.size = {                                                                  
  ????????.width = 108,                                                          
  ????????.height = 65,                                                          
  ????},                                                                         
  ????.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
};

and i change the DTS to include it:

????panel: panel {                                                             
         compatible = "multiinno,mi0500pt", "simple-panel";             
         backlight = <&backlight>;                                      
         power-supply = <&panel_reg>;                                   
         #address-cells = <1>;                                          
         #size-cells = <0>;                                             
         status = "okay";                                               
                                                                              
         port at 0 {                                                       
                reg = <0>;                                             
                #address-cells = <1>;                                  
                #size-cells = <0>;                                     
                                                                             
                panel_input: endpoint at 0 {                              
                        reg = <0>;                                     
                        remote-endpoint = <&hlcdc_panel_output>;       
                 };                                                     
        };                                                             
};   

That is all i do to include the new display.



--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Setting-RGB-tp124903p125494.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

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

* [Buildroot] Setting RGB
  2016-02-11 14:06     ` Ezequiel Garcia
@ 2016-02-11 14:04       ` GabrielCastillo
  2016-02-11 14:46         ` Ezequiel Garcia
  2016-02-11 15:09       ` GabrielCastillo
  1 sibling, 1 reply; 12+ messages in thread
From: GabrielCastillo @ 2016-02-11 14:04 UTC (permalink / raw)
  To: buildroot

As you told me, i run fb-test and i can see the Image that you show. So i
assume that the display is mounted well, and the Filesystem, the kernel
linux, etc, etc is all ok.

So it's rigth to say that the problem is QT5? My App only show a image:
https://i.ytimg.com/vi/bF-yfKaZUy0/hqdefault.jpg
But the fizz color are wrong... 

May i forget to enable some QT5 option on buildroot?



--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Setting-RGB-tp124903p125560.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

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

* [Buildroot] Setting RGB
  2016-02-10 17:40   ` GabrielCastillo
@ 2016-02-11 14:06     ` Ezequiel Garcia
  2016-02-11 14:04       ` GabrielCastillo
  2016-02-11 15:09       ` GabrielCastillo
  0 siblings, 2 replies; 12+ messages in thread
From: Ezequiel Garcia @ 2016-02-11 14:06 UTC (permalink / raw)
  To: buildroot

Hey Gabriel,

On 10 February 2016 at 14:40, GabrielCastillo
<gcastillo@controlnet.com.ar> wrote:
> I'm using:
> - SAMA5D3x
> -Atmel
> - The Display is a Multiino MI0500PT-7
>
> I don't know if on QT4 works, but i need to make an App on QT5.
>

I really don't think this has anything to do with Qt. See below.

> I have configure a panel-simple.c with:
>
> static const struct drm_display_mode multiinno_mi0500pt_mode = {
>   ????.clock = 30000,
>   ????.hdisplay = 800,
>   ????.hsync_start = 800 + 2,
>   ????.hsync_end = 800 + 2 + 41,
>   ????.htotal = 800 + 2 + 41 + 2,
>   ????.vdisplay = 480,
>   ????.vsync_start = 480 + 2,
>   ????.vsync_end = 480 + 2 + 41,
>   ????.vtotal = 480 + 2 + 41 + 2,
>   ????.vrefresh = 60,
>   ????.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
>   };
>
>   static const struct panel_desc multiinno_mi0500pt = {
>   ????.modes = &multiinno_mi0500pt_mode,
>   ????.num_modes = 1,
>   ????.bpc = 8,
>   ????.size = {
>   ????????.width = 108,
>   ????????.height = 65,
>   ????},
>   ????.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
> };
>

So I presume you have a framebuffer device at /dev/fb0. In that case,
you can enable the Buildroot package for the framebuffer tests
(BR2_PACKAGE_FB_TEST_APP) and the run "fb-test".

You should get this:

https://wiki.chiliboard.org/images/7/78/Fb-test.png

See how blue matches blue, red matches red, etc.

Can you do this and let us know?
-- 
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar

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

* [Buildroot] Setting RGB
  2016-02-11 14:04       ` GabrielCastillo
@ 2016-02-11 14:46         ` Ezequiel Garcia
  2016-02-11 14:48           ` Ezequiel Garcia
  0 siblings, 1 reply; 12+ messages in thread
From: Ezequiel Garcia @ 2016-02-11 14:46 UTC (permalink / raw)
  To: buildroot

On 11 February 2016 at 11:04, GabrielCastillo
<gcastillo@controlnet.com.ar> wrote:
> As you told me, i run fb-test and i can see the Image that you show. So i
> assume that the display is mounted well, and the Filesystem, the kernel
> linux, etc, etc is all ok.
>
> So it's rigth to say that the problem is QT5? My App only show a image:
> https://i.ytimg.com/vi/bF-yfKaZUy0/hqdefault.jpg
> But the fizz color are wrong...
>
> May i forget to enable some QT5 option on buildroot?
>

Hm.. that's quite unusual :-) Maybe you can start by drawing colored
rectangles in the Qt app. If the colors look OK, you could blame the
image decoder ?

-- 
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar

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

* [Buildroot] Setting RGB
  2016-02-11 14:46         ` Ezequiel Garcia
@ 2016-02-11 14:48           ` Ezequiel Garcia
  0 siblings, 0 replies; 12+ messages in thread
From: Ezequiel Garcia @ 2016-02-11 14:48 UTC (permalink / raw)
  To: buildroot

On 11 February 2016 at 11:46, Ezequiel Garcia
<ezequiel@vanguardiasur.com.ar> wrote:
> On 11 February 2016 at 11:04, GabrielCastillo
> <gcastillo@controlnet.com.ar> wrote:
>> As you told me, i run fb-test and i can see the Image that you show. So i
>> assume that the display is mounted well, and the Filesystem, the kernel
>> linux, etc, etc is all ok.
>>
>> So it's rigth to say that the problem is QT5? My App only show a image:
>> https://i.ytimg.com/vi/bF-yfKaZUy0/hqdefault.jpg
>> But the fizz color are wrong...
>>
>> May i forget to enable some QT5 option on buildroot?
>>
>
> Hm.. that's quite unusual :-) Maybe you can start by drawing colored
> rectangles in the Qt app. If the colors look OK, you could blame the
> image decoder ?
>

And alternatively you can use BR2_PACKAGE_FBV to show the same image
in the display without Qt, and compare results.

-- 
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar

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

* [Buildroot] Setting RGB
  2016-02-11 14:06     ` Ezequiel Garcia
  2016-02-11 14:04       ` GabrielCastillo
@ 2016-02-11 15:09       ` GabrielCastillo
  2016-02-11 20:52         ` Peter Seiderer
  1 sibling, 1 reply; 12+ messages in thread
From: GabrielCastillo @ 2016-02-11 15:09 UTC (permalink / raw)
  To: buildroot

Definitely the problem is with QT5. I read some places that could be
littleendian problem. To run my app, i do:

> ./App -platform linuxfb

There are any form to tell that it has to be execute in littleendian or
bigendian?



--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Setting-RGB-tp124903p125571.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

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

* [Buildroot] Setting RGB
  2016-02-11 15:09       ` GabrielCastillo
@ 2016-02-11 20:52         ` Peter Seiderer
  2016-04-12 11:45           ` Leonardo Giordano
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2016-02-11 20:52 UTC (permalink / raw)
  To: buildroot

Hello Gabriel Andr?s Castillo,

On Thu, 11 Feb 2016 07:09:50 -0800 (PST), GabrielCastillo <gcastillo@controlnet.com.ar> wrote:

> Definitely the problem is with QT5. I read some places that could be
> littleendian problem. To run my app, i do:
> 
> > ./App -platform linuxfb
> 
> There are any form to tell that it has to be execute in littleendian or
> bigendian?
> 

No, no such option for qt5 (see [1] for linuxfb options).

Mind to run 'fbset -s' (or 'fbset -i') on your platform ?

Output gives the pixel defintion of the framebuffer, e.g.

rgba 5/11,6/5,5/0,0/16

for my adafruit display (and try to test if the given
pixel defintion is correct by writing color patterns
to the framebuffer (direct or with some framebuffer
test program)...

Or mind to try the following atmel qt5 patch ([2]) from
the OpenEmbedded/Yocto layer?

This patch gives you a hint for the place where to fix/adjust the
qt5 drawing to the framebuffer...

Regards,
Peter


[1] http://doc.qt.io/qt-5/embedded-linux.html
[2] https://github.com/linux4sam/meta-atmel/blob/master/qt5-layer/recipes-qt/qt5/files/atmel-color-format-force.patch

> 
> 
> --
> View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Setting-RGB-tp124903p125571.html
> Sent from the Buildroot (busybox) mailing list archive at Nabble.com.
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] Setting RGB
  2016-02-11 20:52         ` Peter Seiderer
@ 2016-04-12 11:45           ` Leonardo Giordano
  2016-04-13 13:35             ` Leonardo Giordano
  0 siblings, 1 reply; 12+ messages in thread
From: Leonardo Giordano @ 2016-04-12 11:45 UTC (permalink / raw)
  To: buildroot

Sorry for delay on replying, we were using as a workaround swapping red and
blue info on the pictures we use.
Yesterday I fixed it based on Peter's reply and this patch:
https://bugreports.qt.io/browse/QTBUG-40527

Thanks for your support!
Regards,
Leonardo

2016-02-11 17:52 GMT-03:00 Peter Seiderer <ps.report@gmx.net>:

> Hello Gabriel Andr?s Castillo,
>
> On Thu, 11 Feb 2016 07:09:50 -0800 (PST), GabrielCastillo <
> gcastillo at controlnet.com.ar> wrote:
>
> > Definitely the problem is with QT5. I read some places that could be
> > littleendian problem. To run my app, i do:
> >
> > > ./App -platform linuxfb
> >
> > There are any form to tell that it has to be execute in littleendian or
> > bigendian?
> >
>
> No, no such option for qt5 (see [1] for linuxfb options).
>
> Mind to run 'fbset -s' (or 'fbset -i') on your platform ?
>
> Output gives the pixel defintion of the framebuffer, e.g.
>
> rgba 5/11,6/5,5/0,0/16
>
> for my adafruit display (and try to test if the given
> pixel defintion is correct by writing color patterns
> to the framebuffer (direct or with some framebuffer
> test program)...
>
> Or mind to try the following atmel qt5 patch ([2]) from
> the OpenEmbedded/Yocto layer?
>
> This patch gives you a hint for the place where to fix/adjust the
> qt5 drawing to the framebuffer...
>
> Regards,
> Peter
>
>
> [1] http://doc.qt.io/qt-5/embedded-linux.html
> [2]
> https://github.com/linux4sam/meta-atmel/blob/master/qt5-layer/recipes-qt/qt5/files/atmel-color-format-force.patch
>
> >
> >
> > --
> > View this message in context:
> http://buildroot-busybox.2317881.n4.nabble.com/Setting-RGB-tp124903p125571.html
> > Sent from the Buildroot (busybox) mailing list archive at Nabble.com.
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160412/c01945e8/attachment.html>

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

* [Buildroot] Setting RGB
  2016-04-12 11:45           ` Leonardo Giordano
@ 2016-04-13 13:35             ` Leonardo Giordano
  2016-04-13 20:54               ` Peter Seiderer
  0 siblings, 1 reply; 12+ messages in thread
From: Leonardo Giordano @ 2016-04-13 13:35 UTC (permalink / raw)
  To: buildroot

I forgot to mention:

At QLinuxFbScreen::initialize() display format is detected as RGB (and it
is true because fbtest shows colors right).
So, I had to swap red and blue structs (struct fb_bitfield), so detection
now says it is BGR. Then at doRedraw() image is inverted when drawing is
issued.

I still don't understand why I should force BGR so Qt drawing can work fine.




2016-04-12 8:45 GMT-03:00 Leonardo Giordano <lgiordano@controlnet.com.ar>:

> Sorry for delay on replying, we were using as a workaround swapping red
> and blue info on the pictures we use.
> Yesterday I fixed it based on Peter's reply and this patch:
> https://bugreports.qt.io/browse/QTBUG-40527
>
> Thanks for your support!
> Regards,
> Leonardo
>
> 2016-02-11 17:52 GMT-03:00 Peter Seiderer <ps.report@gmx.net>:
>
>> Hello Gabriel Andr?s Castillo,
>>
>> On Thu, 11 Feb 2016 07:09:50 -0800 (PST), GabrielCastillo <
>> gcastillo at controlnet.com.ar> wrote:
>>
>> > Definitely the problem is with QT5. I read some places that could be
>> > littleendian problem. To run my app, i do:
>> >
>> > > ./App -platform linuxfb
>> >
>> > There are any form to tell that it has to be execute in littleendian or
>> > bigendian?
>> >
>>
>> No, no such option for qt5 (see [1] for linuxfb options).
>>
>> Mind to run 'fbset -s' (or 'fbset -i') on your platform ?
>>
>> Output gives the pixel defintion of the framebuffer, e.g.
>>
>> rgba 5/11,6/5,5/0,0/16
>>
>> for my adafruit display (and try to test if the given
>> pixel defintion is correct by writing color patterns
>> to the framebuffer (direct or with some framebuffer
>> test program)...
>>
>> Or mind to try the following atmel qt5 patch ([2]) from
>> the OpenEmbedded/Yocto layer?
>>
>> This patch gives you a hint for the place where to fix/adjust the
>> qt5 drawing to the framebuffer...
>>
>> Regards,
>> Peter
>>
>>
>> [1] http://doc.qt.io/qt-5/embedded-linux.html
>> [2]
>> https://github.com/linux4sam/meta-atmel/blob/master/qt5-layer/recipes-qt/qt5/files/atmel-color-format-force.patch
>>
>> >
>> >
>> > --
>> > View this message in context:
>> http://buildroot-busybox.2317881.n4.nabble.com/Setting-RGB-tp124903p125571.html
>> > Sent from the Buildroot (busybox) mailing list archive at Nabble.com.
>> > _______________________________________________
>> > buildroot mailing list
>> > buildroot at busybox.net
>> > http://lists.busybox.net/mailman/listinfo/buildroot
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160413/fba82904/attachment.html>

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

* [Buildroot] Setting RGB
  2016-04-13 13:35             ` Leonardo Giordano
@ 2016-04-13 20:54               ` Peter Seiderer
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Seiderer @ 2016-04-13 20:54 UTC (permalink / raw)
  To: buildroot

Hello Gabriel Castillo,

On Wed, 13 Apr 2016 10:35:48 -0300, Leonardo Giordano <lgiordano@controlnet.com.ar> wrote:

> I forgot to mention:
> 
> At QLinuxFbScreen::initialize() display format is detected as RGB (and it
> is true because fbtest shows colors right).
> So, I had to swap red and blue structs (struct fb_bitfield), so detection
> now says it is BGR. Then at doRedraw() image is inverted when drawing is
> issued.
> 
> I still don't understand why I should force BGR so Qt drawing can work fine.
> 

Hard to say whats going wrong without the hardware to play around with it...,
but first step for remote help would be the requested fbset output
showing the pixel definition...

Regards,
Peter

> 
> 
> 
> 2016-04-12 8:45 GMT-03:00 Leonardo Giordano <lgiordano@controlnet.com.ar>:
> 
> > Sorry for delay on replying, we were using as a workaround swapping red
> > and blue info on the pictures we use.
> > Yesterday I fixed it based on Peter's reply and this patch:
> > https://bugreports.qt.io/browse/QTBUG-40527
> >
> > Thanks for your support!
> > Regards,
> > Leonardo
> >
> > 2016-02-11 17:52 GMT-03:00 Peter Seiderer <ps.report@gmx.net>:
> >
> >> Hello Gabriel Andr?s Castillo,
> >>
> >> On Thu, 11 Feb 2016 07:09:50 -0800 (PST), GabrielCastillo <
> >> gcastillo at controlnet.com.ar> wrote:
> >>
> >> > Definitely the problem is with QT5. I read some places that could be
> >> > littleendian problem. To run my app, i do:
> >> >
> >> > > ./App -platform linuxfb
> >> >
> >> > There are any form to tell that it has to be execute in littleendian or
> >> > bigendian?
> >> >
> >>
> >> No, no such option for qt5 (see [1] for linuxfb options).
> >>
> >> Mind to run 'fbset -s' (or 'fbset -i') on your platform ?
> >>
> >> Output gives the pixel defintion of the framebuffer, e.g.
> >>
> >> rgba 5/11,6/5,5/0,0/16
> >>
> >> for my adafruit display (and try to test if the given
> >> pixel defintion is correct by writing color patterns
> >> to the framebuffer (direct or with some framebuffer
> >> test program)...
> >>
> >> Or mind to try the following atmel qt5 patch ([2]) from
> >> the OpenEmbedded/Yocto layer?
> >>
> >> This patch gives you a hint for the place where to fix/adjust the
> >> qt5 drawing to the framebuffer...
> >>
> >> Regards,
> >> Peter
> >>
> >>
> >> [1] http://doc.qt.io/qt-5/embedded-linux.html
> >> [2]
> >> https://github.com/linux4sam/meta-atmel/blob/master/qt5-layer/recipes-qt/qt5/files/atmel-color-format-force.patch
> >>
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >> http://buildroot-busybox.2317881.n4.nabble.com/Setting-RGB-tp124903p125571.html
> >> > Sent from the Buildroot (busybox) mailing list archive at Nabble.com.
> >> > _______________________________________________
> >> > buildroot mailing list
> >> > buildroot at busybox.net
> >> > http://lists.busybox.net/mailman/listinfo/buildroot
> >>
> >> _______________________________________________
> >> buildroot mailing list
> >> buildroot at busybox.net
> >> http://lists.busybox.net/mailman/listinfo/buildroot
> >>
> >
> >

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

end of thread, other threads:[~2016-04-13 20:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-04 14:28 [Buildroot] Setting RGB Gabriel Andrés Castillo
2016-02-04 19:55 ` Peter Seiderer
2016-02-10 17:40   ` GabrielCastillo
2016-02-11 14:06     ` Ezequiel Garcia
2016-02-11 14:04       ` GabrielCastillo
2016-02-11 14:46         ` Ezequiel Garcia
2016-02-11 14:48           ` Ezequiel Garcia
2016-02-11 15:09       ` GabrielCastillo
2016-02-11 20:52         ` Peter Seiderer
2016-04-12 11:45           ` Leonardo Giordano
2016-04-13 13:35             ` Leonardo Giordano
2016-04-13 20:54               ` Peter Seiderer

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.