1e07dc26bSmrg/*
2e07dc26bSmrg * Copyright (C) 2006-2017 Oracle Corporation
3e07dc26bSmrg *
4e07dc26bSmrg * Permission is hereby granted, free of charge, to any person obtaining a
5e07dc26bSmrg * copy of this software and associated documentation files (the "Software"),
6e07dc26bSmrg * to deal in the Software without restriction, including without limitation
7e07dc26bSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8e07dc26bSmrg * and/or sell copies of the Software, and to permit persons to whom the
9e07dc26bSmrg * Software is furnished to do so, subject to the following conditions:
10e07dc26bSmrg *
11e07dc26bSmrg * The above copyright notice and this permission notice shall be included in
12e07dc26bSmrg * all copies or substantial portions of the Software.
13e07dc26bSmrg *
14e07dc26bSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15e07dc26bSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16e07dc26bSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17e07dc26bSmrg * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18e07dc26bSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19e07dc26bSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20e07dc26bSmrg * OTHER DEALINGS IN THE SOFTWARE.
21e07dc26bSmrg */
22e07dc26bSmrg
23e07dc26bSmrg
24e07dc26bSmrg#ifndef __HGSMIChannels_h__
25e07dc26bSmrg#define __HGSMIChannels_h__
26e07dc26bSmrg
27e07dc26bSmrg
28e07dc26bSmrg/*
29e07dc26bSmrg * Each channel has an 8 bit identifier. There are a number of predefined
30e07dc26bSmrg * (hardcoded) channels.
31e07dc26bSmrg *
32e07dc26bSmrg * HGSMI_CH_HGSMI channel can be used to map a string channel identifier
33e07dc26bSmrg * to a free 16 bit numerical value. values are allocated in range
34e07dc26bSmrg * [HGSMI_CH_STRING_FIRST;HGSMI_CH_STRING_LAST].
35e07dc26bSmrg */
36e07dc26bSmrg
37e07dc26bSmrg
38e07dc26bSmrg/* Predefined channel identifiers. Used internally by VBOX to simplify the channel setup. */
39e07dc26bSmrg/* A reserved channel value */
40e07dc26bSmrg#define HGSMI_CH_RESERVED     0x00
41e07dc26bSmrg/* HGCMI: setup and configuration */
42e07dc26bSmrg#define HGSMI_CH_HGSMI        0x01
43e07dc26bSmrg/* Graphics: VBVA */
44e07dc26bSmrg#define HGSMI_CH_VBVA         0x02
45e07dc26bSmrg/* Graphics: Seamless with a single guest region */
46e07dc26bSmrg#define HGSMI_CH_SEAMLESS     0x03
47e07dc26bSmrg/* Graphics: Seamless with separate host windows */
48e07dc26bSmrg#define HGSMI_CH_SEAMLESS2    0x04
49e07dc26bSmrg/* Graphics: OpenGL HW acceleration */
50e07dc26bSmrg#define HGSMI_CH_OPENGL       0x05
51e07dc26bSmrg
52e07dc26bSmrg
53e07dc26bSmrg/* Dynamically allocated channel identifiers. */
54e07dc26bSmrg/* The first channel index to be used for string mappings (inclusive) */
55e07dc26bSmrg#define HGSMI_CH_STRING_FIRST 0x20
56e07dc26bSmrg/* The last channel index for string mappings (inclusive) */
57e07dc26bSmrg#define HGSMI_CH_STRING_LAST  0xff
58e07dc26bSmrg
59e07dc26bSmrg
60e07dc26bSmrg/* Check whether the channel identifier is allocated for a dynamic channel */
61e07dc26bSmrg#define HGSMI_IS_DYNAMIC_CHANNEL(_channel) (((uint8_t)(_channel) & 0xE0) != 0)
62e07dc26bSmrg
63e07dc26bSmrg
64e07dc26bSmrg#endif /* !__HGSMIChannels_h__*/
65