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