All of lore.kernel.org
 help / color / mirror / Atom feed
* Wrong BMP colours on i.MX after updating 2018.11 => 2020.10
@ 2021-01-12 16:11 Fuzzey, Martin
  2021-01-12 18:12 ` Fabio Estevam
  0 siblings, 1 reply; 2+ messages in thread
From: Fuzzey, Martin @ 2021-01-12 16:11 UTC (permalink / raw)
  To: u-boot

Hi all,

After updating from u-boot 2018.11 to 2020.10 on an i.MX6 based board
I notice the colours when displaying bitmaps are wrong.
The reason is that, in both cases the framebuffer format (not
necessarily the physical output format) is hardcoded as RGB565 in the
IPU driver but the
bmp command is now assuming RGB55

This is because, in 2018.10 (before DM_VIDEO support for the i.MX
display was available) video_display_bitmap() in
drivers/video/cfb_console.c
was being used which supports both RGB565 and RGB555 depending on the
"gdfIndex" in a global graphics device structure.

Now with DM_VIDEO video_bmp_display() in drivers/video/video_bmp.c is
used instead and that always assumes RGB555 when
displaying a 24 bit BMP on a  16 bit framebuffer.

Of course this is easy to hack around but what is the correct solution?

Maybe we should add a format field to struct video_priv that could be
initialised by the driver like xsize, ysize and bpix already are?

Regards,

Martin

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

* Wrong BMP colours on i.MX after updating 2018.11 => 2020.10
  2021-01-12 16:11 Wrong BMP colours on i.MX after updating 2018.11 => 2020.10 Fuzzey, Martin
@ 2021-01-12 18:12 ` Fabio Estevam
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2021-01-12 18:12 UTC (permalink / raw)
  To: u-boot

Hi Martin,

Thanks for the report. Adding Anatolij.

On Tue, Jan 12, 2021 at 1:11 PM Fuzzey, Martin
<martin.fuzzey@flowbird.group> wrote:
>
> Hi all,
>
> After updating from u-boot 2018.11 to 2020.10 on an i.MX6 based board
> I notice the colours when displaying bitmaps are wrong.
> The reason is that, in both cases the framebuffer format (not
> necessarily the physical output format) is hardcoded as RGB565 in the
> IPU driver but the
> bmp command is now assuming RGB55
>
> This is because, in 2018.10 (before DM_VIDEO support for the i.MX
> display was available) video_display_bitmap() in
> drivers/video/cfb_console.c
> was being used which supports both RGB565 and RGB555 depending on the
> "gdfIndex" in a global graphics device structure.
>
> Now with DM_VIDEO video_bmp_display() in drivers/video/video_bmp.c is
> used instead and that always assumes RGB555 when
> displaying a 24 bit BMP on a  16 bit framebuffer.
>
> Of course this is easy to hack around but what is the correct solution?
>
> Maybe we should add a format field to struct video_priv that could be
> initialised by the driver like xsize, ysize and bpix already are?
>
> Regards,
>
> Martin

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

end of thread, other threads:[~2021-01-12 18:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 16:11 Wrong BMP colours on i.MX after updating 2018.11 => 2020.10 Fuzzey, Martin
2021-01-12 18:12 ` Fabio Estevam

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.