[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 26/29] vmsvga: Add basic support for display top
From: |
Liran Alon |
Subject: |
Re: [Qemu-devel] [PATCH 26/29] vmsvga: Add basic support for display topology |
Date: |
Sat, 11 Aug 2018 03:00:14 +0300 |
> On 10 Aug 2018, at 12:56, Gerd Hoffmann <address@hidden> wrote:
>
> Hi,
>
>> + case SVGA_REG_DISPLAY_WIDTH:
>> + if ((s->display_id == 0) || (s->display_id == SVGA_ID_INVALID))
>> + ret = s->new_width ? s->new_width : surface_width(surface);
>> + else
>> + ret = 0;
>> + break;
>> + case SVGA_REG_DISPLAY_HEIGHT:
>> + if ((s->display_id == 0) || (s->display_id == SVGA_ID_INVALID))
>> + ret = s->new_height ? s->new_height : surface_height(surface);
>> + else
>> + ret = 0;
>> + break;
>
> What is the purpose of these registers? Hint for the guest about the
> host display size? If so you probably want wire up a callback for
> GraphicHwOps->ui_info. This will be called on display changes (i.e.
> user resizes qemu gtk window). See virtio_gpu_ui_info() for an example.
>
> cheers,
> Gerd
>
These registers are suppose to indicate to guest the display monitor size
(width & height).
When the QEMU console framework timer will run gui_update()->dpy_refresh()->VNC
dpy_refresh()->graphics_hw_update()->VMware-SVGA gfx_update()
Then vmsvga_update_display()->vmsvga_check_size() makes sure that host display
surface is set to have width/height as specified in vmsvga_state_s->{new_width,
new_height}.
Therefore, if new_width have been set, then host display will be changed to the
value set by the guest.
Thus, wiring up GraphicsHwOps->ui_info callback to return new info on
SVGA_REG_DISPLAY_{WIDTH, HEIGHT} registers may be useful only for case that we
want guest to respond to the fact that the host display have been resized.
However, I am not sure there is a mechanism to notify guest from vmware-svga
device that this even has occurred for guest to reread these registers. Both in
Linux vmware-svga driver code and VMware SVGA development kit, the
SVGA_IRQFLAG_* flags don’t indicate such an interrupt source. In addition, it
seems that Linux vmware-svga driver code only reads these registers at
vmw_kms_save_vga() which weirdly enough, seems to be unreachable code (not
called from anywhere…).
Therefore, I’m not sure it is important to do this change at this patch series.
But I am not 100% familiar with the entire QEMU graphics stack so maybe I’m
missing something trivial here.
Regards,
-Liran
- [Qemu-devel] [PATCH 19/29] vmsvga: Handle SVGA_CMD_FENCE command, (continued)
- [Qemu-devel] [PATCH 19/29] vmsvga: Handle SVGA_CMD_FENCE command, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 20/29] vmsvga: Use standard names for params defining hardware cursor image, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 21/29] vmsvga: Use AND mask bpp parameter in SVGA_CMD_DEFINE_CURSOR, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 22/29] vmsvga: Increase size of cursor AND bitmask, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 23/29] vmsvga: Implement initial support for rgb-alpha cursors, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 24/29] vmsvga: Add support for SVGA_FIFO_CAP_CURSOR_BYPASS_3, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 25/29] vmsvga: Add basic support for GMR registers and FIFO commands, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 26/29] vmsvga: Add basic support for display topology, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 27/29] vmsvga: Add support for pitchlock register (a display line stride), Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 28/29] vmsvga: Introduce new function for reporting device capabilities, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 29/29] vmsvga: Don't allow setting screen size with zero width or height, Liran Alon, 2018/08/09
- Re: [Qemu-devel] [PATCH 00/29]: vmsvga: Various fixes and enhancements, Gerd Hoffmann, 2018/08/10
- Re: [Qemu-devel] [PATCH 00/29]: vmsvga: Various fixes and enhancements, Liran Alon, 2018/08/13