From: Michael Kelley <[email protected]>

With the overall removal of Linux support for running on Hyper-V
hosts earlier than WS2016 and Windows 10, it's no longer necessary
to support older synthetic video protocols. Remove the support.

Signed-off-by: Michael Kelley <[email protected]>
---
 drivers/gpu/drm/hyperv/hyperv_drm_proto.c | 33 +++++++----------------
 1 file changed, 10 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_proto.c 
b/drivers/gpu/drm/hyperv/hyperv_drm_proto.c
index f0ef627b4898..cea1ea2595cd 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_proto.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_proto.c
@@ -17,7 +17,7 @@
 #define SYNTHVID_VER_GET_MAJOR(ver) (ver & 0x0000ffff)
 #define SYNTHVID_VER_GET_MINOR(ver) ((ver & 0xffff0000) >> 16)
 
-/* Support for VERSION_WIN7 is removed. #define is retained for reference. */
+/* Support for WIN7 and WIN8 is removed. #define's retained for reference. */
 #define SYNTHVID_VERSION_WIN7 SYNTHVID_VERSION(3, 0)
 #define SYNTHVID_VERSION_WIN8 SYNTHVID_VERSION(3, 2)
 #define SYNTHVID_VERSION_WIN10 SYNTHVID_VERSION(3, 5)
@@ -557,23 +557,12 @@ int hv_drm_connect_vsp(struct hv_device *hdev)
                return ret;
        }
 
-       /* Negotiate the protocol version with host */
-       switch (vmbus_proto_version) {
-       case VERSION_WIN10:
-       case VERSION_WIN10_V5:
-               ret = hv_drm_negotiate_version(hdev, SYNTHVID_VERSION_WIN10);
-               if (!ret)
-                       break;
-               fallthrough;
-       case VERSION_WIN8:
-       case VERSION_WIN8_1:
-               ret = hv_drm_negotiate_version(hdev, SYNTHVID_VERSION_WIN8);
-               break;
-       default:
-               ret = hv_drm_negotiate_version(hdev, SYNTHVID_VERSION_WIN10);
-               break;
-       }
-
+       /*
+        * Negotiate the protocol version with host. Since support for hosts
+        * older than WIN10 has been removed from Linux, only negotiate the
+        * WIN10 version.
+        */
+       ret = hv_drm_negotiate_version(hdev, SYNTHVID_VERSION_WIN10);
        if (ret) {
                drm_err(dev, "Synthetic video device version not accepted 
%d\n", ret);
                goto error;
@@ -581,11 +570,9 @@ int hv_drm_connect_vsp(struct hv_device *hdev)
 
        hv->screen_depth = SYNTHVID_DEPTH_WIN8;
 
-       if (hv_drm_version_ge(hv->synthvid_version, SYNTHVID_VERSION_WIN10)) {
-               ret = hv_drm_get_supported_resolution(hdev);
-               if (ret)
-                       drm_err(dev, "Failed to get supported resolution from 
host, use default\n");
-       }
+       ret = hv_drm_get_supported_resolution(hdev);
+       if (ret)
+               drm_err(dev, "Failed to get supported resolution from host, use 
default\n");
 
        if (!hv->screen_width_max) {
                hv->screen_width_max = SYNTHVID_WIDTH_WIN8;
-- 
2.25.1


Reply via email to