diff options
author | Deepak Rawat <drawat.floss@gmail.com> | 2021-05-27 04:22:29 -0700 |
---|---|---|
committer | Deepak Rawat <drawat.floss@gmail.com> | 2021-06-07 08:04:10 -0700 |
commit | 25bfa956561fb47141b8cc382e69a1f674a27eb0 (patch) | |
tree | d535d78b0db152bdfda30afdb1b7eda4c0c8c1bd /drivers/gpu/drm/hyperv/hyperv_drm_proto.c | |
parent | 76c56a5affeba1e163b66b9d8cc192e6154466f0 (diff) |
drm/hyperv: Handle feature change message from device
Virtual device inform if screen update is needed or not with
SYNTHVID_FEATURE_CHANGE message. Handle this message to set dirt_needed
flag.
Suggested-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Deepak Rawat <drawat.floss@gmail.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210527112230.1274-2-drawat.floss@gmail.com
Diffstat (limited to 'drivers/gpu/drm/hyperv/hyperv_drm_proto.c')
-rw-r--r-- | drivers/gpu/drm/hyperv/hyperv_drm_proto.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_proto.c b/drivers/gpu/drm/hyperv/hyperv_drm_proto.c index 00c4cc2db605..6d4bdccfbd1a 100644 --- a/drivers/gpu/drm/hyperv/hyperv_drm_proto.c +++ b/drivers/gpu/drm/hyperv/hyperv_drm_proto.c @@ -301,8 +301,12 @@ int hyperv_update_situation(struct hv_device *hdev, u8 active, u32 bpp, int hyperv_update_dirt(struct hv_device *hdev, struct drm_rect *rect) { + struct hyperv_drm_device *hv = hv_get_drvdata(hdev); struct synthvid_msg msg; + if (!hv->dirt_needed) + return 0; + memset(&msg, 0, sizeof(struct synthvid_msg)); msg.vid_hdr.type = SYNTHVID_DIRT; @@ -387,6 +391,9 @@ static void hyperv_receive_sub(struct hv_device *hdev) complete(&hv->wait); return; } + + if (msg->vid_hdr.type == SYNTHVID_FEATURE_CHANGE) + hv->dirt_needed = msg->feature_chg.is_dirt_needed; } static void hyperv_receive(void *ctx) |