* [U-Boot] [PATCH] video: arm: rpi: Avoid crash without HDMI monitor connected
@ 2019-07-26 12:54 Andre Przywara
[not found] ` <66aa6069-8c20-7ad1-2dc5-80cf044017bc@suse.com>
2019-07-29 10:31 ` Anatolij Gustschin
0 siblings, 2 replies; 3+ messages in thread
From: Andre Przywara @ 2019-07-26 12:54 UTC (permalink / raw)
To: u-boot
Before we use random pointers that bcm2835_set_video_params() is
supposed to populate, we should check its return value, which could
indicate that the function bailed out early. This happend when there
is no monitor connected.
That fixes a horrible crash when just booting with a serial console.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
Hi,
I saw this on the RPi4 (with Andrei's v2 series), but it looks like this
would happen on the other boards as well.
Cheers,
Andre.
drivers/video/bcm2835.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
index bc41090aed..4188a94cba 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -26,6 +26,8 @@ static int bcm2835_video_probe(struct udevice *dev)
ret = bcm2835_set_video_params(&w, &h, 32, BCM2835_MBOX_PIXEL_ORDER_RGB,
BCM2835_MBOX_ALPHA_MODE_IGNORED,
&fb_base, &fb_size, &pitch);
+ if (ret)
+ return ret;
debug("bcm2835: Final resolution is %d x %d\n", w, h);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] video: arm: rpi: Avoid crash without HDMI monitor connected
[not found] ` <66aa6069-8c20-7ad1-2dc5-80cf044017bc@suse.com>
@ 2019-07-26 14:05 ` Andre Przywara
0 siblings, 0 replies; 3+ messages in thread
From: Andre Przywara @ 2019-07-26 14:05 UTC (permalink / raw)
To: u-boot
On Fri, 26 Jul 2019 13:35:26 +0000
Matthias Brugger <mbrugger@suse.com> wrote:
> On 26/07/2019 14:54, Andre Przywara wrote:
> > Before we use random pointers that bcm2835_set_video_params() is
> > supposed to populate, we should check its return value, which could
> > indicate that the function bailed out early. This happend when there
> > is no monitor connected.
> >
> > That fixes a horrible crash when just booting with a serial console.
>
> Can you test this patch?
> https://patchwork.ozlabs.org/patch/1130837/
>
> It should fix your issue.
Yes, of course it does. Sorry that I missed that email, just replied to
that as well.
> By the way which version of the FW do you use?
Some older one, I guess. I downloaded some image on the day the board was announced.
Btw: I run this with ATF as armstub8.bin, which gives me PSCI, errata fixes and the ability to tweak the DT:
https://github.com/Andre-ARM/arm-trusted-firmware/commits/rpi4
That works with the kernel or U-Boot as kernel8.img.
The upstreaming discussion is happening on the official Gerrit (yikes!) server:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/1629
Cheers,
Andre
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > ---
> > Hi,
> >
> > I saw this on the RPi4 (with Andrei's v2 series), but it looks like this
> > would happen on the other boards as well.
> >
> > Cheers,
> > Andre.
> >
> > drivers/video/bcm2835.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
> > index bc41090aed..4188a94cba 100644
> > --- a/drivers/video/bcm2835.c
> > +++ b/drivers/video/bcm2835.c
> > @@ -26,6 +26,8 @@ static int bcm2835_video_probe(struct udevice *dev)
> > ret = bcm2835_set_video_params(&w, &h, 32, BCM2835_MBOX_PIXEL_ORDER_RGB,
> > BCM2835_MBOX_ALPHA_MODE_IGNORED,
> > &fb_base, &fb_size, &pitch);
> > + if (ret)
> > + return ret;
> >
> > debug("bcm2835: Final resolution is %d x %d\n", w, h);
> >
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] video: arm: rpi: Avoid crash without HDMI monitor connected
2019-07-26 12:54 [U-Boot] [PATCH] video: arm: rpi: Avoid crash without HDMI monitor connected Andre Przywara
[not found] ` <66aa6069-8c20-7ad1-2dc5-80cf044017bc@suse.com>
@ 2019-07-29 10:31 ` Anatolij Gustschin
1 sibling, 0 replies; 3+ messages in thread
From: Anatolij Gustschin @ 2019-07-29 10:31 UTC (permalink / raw)
To: u-boot
On Fri, 26 Jul 2019 13:54:30 +0100
Andre Przywara andre.przywara at arm.com wrote:
...
> I saw this on the RPi4 (with Andrei's v2 series), but it looks like this
> would happen on the other boards as well.
Thanks, but I've applied [1] instead of this patch.
[1] http://patchwork.ozlabs.org/patch/1130837
--
Anatolij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-29 10:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26 12:54 [U-Boot] [PATCH] video: arm: rpi: Avoid crash without HDMI monitor connected Andre Przywara
[not found] ` <66aa6069-8c20-7ad1-2dc5-80cf044017bc@suse.com>
2019-07-26 14:05 ` Andre Przywara
2019-07-29 10:31 ` Anatolij Gustschin
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.