xref: /openbmc/linux/drivers/gpu/drm/vmwgfx/device_include/svga_escape.h (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
1*b05fa564SZack Rusin /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2*b05fa564SZack Rusin /*
3ebc9ac7cSZack Rusin  * Copyright 2007,2020 VMware, Inc.
48ce75f8aSSinclair Yeh  *
58ce75f8aSSinclair Yeh  * Permission is hereby granted, free of charge, to any person
68ce75f8aSSinclair Yeh  * obtaining a copy of this software and associated documentation
78ce75f8aSSinclair Yeh  * files (the "Software"), to deal in the Software without
88ce75f8aSSinclair Yeh  * restriction, including without limitation the rights to use, copy,
98ce75f8aSSinclair Yeh  * modify, merge, publish, distribute, sublicense, and/or sell copies
108ce75f8aSSinclair Yeh  * of the Software, and to permit persons to whom the Software is
118ce75f8aSSinclair Yeh  * furnished to do so, subject to the following conditions:
128ce75f8aSSinclair Yeh  *
138ce75f8aSSinclair Yeh  * The above copyright notice and this permission notice shall be
148ce75f8aSSinclair Yeh  * included in all copies or substantial portions of the Software.
158ce75f8aSSinclair Yeh  *
168ce75f8aSSinclair Yeh  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
178ce75f8aSSinclair Yeh  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
188ce75f8aSSinclair Yeh  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
198ce75f8aSSinclair Yeh  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
208ce75f8aSSinclair Yeh  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
218ce75f8aSSinclair Yeh  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
228ce75f8aSSinclair Yeh  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
238ce75f8aSSinclair Yeh  * SOFTWARE.
248ce75f8aSSinclair Yeh  *
25*b05fa564SZack Rusin  */
268ce75f8aSSinclair Yeh 
278ce75f8aSSinclair Yeh /*
288ce75f8aSSinclair Yeh  * svga_escape.h --
298ce75f8aSSinclair Yeh  *
308ce75f8aSSinclair Yeh  *    Definitions for our own (vendor-specific) SVGA Escape commands.
318ce75f8aSSinclair Yeh  */
328ce75f8aSSinclair Yeh 
33ebc9ac7cSZack Rusin 
34ebc9ac7cSZack Rusin 
358ce75f8aSSinclair Yeh #ifndef _SVGA_ESCAPE_H_
368ce75f8aSSinclair Yeh #define _SVGA_ESCAPE_H_
378ce75f8aSSinclair Yeh 
388ce75f8aSSinclair Yeh #define SVGA_ESCAPE_NSID_VMWARE 0x00000000
398ce75f8aSSinclair Yeh #define SVGA_ESCAPE_NSID_DEVEL 0xFFFFFFFF
408ce75f8aSSinclair Yeh 
418ce75f8aSSinclair Yeh #define SVGA_ESCAPE_VMWARE_MAJOR_MASK 0xFFFF0000
428ce75f8aSSinclair Yeh 
438ce75f8aSSinclair Yeh #define SVGA_ESCAPE_VMWARE_HINT 0x00030000
44ebc9ac7cSZack Rusin #define SVGA_ESCAPE_VMWARE_HINT_FULLSCREEN 0x00030001
458ce75f8aSSinclair Yeh 
46ebc9ac7cSZack Rusin #pragma pack(push, 1)
47ebc9ac7cSZack Rusin typedef struct {
488ce75f8aSSinclair Yeh 	uint32 command;
498ce75f8aSSinclair Yeh 	uint32 fullscreen;
508ce75f8aSSinclair Yeh 	struct {
518ce75f8aSSinclair Yeh 		int32 x, y;
528ce75f8aSSinclair Yeh 	} monitorPosition;
538ce75f8aSSinclair Yeh } SVGAEscapeHintFullscreen;
54ebc9ac7cSZack Rusin #pragma pack(pop)
558ce75f8aSSinclair Yeh 
56ebc9ac7cSZack Rusin #endif
57