Ping for code review? thanks -- PMM
On 14 August 2018 at 15:44, Peter Maydell <[email protected]> wrote: > The raspi framebuffer supports a virtual viewport which can > be set up so that the virtual framebuffer size is larger than > the physical screen size, and the displayed area is at some > offset within this virtual framebuffer area. This patchset > implements that support. > > To do that I had to do a fair amount of refactoring, because > getting the viewport code to work correctly and prevent the > guest from making it fall over by specifying silly offsets > or sizes requires that we properly validate and clip the > config that the guest sends us. > > Note that the documentation in places like > https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface > has various errors in it. The behaviour implemented here > corresponds to how a hardware raspi2 I tested seems to behave, > using test programs based on the code from > http://www.valvers.com/open-software/raspberry-pi/step05-bare-metal-programming-in-c-pt5/ > > (I was a little bit hampered because I couldn't get the rpi > to actually *display* anything to the HDMI port, so mostly > I was testing the edge case behaviour of attempting to set > and read back various config values.) > > This series fixes this bug: > https://bugs.launchpad.net/qemu/+bug/1777672 > > thanks > -- PMM > > Peter Maydell (8): > hw/misc/bcm2835_fb: Move config fields to their own struct > hw/misc/bcm2835_property: Track fb settings using BCM2835FBConfig > hw/display/bcm2835_fb: Drop unused size and pitch fields > hw/display/bcm2835_fb: Reset resolution, etc correctly > hw/display/bcm2835_fb: Abstract out calculation of pitch, size > hw/display/bcm2835_fb: Fix handling of virtual framebuffer > hw/display/bcm2835_fb: Validate config settings > hw/display/bcm2835_fb: Validate bcm2835_fb_mbox_push() config > > include/hw/display/bcm2835_fb.h | 59 +++++++-- > hw/display/bcm2835_fb.c | 218 +++++++++++++++++++------------- > hw/misc/bcm2835_property.c | 123 +++++++++--------- > 3 files changed, 240 insertions(+), 160 deletions(-)
