Skip to content

Commit ac6811a

Browse files
kelleymhliuw
authored andcommitted
drm/hyperv: Remove support for Hyper-V 2008 and 2008R2/Win7
The DRM Hyper-V driver has special case code for running on the first released versions of Hyper-V: 2008 and 2008 R2/Windows 7. These versions are now out of support (except for extended security updates) and lack support for performance features that are needed for effective production usage of Linux guests. The negotiation of the VMbus protocol versions required by these old Hyper-V versions has been removed from the VMbus driver. So now remove the handling of these VMbus protocol versions from the DRM Hyper-V driver. Signed-off-by: Michael Kelley <mikelley@microsoft.com> Reviewed-by: Deepak Rawat <drawat.floss@gmail.com> Reviewed-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com> Link: https://lore.kernel.org/r/1651509391-2058-5-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent b0cce4f commit ac6811a

1 file changed

Lines changed: 7 additions & 16 deletions

File tree

drivers/gpu/drm/hyperv/hyperv_drm_proto.c

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
#define SYNTHVID_VERSION(major, minor) ((minor) << 16 | (major))
1919
#define SYNTHVID_VER_GET_MAJOR(ver) (ver & 0x0000ffff)
2020
#define SYNTHVID_VER_GET_MINOR(ver) ((ver & 0xffff0000) >> 16)
21+
22+
/* Support for VERSION_WIN7 is removed. #define is retained for reference. */
2123
#define SYNTHVID_VERSION_WIN7 SYNTHVID_VERSION(3, 0)
2224
#define SYNTHVID_VERSION_WIN8 SYNTHVID_VERSION(3, 2)
2325
#define SYNTHVID_VERSION_WIN10 SYNTHVID_VERSION(3, 5)
2426

25-
#define SYNTHVID_DEPTH_WIN7 16
2627
#define SYNTHVID_DEPTH_WIN8 32
27-
#define SYNTHVID_FB_SIZE_WIN7 (4 * 1024 * 1024)
28+
#define SYNTHVID_WIDTH_WIN8 1600
29+
#define SYNTHVID_HEIGHT_WIN8 1200
2830
#define SYNTHVID_FB_SIZE_WIN8 (8 * 1024 * 1024)
29-
#define SYNTHVID_WIDTH_MAX_WIN7 1600
30-
#define SYNTHVID_HEIGHT_MAX_WIN7 1200
3131

3232
enum pipe_msg_type {
3333
PIPE_MSG_INVALID,
@@ -496,12 +496,6 @@ int hyperv_connect_vsp(struct hv_device *hdev)
496496
case VERSION_WIN8:
497497
case VERSION_WIN8_1:
498498
ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN8);
499-
if (!ret)
500-
break;
501-
fallthrough;
502-
case VERSION_WS2008:
503-
case VERSION_WIN7:
504-
ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN7);
505499
break;
506500
default:
507501
ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN10);
@@ -513,18 +507,15 @@ int hyperv_connect_vsp(struct hv_device *hdev)
513507
goto error;
514508
}
515509

516-
if (hv->synthvid_version == SYNTHVID_VERSION_WIN7)
517-
hv->screen_depth = SYNTHVID_DEPTH_WIN7;
518-
else
519-
hv->screen_depth = SYNTHVID_DEPTH_WIN8;
510+
hv->screen_depth = SYNTHVID_DEPTH_WIN8;
520511

521512
if (hyperv_version_ge(hv->synthvid_version, SYNTHVID_VERSION_WIN10)) {
522513
ret = hyperv_get_supported_resolution(hdev);
523514
if (ret)
524515
drm_err(dev, "Failed to get supported resolution from host, use default\n");
525516
} else {
526-
hv->screen_width_max = SYNTHVID_WIDTH_MAX_WIN7;
527-
hv->screen_height_max = SYNTHVID_HEIGHT_MAX_WIN7;
517+
hv->screen_width_max = SYNTHVID_WIDTH_WIN8;
518+
hv->screen_height_max = SYNTHVID_HEIGHT_WIN8;
528519
}
529520

530521
hv->mmio_megabytes = hdev->channel->offermsg.offer.mmio_megabytes;

0 commit comments

Comments
 (0)