User avatar
Ultibo
Posts: 158
Joined: Wed Sep 30, 2015 10:29 am
Location: Australia
Contact: Website

Framebuffer issue with latest firmware

Wed Sep 30, 2015 11:00 am

Wondering if anyone has noticed an issue using the RPi Framebuffer from bare metal with very recent versions of the firmware?

Using code that is known to work on both Pi1 and 2, if I use firmware downloaded this week all I see is a black screen. Debugging via blinking LED shows that all the calls to the mailbox are succeeding but nothing ever shows on screen.

If I take the same kernel7.img and use firmware from Feb or April 2015 then everything works just fine.

Has anyone else come across this?
Ultibo.org | Make something amazing
https://ultibo.org

Threads, multi-core, OpenGL, Camera, FAT, NTFS, TCP/IP, USB and more in 3MB with 2 second boot!

User avatar
Ultibo
Posts: 158
Joined: Wed Sep 30, 2015 10:29 am
Location: Australia
Contact: Website

Re: Framebuffer issue with latest firmware

Fri Oct 02, 2015 6:56 am

Finally figured out what changed, with the most recent firmware the mailbox call returns the address of the framebuffer as a bus address (eg in the 0xC0000000 range) which must be converted to a physical address for the ARM otherwise the writes to the framebuffer seem to go nowhere.

Not sure when this changed but with firmware from Feb or Arpil 2015 the returned address is always in the ARM physical range (0x00000000 to 0x3FFFFFFF).

Something to watch out for.
Ultibo.org | Make something amazing
https://ultibo.org

Threads, multi-core, OpenGL, Camera, FAT, NTFS, TCP/IP, USB and more in 3MB with 2 second boot!

jspeccy
Posts: 19
Joined: Sun Nov 30, 2014 6:25 pm

Re: Framebuffer issue with latest firmware

Sat Oct 03, 2015 4:33 pm

That's true. I've tested the last firmware on a Pi-2 using Circle and the image isn't shown. With firmware from "kernel bump to 4.1.8", SHA-1: 0c2d73d03316420b9e82898c4571205ec537ab82 all works again.

Why this unexpected change?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5370
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Framebuffer issue with latest firmware

Sat Oct 03, 2015 4:41 pm

You should always use bus addresses when communicating with the GPU or using GPU peripherals (like DMA).
On Pi1 you often got away with using the wrong bus/physical addresses, as you were only (GPU) L1 incoherent. On Pi you are (GPU) L1 and L2 incoherent, so are much more likely to fail.

rst
Posts: 413
Joined: Sat Apr 20, 2013 6:42 pm
Location: Germany

Re: Framebuffer issue with latest firmware

Sat Oct 03, 2015 7:14 pm

There will be a a change in the next commit of Circle which ensures that the frame buffer address on both RPi 1 and 2 will be in the right memory range.

But I think this is not the problem here. There was an important change in the last commit of the RPi firmware repo ("kernel: Bump to 4.1.9"). The firmware now enables HYP mode on the RPi 2 on boot. Linux is known to handle this but Circle does not so far.

I'm working on it. But I think there is still an issue with it even with Linux (issue #369). I have to wait until this is sorted out. Please use a firmware from before Oct 2, 2015 for now with Circle with the RPi 2.

rst
Posts: 413
Joined: Sat Apr 20, 2013 6:42 pm
Location: Germany

Re: Framebuffer issue with latest firmware

Sun Oct 04, 2015 7:10 pm

rst wrote:I'm working on it. But I think there is still an issue with it even with Linux (issue #369). I have to wait until this is sorted out. Please use a firmware from before Oct 2, 2015 for now with Circle with the RPi 2.
Done. The latest firmware from today can be used with the latest commit of Circle on both RPi 1 and 2 now.

Return to “Bare metal, Assembly language”