From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-arm@nongnu.org
Subject: Re: [PATCH 1/2] hw/misc/bcm2835_property: Fix framebuffer with recent RPi kernels
Date: Mon, 18 Oct 2021 11:41:09 +1100 [thread overview]
Message-ID: <4bab811367b2c1e813061d6f1048bbf9b4a2a606.camel@kernel.crashing.org> (raw)
In-Reply-To: <0615f4a3-fba0-bb59-2405-4e1a080f8166@amsat.org>
On Sun, 2021-10-17 at 17:08 +0200, Philippe Mathieu-Daudé wrote:
> Hi Benjamin,
>
> On 10/17/21 09:48, Benjamin Herrenschmidt wrote:
> > The framebuffer driver fails to initialize with recent Raspberry Pi
> > kernels, such as the ones shipped in the current RaspiOS images
> > (with the out of tree bcm2708_fb.c driver)
>
> Which particular version?
The one I dug out of 2021-05-07-raspios-buster-arm64-lite.img (note
that this then fails to boot some time after the fb is setup, even
after the fix, in the vchip driver init (before serial is up even).
That said, the same fb problem happens with 5.10.60-v8+ from raspbian.
I'm not sure your fix will work on these, see below:
> + case 0x00040013: /* Get number of displays */
> + stl_le_phys(&s->dma_as, value + 12, 0 /* old fw: unique display */);
> + resplen = 4;
> + break;
>
This should have been equivalen to not having the property. However,
the failure path in the driver looks like this (note the mismatch
between the comment and the code.. this is rpi 5.10.73 from the rpi
repo :
ret = rpi_firmware_property(fw,
RPI_FIRMWARE_FRAMEBUFFER_GET_NUM_DISPLAYS,
&num_displays, sizeof(u32));
/* If we fail to get the number of displays, or it returns 0, then
* assume old firmware that doesn't have the mailbox call, so just
* set one display
*/
if (ret || num_displays == 0) {
dev_err(&dev->dev,
"Unable to determine number of FBs. Disabling driver.\n");
return -ENOENT;
} else {
fbdev->firmware_supports_multifb = 1;
}
So it appears that the intention at some stage was to set only one display but
the code as written will fail to initialize the drive if the properly is absent
*or* if it returns 0.
I've just checked the rpi-5.15.y branch and it's the same.
Cheers,
Ben.
next prev parent reply other threads:[~2021-10-18 0:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-17 7:48 [PATCH 1/2] hw/misc/bcm2835_property: Fix framebuffer with recent RPi kernels Benjamin Herrenschmidt
2021-10-17 15:08 ` Philippe Mathieu-Daudé
2021-10-18 0:41 ` Benjamin Herrenschmidt [this message]
2021-10-18 9:47 ` Philippe Mathieu-Daudé
2021-10-18 10:27 ` Benjamin Herrenschmidt
2021-10-18 10:41 ` Philippe Mathieu-Daudé
2021-11-18 15:05 ` [PATCH-for-6.2 " Philippe Mathieu-Daudé
2022-01-17 12:13 ` Philippe Mathieu-Daudé via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4bab811367b2c1e813061d6f1048bbf9b4a2a606.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=alex.bennee@linaro.org \
--cc=f4bug@amsat.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).