RE: [PATCH v4] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host
From: Dexuan Cui <decui@microsoft.com>
Date: 2019-09-16 21:45:46
Also in:
dri-devel, linux-fbdev, lkml
From: linux-hyperv-owner@vger.kernel.org [off-list ref] On Behalf Of Dexuan Cui Sent: Thursday, September 12, 2019 11:39 PM To: Michael Kelley <redacted>; Wei Hu <redacted>; b.zolnierkie@samsung.com; linux-hyperv@vger.kernel.org; dri-devel@lists.freedesktop.org; linux-fbdev@vger.kernel.org; linux-kernel@vger.kernel.org; Stephen Hemminger [off-list ref]; sashal@kernel.org; Haiyang Zhang [off-list ref]; KY Srinivasan [off-list ref] Cc: Iouri Tarassov <redacted> Subject: RE: [PATCH v4] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V hostquoted
From: Michael Kelley <redacted> Sent: Thursday, September 5, 2019 7:06 AM From: Wei Hu <redacted> Sent: Thursday, September 5, 20192:12quoted
AMquoted
Beginning from Windows 10 RS5+, VM screen resolution is obtained fromhost.quoted
The "video=hyperv_fb" boot time option is not needed, but still can be used to overwrite what the host specifies. The VM resolution on the host could be set by executing the powershell "set-vmvideo" command. Signed-off-by: Iouri Tarassov <redacted> Signed-off-by: Wei Hu <redacted> --- v2: - Implemented fallback when version negotiation failed. - Defined full size for supported_resolution array. v3: - Corrected the synthvid major and minor version comparisonproblem.quoted
quoted
v4: - Changed function name to synthvid_ver_ge(). drivers/video/fbdev/hyperv_fb.c | 159+++++++++++++++++++++++++++++---quoted
1 file changed, 147 insertions(+), 12 deletions(-)Reviewed-by: Michael Kelley <redacted>Looks good to me. Reviewed-by: Dexuan Cui <decui@microsoft.com>
Hi Wei, It turns out we need to make a further fix. :-) The patch forgets to take par->update into consideration. When the VM Connection window is closed (or minimized?), the host sends a message to the guest, and the guest sets par->update to false in synthvid_recv_sub(). If par->update is false, the guest doesn't need to call synthvid_update(). Thanks, -- Dexuan