* [PATCH v4] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host
@ 2019-09-05 9:11 Wei Hu
2019-09-05 14:05 ` Michael Kelley
0 siblings, 1 reply; 6+ messages in thread
From: Wei Hu @ 2019-09-05 9:11 UTC (permalink / raw)
To: Michael Kelley, 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, sashal@kernel.org, Haiyang Zhang,
KY Srinivasan, Dexuan Cui
Cc: Wei Hu, Iouri Tarassov
Beginning from Windows 10 RS5+, VM screen resolution is obtained from host.
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 <iourit@microsoft.com>
Signed-off-by: Wei Hu <weh@microsoft.com>
---
v2:
- Implemented fallback when version negotiation failed.
- Defined full size for supported_resolution array.
v3:
- Corrected the synthvid major and minor version comparison problem.
v4:
- Changed function name to synthvid_ver_ge().
drivers/video/fbdev/hyperv_fb.c | 159 +++++++++++++++++++++++++++++---
1 file changed, 147 insertions(+), 12 deletions(-)
diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c
index 00f5bdcc6c6f..fe319fc39bec 100644
--- a/drivers/video/fbdev/hyperv_fb.c
+++ b/drivers/video/fbdev/hyperv_fb.c
@@ -23,6 +23,14 @@
*
* Portrait orientation is also supported:
* For example: video=hyperv_fb:864x1152
+ *
+ * When a Windows 10 RS5+ host is used, the virtual machine screen
+ * resolution is obtained from the host. The "video=hyperv_fb" 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. For example
+ * set-vmvideo -vmname name -horizontalresolution:1920 \
+ * -verticalresolution:1200 -resolutiontype single
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -44,6 +52,10 @@
#define SYNTHVID_VERSION(major, minor) ((minor) << 16 | (major))
#define SYNTHVID_VERSION_WIN7 SYNTHVID_VERSION(3, 0)
#define SYNTHVID_VERSION_WIN8 SYNTHVID_VERSION(3, 2)
+#define SYNTHVID_VERSION_WIN10 SYNTHVID_VERSION(3, 5)
+
+#define SYNTHVID_VER_GET_MAJOR(ver) (ver & 0x0000ffff)
+#define SYNTHVID_VER_GET_MINOR(ver) ((ver & 0xffff0000) >> 16)
#define SYNTHVID_DEPTH_WIN7 16
#define SYNTHVID_DEPTH_WIN8 32
@@ -82,16 +94,25 @@ enum synthvid_msg_type {
SYNTHVID_POINTER_SHAPE = 8,
SYNTHVID_FEATURE_CHANGE = 9,
SYNTHVID_DIRT = 10,
+ SYNTHVID_RESOLUTION_REQUEST = 13,
+ SYNTHVID_RESOLUTION_RESPONSE = 14,
- SYNTHVID_MAX = 11
+ SYNTHVID_MAX = 15
};
+#define SYNTHVID_EDID_BLOCK_SIZE 128
+#define SYNTHVID_MAX_RESOLUTION_COUNT 64
+
+struct hvd_screen_info {
+ u16 width;
+ u16 height;
+} __packed;
+
struct synthvid_msg_hdr {
u32 type;
u32 size; /* size of this header + payload after this field*/
} __packed;
-
struct synthvid_version_req {
u32 version;
} __packed;
@@ -102,6 +123,19 @@ struct synthvid_version_resp {
u8 max_video_outputs;
} __packed;
+struct synthvid_supported_resolution_req {
+ u8 maximum_resolution_count;
+} __packed;
+
+struct synthvid_supported_resolution_resp {
+ u8 edid_block[SYNTHVID_EDID_BLOCK_SIZE];
+ u8 resolution_count;
+ u8 default_resolution_index;
+ u8 is_standard;
+ struct hvd_screen_info
+ supported_resolution[SYNTHVID_MAX_RESOLUTION_COUNT];
+} __packed;
+
struct synthvid_vram_location {
u64 user_ctx;
u8 is_vram_gpa_specified;
@@ -187,6 +221,8 @@ struct synthvid_msg {
struct synthvid_pointer_shape ptr_shape;
struct synthvid_feature_change feature_chg;
struct synthvid_dirt dirt;
+ struct synthvid_supported_resolution_req resolution_req;
+ struct synthvid_supported_resolution_resp resolution_resp;
};
} __packed;
@@ -224,6 +260,8 @@ struct hvfb_par {
static uint screen_width = HVFB_WIDTH;
static uint screen_height = HVFB_HEIGHT;
+static uint screen_width_max = HVFB_WIDTH;
+static uint screen_height_max = HVFB_HEIGHT;
static uint screen_depth;
static uint screen_fb_size;
@@ -354,6 +392,7 @@ static void synthvid_recv_sub(struct hv_device *hdev)
/* Complete the wait event */
if (msg->vid_hdr.type == SYNTHVID_VERSION_RESPONSE ||
+ msg->vid_hdr.type == SYNTHVID_RESOLUTION_RESPONSE ||
msg->vid_hdr.type == SYNTHVID_VRAM_LOCATION_ACK) {
memcpy(par->init_buf, msg, MAX_VMBUS_PKT_SIZE);
complete(&par->wait);
@@ -400,6 +439,17 @@ static void synthvid_receive(void *ctx)
} while (bytes_recvd > 0 && ret == 0);
}
+/* Check if the ver1 version is equal or greater than ver2 */
+static inline bool synthvid_ver_ge(u32 ver1, u32 ver2)
+{
+ if (SYNTHVID_VER_GET_MAJOR(ver1) > SYNTHVID_VER_GET_MAJOR(ver2) ||
+ (SYNTHVID_VER_GET_MAJOR(ver1) == SYNTHVID_VER_GET_MAJOR(ver2) &&
+ SYNTHVID_VER_GET_MINOR(ver1) >= SYNTHVID_VER_GET_MINOR(ver2)))
+ return true;
+
+ return false;
+}
+
/* Check synthetic video protocol version with the host */
static int synthvid_negotiate_ver(struct hv_device *hdev, u32 ver)
{
@@ -428,6 +478,64 @@ static int synthvid_negotiate_ver(struct hv_device *hdev, u32 ver)
}
par->synthvid_version = ver;
+ pr_info("Synthvid Version major %d, minor %d\n",
+ SYNTHVID_VER_GET_MAJOR(ver), SYNTHVID_VER_GET_MINOR(ver));
+
+out:
+ return ret;
+}
+
+/* Get current resolution from the host */
+static int synthvid_get_supported_resolution(struct hv_device *hdev)
+{
+ struct fb_info *info = hv_get_drvdata(hdev);
+ struct hvfb_par *par = info->par;
+ struct synthvid_msg *msg = (struct synthvid_msg *)par->init_buf;
+ int ret = 0;
+ unsigned long t;
+ u8 index;
+ int i;
+
+ memset(msg, 0, sizeof(struct synthvid_msg));
+ msg->vid_hdr.type = SYNTHVID_RESOLUTION_REQUEST;
+ msg->vid_hdr.size = sizeof(struct synthvid_msg_hdr) +
+ sizeof(struct synthvid_supported_resolution_req);
+
+ msg->resolution_req.maximum_resolution_count =
+ SYNTHVID_MAX_RESOLUTION_COUNT;
+ synthvid_send(hdev, msg);
+
+ t = wait_for_completion_timeout(&par->wait, VSP_TIMEOUT);
+ if (!t) {
+ pr_err("Time out on waiting resolution response\n");
+ ret = -ETIMEDOUT;
+ goto out;
+ }
+
+ if (msg->resolution_resp.resolution_count == 0) {
+ pr_err("No supported resolutions\n");
+ ret = -ENODEV;
+ goto out;
+ }
+
+ index = msg->resolution_resp.default_resolution_index;
+ if (index >= msg->resolution_resp.resolution_count) {
+ pr_err("Invalid resolution index: %d\n", index);
+ ret = -ENODEV;
+ goto out;
+ }
+
+ for (i = 0; i < msg->resolution_resp.resolution_count; i++) {
+ screen_width_max = max_t(unsigned int, screen_width_max,
+ msg->resolution_resp.supported_resolution[i].width);
+ screen_height_max = max_t(unsigned int, screen_height_max,
+ msg->resolution_resp.supported_resolution[i].height);
+ }
+
+ screen_width =
+ msg->resolution_resp.supported_resolution[index].width;
+ screen_height =
+ msg->resolution_resp.supported_resolution[index].height;
out:
return ret;
@@ -448,11 +556,27 @@ static int synthvid_connect_vsp(struct hv_device *hdev)
}
/* Negotiate the protocol version with host */
- if (vmbus_proto_version == VERSION_WS2008 ||
- vmbus_proto_version == VERSION_WIN7)
- ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN7);
- else
+ switch (vmbus_proto_version) {
+ case VERSION_WIN10:
+ case VERSION_WIN10_V5:
+ ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN10);
+ if (!ret)
+ break;
+ /* Fallthrough */
+ case VERSION_WIN8:
+ case VERSION_WIN8_1:
ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN8);
+ if (!ret)
+ break;
+ /* Fallthrough */
+ case VERSION_WS2008:
+ case VERSION_WIN7:
+ ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN7);
+ break;
+ default:
+ ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN10);
+ break;
+ }
if (ret) {
pr_err("Synthetic video device version not accepted\n");
@@ -464,6 +588,12 @@ static int synthvid_connect_vsp(struct hv_device *hdev)
else
screen_depth = SYNTHVID_DEPTH_WIN8;
+ if (synthvid_ver_ge(par->synthvid_version, SYNTHVID_VERSION_WIN10)) {
+ ret = synthvid_get_supported_resolution(hdev);
+ if (ret)
+ pr_info("Failed to get supported resolution from host, use default\n");
+ }
+
screen_fb_size = hdev->channel->offermsg.offer.
mmio_megabytes * 1024 * 1024;
@@ -653,6 +783,8 @@ static void hvfb_get_option(struct fb_info *info)
}
if (x < HVFB_WIDTH_MIN || y < HVFB_HEIGHT_MIN ||
+ (synthvid_ver_ge(par->synthvid_version, SYNTHVID_VERSION_WIN10) &&
+ (x > screen_width_max || y > screen_height_max)) ||
(par->synthvid_version == SYNTHVID_VERSION_WIN8 &&
x * y * screen_depth / 8 > SYNTHVID_FB_SIZE_WIN8) ||
(par->synthvid_version == SYNTHVID_VERSION_WIN7 &&
@@ -689,8 +821,12 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info)
}
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM) ||
- pci_resource_len(pdev, 0) < screen_fb_size)
+ pci_resource_len(pdev, 0) < screen_fb_size) {
+ pr_err("Resource not available or (0x%lx < 0x%lx)\n",
+ (unsigned long) pci_resource_len(pdev, 0),
+ (unsigned long) screen_fb_size);
goto err1;
+ }
pot_end = pci_resource_end(pdev, 0);
pot_start = pot_end - screen_fb_size + 1;
@@ -781,17 +917,16 @@ static int hvfb_probe(struct hv_device *hdev,
goto error1;
}
+ hvfb_get_option(info);
+ pr_info("Screen resolution: %dx%d, Color depth: %d\n",
+ screen_width, screen_height, screen_depth);
+
ret = hvfb_getmem(hdev, info);
if (ret) {
pr_err("No memory for framebuffer\n");
goto error2;
}
- hvfb_get_option(info);
- pr_info("Screen resolution: %dx%d, Color depth: %d\n",
- screen_width, screen_height, screen_depth);
-
-
/* Set up fb_info */
info->flags = FBINFO_DEFAULT;
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* RE: [PATCH v4] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host
2019-09-05 9:11 [PATCH v4] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host Wei Hu
@ 2019-09-05 14:05 ` Michael Kelley
2019-09-13 6:38 ` Dexuan Cui
0 siblings, 1 reply; 6+ messages in thread
From: Michael Kelley @ 2019-09-05 14:05 UTC (permalink / raw)
To: Wei Hu, 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,
sashal@kernel.org, Haiyang Zhang, KY Srinivasan, Dexuan Cui
Cc: Iouri Tarassov
From: Wei Hu <weh@microsoft.com> Sent: Thursday, September 5, 2019 2:12 AM
>
> Beginning from Windows 10 RS5+, VM screen resolution is obtained from host.
> 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 <iourit@microsoft.com>
> Signed-off-by: Wei Hu <weh@microsoft.com>
> ---
> v2:
> - Implemented fallback when version negotiation failed.
> - Defined full size for supported_resolution array.
>
> v3:
> - Corrected the synthvid major and minor version comparison problem.
>
> v4:
> - Changed function name to synthvid_ver_ge().
>
> drivers/video/fbdev/hyperv_fb.c | 159 +++++++++++++++++++++++++++++---
> 1 file changed, 147 insertions(+), 12 deletions(-)
>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v4] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host
2019-09-05 14:05 ` Michael Kelley
@ 2019-09-13 6:38 ` Dexuan Cui
2019-09-16 21:45 ` Dexuan Cui
2019-10-02 12:38 ` Sasha Levin
0 siblings, 2 replies; 6+ messages in thread
From: Dexuan Cui @ 2019-09-13 6:38 UTC (permalink / raw)
To: Michael Kelley, Wei Hu, 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, sashal@kernel.org, Haiyang Zhang,
KY Srinivasan
Cc: Iouri Tarassov
> From: Michael Kelley <mikelley@microsoft.com>
> Sent: Thursday, September 5, 2019 7:06 AM
>
> From: Wei Hu <weh@microsoft.com> Sent: Thursday, September 5, 2019 2:12
> AM
> >
> > Beginning from Windows 10 RS5+, VM screen resolution is obtained from
> host.
> > 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 <iourit@microsoft.com>
> > Signed-off-by: Wei Hu <weh@microsoft.com>
> > ---
> > v2:
> > - Implemented fallback when version negotiation failed.
> > - Defined full size for supported_resolution array.
> >
> > v3:
> > - Corrected the synthvid major and minor version comparison problem.
> >
> > v4:
> > - Changed function name to synthvid_ver_ge().
> >
> > drivers/video/fbdev/hyperv_fb.c | 159
> +++++++++++++++++++++++++++++---
> > 1 file changed, 147 insertions(+), 12 deletions(-)
> >
>
> Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Looks good to me.
Reviewed-by: Dexuan Cui <decui@microsoft.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v4] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host
2019-09-13 6:38 ` Dexuan Cui
@ 2019-09-16 21:45 ` Dexuan Cui
2019-09-16 21:48 ` Dexuan Cui
2019-10-02 12:38 ` Sasha Levin
1 sibling, 1 reply; 6+ messages in thread
From: Dexuan Cui @ 2019-09-16 21:45 UTC (permalink / raw)
To: Michael Kelley, Wei Hu, 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, sashal@kernel.org, Haiyang Zhang,
KY Srinivasan
Cc: Iouri Tarassov
PiBGcm9tOiBsaW51eC1oeXBlcnYtb3duZXJAdmdlci5rZXJuZWwub3JnDQo+IDxsaW51eC1oeXBl
cnYtb3duZXJAdmdlci5rZXJuZWwub3JnPiBPbiBCZWhhbGYgT2YgRGV4dWFuIEN1aQ0KPiBTZW50
OiBUaHVyc2RheSwgU2VwdGVtYmVyIDEyLCAyMDE5IDExOjM5IFBNDQo+IFRvOiBNaWNoYWVsIEtl
bGxleSA8bWlrZWxsZXlAbWljcm9zb2Z0LmNvbT47IFdlaSBIdSA8d2VoQG1pY3Jvc29mdC5jb20+
Ow0KPiBiLnpvbG5pZXJraWVAc2Ftc3VuZy5jb207IGxpbnV4LWh5cGVydkB2Z2VyLmtlcm5lbC5v
cmc7DQo+IGRyaS1kZXZlbEBsaXN0cy5mcmVlZGVza3RvcC5vcmc7IGxpbnV4LWZiZGV2QHZnZXIu
a2VybmVsLm9yZzsNCj4gbGludXgta2VybmVsQHZnZXIua2VybmVsLm9yZzsgU3RlcGhlbiBIZW1t
aW5nZXINCj4gPHN0aGVtbWluQG1pY3Jvc29mdC5jb20+OyBzYXNoYWxAa2VybmVsLm9yZzsgSGFp
eWFuZyBaaGFuZw0KPiA8aGFpeWFuZ3pAbWljcm9zb2Z0LmNvbT47IEtZIFNyaW5pdmFzYW4gPGt5
c0BtaWNyb3NvZnQuY29tPg0KPiBDYzogSW91cmkgVGFyYXNzb3YgPGlvdXJpdEBtaWNyb3NvZnQu
Y29tPg0KPiBTdWJqZWN0OiBSRTogW1BBVENIIHY0XSB2aWRlbzogaHlwZXJ2OiBoeXBlcnZfZmI6
IE9idGFpbi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kYXRlIHRvIGZhbHNlIGluIHN5bnRodmlkX3Jl
Y3Zfc3ViKCkuDQoNCklmIHBhci0+dXBkYXRlIGlzIGZhbHNlLCB0aGUgZ3Vlc3QgZG9lc24ndCBu
ZWVkIHRvIGNhbGwNCnN5bnRodmlkX3VwZGF0ZSgpLg0KDQpUaGFua3MsDQotLSBEZXh1YW4NCg=
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v4] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host
2019-09-16 21:45 ` Dexuan Cui
@ 2019-09-16 21:48 ` Dexuan Cui
0 siblings, 0 replies; 6+ messages in thread
From: Dexuan Cui @ 2019-09-16 21:48 UTC (permalink / raw)
To: Michael Kelley, Wei Hu, 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, sashal@kernel.org, Haiyang Zhang,
KY Srinivasan
Cc: Iouri Tarassov
PiBGcm9tOiBEZXh1YW4gQ3VpDQo+IFNlbnQ6IE1vbmRheSwgU2VwdGVtYmVyIDE2LCAyMDE5IDI6
NDYgUE0NCj4gVG86IE1pY2hhZWwgS2VsbGV5IDxtaWtlbGxleUBtaWNyb3NvZnQuY29tPjsgV2Vp
IEh1IDx3ZWhAbWljcm9zb2Z0LmNvbT47DQo+IGIuem9sbmllcmtpZUBzYW1zdW5nLmNvbTsgbGlu
dXgtaHlwZXJ2QHZnZXIua2VybmVsLm9yZzsNCj4gZHJpLWRldmVsQGxpc3RzLmZyZWVkZXNrdG9w
Lm9yZzsgbGludXgtZmJkZXZAdmdlci5rZXJuZWwub3JnOw0KPiBsaW51eC1rZXJuZWxAdmdlci5r
ZXJuZWwub3JnOyBTdGVwaGVuIEhlbW1pbmdlcg0KPiA8c3RoZW1taW5AbWljcm9zb2Z0LmNvbT47
IHNhc2hhbEBrZXJuZWwub3JnOyBIYWl5YW5nIFpoYW5nDQo+IDxoY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2V0cyB0byB0YWtlIHBh
ci0+dXBkYXRlIGludG8gY29uc2lkZXJhdGlvbi4NCj4gDQo+IFdoZW4gdGhlIFZNIENvbm5lY3Rp
b24gd2luZG93IGlzIGNsb3NlZCAob3IgbWluaW1pemVkPyksDQo+IHRoZSBob3N0IHNlbmRzIGEg
bWVzc2FnZSB0byB0aGUgZ3Vlc3QsIGFuZCB0aGUgZ3Vlc3Qgc2V0cw0KPiBwYXItPnVwZGF0ZSB0
byBmYWxzZSBpbiBzeW50aHZpZF9yZWN2X3N1YigpLg0KPiANCj4gSWYgcGFyLT51cGRhdGUgaXMg
ZmFsc2UsIHRoZSBndWVzdCBkb2Vzbid0IG5lZWQgdG8gY2FsbA0KPiBzeW50aHZpZF91cGRhdGUo
KS4NCj4gDQo+IFRoYW5rcywNCj4gLS0gRGV4dWFuDQoNClBsZWFzZSBpZ25vcmUgdGhlIGxhc3Qg
cmVwbHkgZnJvbSBtZS4gDQoNCkl0IHdhcyBtZWFudCB0byByZXBseSBhbm90aGVyIG1haWw6DQpS
RTogW1BBVENIIHY1XSB2aWRlbzogaHlwZXJ2OiBoeXBlcnZfZmI6IFN1cHBvcnQgZGVmZXJyZWQg
SU8gZm9yIEh5cGVyLVYgZnJhbWUgYnVmZmVyIGRyaXZlcg0KDQpTb3JyeSBmb3IgdGhlIGNvbmZ1
c2lvbi4NCg0KVGhhbmtzLA0KLS0gRGV4dWFuDQo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host
2019-09-13 6:38 ` Dexuan Cui
2019-09-16 21:45 ` Dexuan Cui
@ 2019-10-02 12:38 ` Sasha Levin
1 sibling, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2019-10-02 12:38 UTC (permalink / raw)
To: Dexuan Cui
Cc: linux-hyperv@vger.kernel.org, Wei Hu, b.zolnierkie@samsung.com,
linux-kernel@vger.kernel.org, Haiyang Zhang,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
Michael Kelley, Iouri Tarassov, Stephen Hemminger, KY Srinivasan
On Fri, Sep 13, 2019 at 06:38:42AM +0000, Dexuan Cui wrote:
>> From: Michael Kelley <mikelley@microsoft.com>
>> Sent: Thursday, September 5, 2019 7:06 AM
>>
>> From: Wei Hu <weh@microsoft.com> Sent: Thursday, September 5, 2019 2:12
>> AM
>> >
>> > Beginning from Windows 10 RS5+, VM screen resolution is obtained from
>> host.
>> > 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 <iourit@microsoft.com>
>> > Signed-off-by: Wei Hu <weh@microsoft.com>
>> > ---
>> > v2:
>> > - Implemented fallback when version negotiation failed.
>> > - Defined full size for supported_resolution array.
>> >
>> > v3:
>> > - Corrected the synthvid major and minor version comparison problem.
>> >
>> > v4:
>> > - Changed function name to synthvid_ver_ge().
>> >
>> > drivers/video/fbdev/hyperv_fb.c | 159
>> +++++++++++++++++++++++++++++---
>> > 1 file changed, 147 insertions(+), 12 deletions(-)
>> >
>>
>> Reviewed-by: Michael Kelley <mikelley@microsoft.com>
>
>Looks good to me.
>
>Reviewed-by: Dexuan Cui <decui@microsoft.com>
Queued up for hyperv-next, thank you.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-10-02 12:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-05 9:11 [PATCH v4] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host Wei Hu
2019-09-05 14:05 ` Michael Kelley
2019-09-13 6:38 ` Dexuan Cui
2019-09-16 21:45 ` Dexuan Cui
2019-09-16 21:48 ` Dexuan Cui
2019-10-02 12:38 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).