xref: /netbsd-src/sys/external/bsd/drm2/dist/drm/vboxvideo/hgsmi_ch_setup.h (revision 41ec02673d281bbb3d38e6c78504ce6e30c228c1)
1 /*	$NetBSD: hgsmi_ch_setup.h,v 1.2 2021/12/18 23:45:44 riastradh Exp $	*/
2 
3 /* SPDX-License-Identifier: MIT */
4 /* Copyright (C) 2006-2017 Oracle Corporation */
5 
6 #ifndef __HGSMI_CH_SETUP_H__
7 #define __HGSMI_CH_SETUP_H__
8 
9 /*
10  * Tell the host the location of hgsmi_host_flags structure, where the host
11  * can write information about pending buffers, etc, and which can be quickly
12  * polled by the guest without a need to port IO.
13  */
14 #define HGSMI_CC_HOST_FLAGS_LOCATION 0
15 
16 struct hgsmi_buffer_location {
17 	u32 buf_location;
18 	u32 buf_len;
19 } __packed;
20 
21 /* HGSMI setup and configuration data structures. */
22 
23 #define HGSMIHOSTFLAGS_COMMANDS_PENDING    0x01u
24 #define HGSMIHOSTFLAGS_IRQ                 0x02u
25 #define HGSMIHOSTFLAGS_VSYNC               0x10u
26 #define HGSMIHOSTFLAGS_HOTPLUG             0x20u
27 #define HGSMIHOSTFLAGS_CURSOR_CAPABILITIES 0x40u
28 
29 struct hgsmi_host_flags {
30 	u32 host_flags;
31 	u32 reserved[3];
32 } __packed;
33 
34 #endif
35