Hi Ivan,

Am 18.12.23 um 22:03 schrieb Ivan T. Ivanov:
brcm,bcm2708-fb device provided by firmware on RPi5 uses
16 bits per pixel. Update driver to properly handle this.

Signed-off-by: Ivan T. Ivanov <iiva...@suse.de>
---
  drivers/video/bcm2835.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
index 14942526f1..245c958b6e 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -43,7 +43,7 @@ static int bcm2835_video_probe(struct udevice *dev)

        uc_priv->xsize = w;
        uc_priv->ysize = h;
-       uc_priv->bpix = VIDEO_BPP32;
+       uc_priv->bpix = dev_get_driver_data(dev);
        plat->base = fb_base;
        plat->size = fb_size;

@@ -51,11 +51,11 @@ static int bcm2835_video_probe(struct udevice *dev)
  }

  static const struct udevice_id bcm2835_video_ids[] = {
-       { .compatible = "brcm,bcm2835-hdmi" },
-       { .compatible = "brcm,bcm2711-hdmi0" },
-       { .compatible = "brcm,bcm2708-fb" },
+       { .compatible = "brcm,bcm2835-hdmi",  .data = VIDEO_BPP32},
+       { .compatible = "brcm,bcm2711-hdmi0", .data = VIDEO_BPP32},
+       { .compatible = "brcm,bcm2708-fb",    .data = VIDEO_BPP16 },
this change looks wrong to me. Before we used VIDEO_BPP32 for
brcm,bcm2708-fb. I think it's hard to explain why we should downgrade
the other boards. I would expect some brcm,bcm2712 compatible at least
this needs an explanation in the commit message.
  #if !IS_ENABLED(CONFIG_VIDEO_DT_SIMPLEFB)
-       { .compatible = "simple-framebuffer" },
+       { .compatible = "simple-framebuffer", .data = VIDEO_BPP32},
  #endif
        { }
  };

Reply via email to