1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright 2021 Microsoft
9 #define VMBUS_MAX_PACKET_SIZE 0x4000
11 struct hyperv_drm_device {
13 struct drm_device dev;
14 struct drm_simple_display_pipe pipe;
15 struct drm_connector connector;
19 u32 screen_height_max;
27 unsigned long fb_base;
28 unsigned long fb_size;
29 struct completion wait;
34 u8 init_buf[VMBUS_MAX_PACKET_SIZE];
35 u8 recv_buf[VMBUS_MAX_PACKET_SIZE];
37 struct hv_device *hdev;
40 #define to_hv(_dev) container_of(_dev, struct hyperv_drm_device, dev)
42 /* hyperv_drm_modeset */
43 int hyperv_mode_config_init(struct hyperv_drm_device *hv);
45 /* hyperv_drm_proto */
46 int hyperv_update_vram_location(struct hv_device *hdev, phys_addr_t vram_pp);
47 int hyperv_update_situation(struct hv_device *hdev, u8 active, u32 bpp,
48 u32 w, u32 h, u32 pitch);
49 int hyperv_update_dirt(struct hv_device *hdev, struct drm_rect *rect);
50 int hyperv_connect_vsp(struct hv_device *hdev);