提交 ac6811a9 编写于 作者: M Michael Kelley 提交者: Wei Liu

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: NMichael Kelley <mikelley@microsoft.com>
Reviewed-by: NDeepak Rawat <drawat.floss@gmail.com>
Reviewed-by: NAndrea Parri (Microsoft) <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/1651509391-2058-5-git-send-email-mikelley@microsoft.comSigned-off-by: NWei Liu <wei.liu@kernel.org>
上级 b0cce4f6
...@@ -18,16 +18,16 @@ ...@@ -18,16 +18,16 @@
#define SYNTHVID_VERSION(major, minor) ((minor) << 16 | (major)) #define SYNTHVID_VERSION(major, minor) ((minor) << 16 | (major))
#define SYNTHVID_VER_GET_MAJOR(ver) (ver & 0x0000ffff) #define SYNTHVID_VER_GET_MAJOR(ver) (ver & 0x0000ffff)
#define SYNTHVID_VER_GET_MINOR(ver) ((ver & 0xffff0000) >> 16) #define SYNTHVID_VER_GET_MINOR(ver) ((ver & 0xffff0000) >> 16)
/* Support for VERSION_WIN7 is removed. #define is retained for reference. */
#define SYNTHVID_VERSION_WIN7 SYNTHVID_VERSION(3, 0) #define SYNTHVID_VERSION_WIN7 SYNTHVID_VERSION(3, 0)
#define SYNTHVID_VERSION_WIN8 SYNTHVID_VERSION(3, 2) #define SYNTHVID_VERSION_WIN8 SYNTHVID_VERSION(3, 2)
#define SYNTHVID_VERSION_WIN10 SYNTHVID_VERSION(3, 5) #define SYNTHVID_VERSION_WIN10 SYNTHVID_VERSION(3, 5)
#define SYNTHVID_DEPTH_WIN7 16
#define SYNTHVID_DEPTH_WIN8 32 #define SYNTHVID_DEPTH_WIN8 32
#define SYNTHVID_FB_SIZE_WIN7 (4 * 1024 * 1024) #define SYNTHVID_WIDTH_WIN8 1600
#define SYNTHVID_HEIGHT_WIN8 1200
#define SYNTHVID_FB_SIZE_WIN8 (8 * 1024 * 1024) #define SYNTHVID_FB_SIZE_WIN8 (8 * 1024 * 1024)
#define SYNTHVID_WIDTH_MAX_WIN7 1600
#define SYNTHVID_HEIGHT_MAX_WIN7 1200
enum pipe_msg_type { enum pipe_msg_type {
PIPE_MSG_INVALID, PIPE_MSG_INVALID,
...@@ -496,12 +496,6 @@ int hyperv_connect_vsp(struct hv_device *hdev) ...@@ -496,12 +496,6 @@ int hyperv_connect_vsp(struct hv_device *hdev)
case VERSION_WIN8: case VERSION_WIN8:
case VERSION_WIN8_1: case VERSION_WIN8_1:
ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN8); ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN8);
if (!ret)
break;
fallthrough;
case VERSION_WS2008:
case VERSION_WIN7:
ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN7);
break; break;
default: default:
ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN10); ret = hyperv_negotiate_version(hdev, SYNTHVID_VERSION_WIN10);
...@@ -513,18 +507,15 @@ int hyperv_connect_vsp(struct hv_device *hdev) ...@@ -513,18 +507,15 @@ int hyperv_connect_vsp(struct hv_device *hdev)
goto error; goto error;
} }
if (hv->synthvid_version == SYNTHVID_VERSION_WIN7) hv->screen_depth = SYNTHVID_DEPTH_WIN8;
hv->screen_depth = SYNTHVID_DEPTH_WIN7;
else
hv->screen_depth = SYNTHVID_DEPTH_WIN8;
if (hyperv_version_ge(hv->synthvid_version, SYNTHVID_VERSION_WIN10)) { if (hyperv_version_ge(hv->synthvid_version, SYNTHVID_VERSION_WIN10)) {
ret = hyperv_get_supported_resolution(hdev); ret = hyperv_get_supported_resolution(hdev);
if (ret) if (ret)
drm_err(dev, "Failed to get supported resolution from host, use default\n"); drm_err(dev, "Failed to get supported resolution from host, use default\n");
} else { } else {
hv->screen_width_max = SYNTHVID_WIDTH_MAX_WIN7; hv->screen_width_max = SYNTHVID_WIDTH_WIN8;
hv->screen_height_max = SYNTHVID_HEIGHT_MAX_WIN7; hv->screen_height_max = SYNTHVID_HEIGHT_WIN8;
} }
hv->mmio_megabytes = hdev->channel->offermsg.offer.mmio_megabytes; hv->mmio_megabytes = hdev->channel->offermsg.offer.mmio_megabytes;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册