struct completion wait;
u32 synthvid_version;
u32 mmio_megabytes;
+ bool dirt_needed;
u8 init_buf[VMBUS_MAX_PACKET_SIZE];
u8 recv_buf[VMBUS_MAX_PACKET_SIZE];
if (ret)
drm_warn(dev, "Failed to update vram location.\n");
+ hv->dirt_needed = true;
+
ret = hyperv_mode_config_init(hv);
if (ret)
goto err_vmbus_close;
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;
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)