1. 27 9月, 2018 4 次提交
    • G
      display/stdvga: add edid support. · d46b40fc
      Gerd Hoffmann 提交于
      This patch adds edid support to the qemu stdvga.  It is turned off by
      default and can be enabled with the new edid property.  The patch also
      adds xres and yres properties to specify the video mode you want the
      guest use.  Works only with edid enabled and updated guest driver.
      
      The mmio bar of the stdvga has some unused address space at the start.
      It was reserved just in case it'll be needed for virtio, but it turned
      out to not be needed for that.  So let's use that region to place the
      EDID data block there.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20180925075646.25114-6-kraxel@redhat.com
      d46b40fc
    • G
      display/edid: add region helper. · 97917e9e
      Gerd Hoffmann 提交于
      Create a io region for an EDID data block.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180925075646.25114-4-kraxel@redhat.com
      97917e9e
    • G
      display/edid: add qemu_edid_size() · e7992fc5
      Gerd Hoffmann 提交于
      Helper function to figure the size of a edid blob, by checking how many
      extensions are present.  Both the base edid blob and the extensions are
      128 bytes in size.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20180925075646.25114-3-kraxel@redhat.com
      e7992fc5
    • G
      display/edid: add edid generator to qemu. · 72d277a7
      Gerd Hoffmann 提交于
      EDID is a metadata format to describe monitors.  On physical hardware
      the monitor has an eeprom with that data block which can be read over
      i2c bus.
      
      On a linux system you can usually find the EDID data block in
      /sys/class/drm/$card/$connector/edid.  xorg ships a edid-decode utility
      which you can use to turn the blob into readable form.
      
      I think it would be a good idea to use EDID for virtual displays too.
      Needs changes in both qemu and guest kms drivers.  This patch is the
      first step, it adds an generator for EDID blobs to qemu.  Comes with a
      qemu-edid test tool included.
      
      With EDID we can pass more information to the guest.  Names and serial
      numbers, so the guests display configuration has no boring "Unknown
      Monitor".  List of video modes.  Display resolution, pretty important
      in case we want add HiDPI support some day.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20180925075646.25114-2-kraxel@redhat.com
      72d277a7
  2. 25 9月, 2018 1 次提交
  3. 03 9月, 2018 2 次提交
  4. 30 8月, 2018 3 次提交
  5. 24 8月, 2018 8 次提交
    • P
      hw/display/bcm2835_fb: Validate bcm2835_fb_mbox_push() config · cfb7ba98
      Peter Maydell 提交于
      Refactor bcm2835_fb_mbox_push() to work by calling
      bcm2835_fb_validate_config() and bcm2835_fb_reconfigure(),
      so that config set this way is also validated.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20180814144436.679-9-peter.maydell@linaro.org
      cfb7ba98
    • P
      hw/display/bcm2835_fb: Validate config settings · f8add62c
      Peter Maydell 提交于
      Validate the config settings that the guest tries to set.
      
      The wiki page documentation is not really accurate here:
      generally rather than failing requests to set bad parameters,
      the hardware will just clip them to something sensible.
      
      Validate the most important parameters: sizes and
      the viewport offsets. This prevents the framebuffer
      code from trying to read out-of-range memory.
      
      In the property handling code, we validate the new parameters every
      time we encounter a tag that sets them. This means we validate the
      config multiple times if the request includes multiple config-setting
      tags, but the code would require significant restructuring to do a
      validation only once but still return the clipped settings for
      get-parameter tags and the buffer allocation tag.
      
      Validation of settings made via the older bcm2835_fb_mbox_push()
      function will be done in the next commit.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20180814144436.679-8-peter.maydell@linaro.org
      f8add62c
    • 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
  6. 23 8月, 2018 1 次提交
    • P
      fix "Missing break in switch" coverity reports · edd7541b
      Paolo Bonzini 提交于
      Many of these are marked as "intentional/fix required" because they
      just need adding a fall through comment.  This is exactly what this
      patch does, except for target/mips/translate.c where it is easier to
      duplicate the code, and hw/audio/sb16.c where I consulted the DOSBox
      sources and decide to just remove the LOG_UNIMP before the fallthrough.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      edd7541b
  7. 21 8月, 2018 3 次提交
  8. 07 8月, 2018 1 次提交
  9. 17 7月, 2018 1 次提交
  10. 16 7月, 2018 2 次提交
  11. 07 7月, 2018 7 次提交
  12. 03 7月, 2018 4 次提交
  13. 02 7月, 2018 3 次提交