[Top][All Lists]

[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,
>> +        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;
>> +        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, 
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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]