1. 24 8月, 2018 6 次提交
    • P
      hw/display/bcm2835_fb: Fix handling of virtual framebuffer · 01f18af9
      Peter Maydell 提交于
      The raspi framebuffir in bcm2835_fb supports the definition
      of a virtual "viewport", which is smaller than the full
      physical framebuffer size and at an adjustable offset within
      it. Only the viewport area is sent to the screen. This allows
      the guest to do things like double buffering, or scrolling
      by adjusting the viewport origin. Currently QEMU doesn't
      implement this at all.
      
      Add support for this feature:
       * the property mailbox code needs to distinguish the
         virtual width/height from the physical width/height
       * the framebuffer code needs to do something with the
         virtual width/height/origin information
      
      Note that the wiki documentation on the semantics of the
      virtual and physical height and width has it the wrong way
      around -- the virtual size is the size of the allocated
      buffer, and the physical size is the size of the display,
      so the virtual size is always the same as or larger than
      the physical.
      
      If the viewport size is set smaller than the physical
      screen size, we ignore the viewport settings completely
      and just display the physical screen area.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20180814144436.679-7-peter.maydell@linaro.org
      01f18af9
    • P
      hw/display/bcm2835_fb: Abstract out calculation of pitch, size · 9a1f03f4
      Peter Maydell 提交于
      Abstract out the calculation of the pitch and size of the
      framebuffer into functions that operate on the BCM2835FBConfig
      struct -- these are about to get a little more complicated
      when we add support for virtual and physical sizes differing.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20180814144436.679-6-peter.maydell@linaro.org
      9a1f03f4
    • P
      hw/display/bcm2835_fb: Reset resolution, etc correctly · 9e2938a0
      Peter Maydell 提交于
      The bcm2835_fb's initial resolution and other parameters are set
      via QOM properties. We should reset to those initial values on
      device reset, which means we need to save the QOM property
      values somewhere that they are not overwritten by guest
      changes to the framebuffer configuration.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20180814144436.679-5-peter.maydell@linaro.org
      9e2938a0
    • P
      hw/display/bcm2835_fb: Drop unused size and pitch fields · ea662f7c
      Peter Maydell 提交于
      The BCM2835FBState struct has a 'pitch' field which is a
      cached copy of xres * (bpp >> 3), and a 'size' field which is
      a cached copy of pitch * yres. However we don't actually do
      anything with these fields; delete them. We retain the
      now-unused slots in the VMState struct for migration
      compatibility.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20180814144436.679-4-peter.maydell@linaro.org
      ea662f7c
    • P
      hw/misc/bcm2835_property: Track fb settings using BCM2835FBConfig · 193100b5
      Peter Maydell 提交于
      Refactor the fb property setting code so that rather than
      using a set of pointers to local variables to track
      whether a config value has been updated in the current
      mbox and if so what its new value is, we just copy
      all the current settings of the fb at the start, and
      then update that copy as we go along, before asking
      the fb to switch to it at the end.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20180814144436.679-3-peter.maydell@linaro.org
      193100b5
    • P
      hw/misc/bcm2835_fb: Move config fields to their own struct · a02755ec
      Peter Maydell 提交于
      The handling of framebuffer properties in the bcm2835_property code
      is a bit clumsy, because for each of the many fb related properties
      we try to track the value we're about to set and whether we're going
      to be setting a value, and then we hand all the new values off
      to the framebuffer via a function which takes them all as separate
      arguments. It would be simpler if the property code could easily
      copy all the framebuffer's current settings, update them with
      the new specified values and then ask the framebuffer to switch
      to the new set.
      
      As the first part of this refactoring, pull all the fb config
      settings fields in BCM2835FBState out into their own struct.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20180814144436.679-2-peter.maydell@linaro.org
      a02755ec
  2. 02 6月, 2018 1 次提交
  3. 19 5月, 2016 1 次提交
  4. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  5. 17 3月, 2016 1 次提交