VirtualBox

source: vbox/trunk/include/VBox/Graphics/HGSMIChSetup.h@ 68848

Last change on this file since 68848 was 68848, checked in by vboxsync, 7 years ago

Additions/linux/drm: lots of formatting changes to match kernel style.
bugref:8524: Additions/linux: play nicely with distribution-installed Additions

This change makes a lot of formatting changes to the Linux Additions drm
driver, with no intended changes to functionality, and much of the
formatting change done using the sed script which installs the driver
sources to the Additions archive. Hans de Goede's clean-up of the driver for
submission to staging is the base for these changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/** @file
2 * VBox Host Guest Shared Memory Interface (HGSMI), Host/Guest shared part.
3 */
4
5/*
6 * Copyright (C) 2006-2017 Oracle Corporation
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
22 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 * OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27#ifndef ___VBox_Graphics_HGSMIChSetup_h
28#define ___VBox_Graphics_HGSMIChSetup_h
29
30#include "HGSMIDefs.h"
31
32/* HGSMI setup and configuration channel commands and data structures. */
33/*
34 * Tell the host the location of hgsmi_host_flags structure, where the host
35 * can write information about pending buffers, etc, and which can be quickly
36 * polled by the guest without a need to port IO.
37 */
38#define HGSMI_CC_HOST_FLAGS_LOCATION 0
39
40typedef struct HGSMIBUFFERLOCATION
41{
42 HGSMIOFFSET offLocation;
43 HGSMISIZE cbLocation;
44} HGSMIBUFFERLOCATION;
45AssertCompileSize(HGSMIBUFFERLOCATION, 8);
46
47/* HGSMI setup and configuration data structures. */
48/* host->guest commands pending, should be accessed under FIFO lock only */
49#define HGSMIHOSTFLAGS_COMMANDS_PENDING UINT32_C(0x01)
50/* IRQ is fired, should be accessed under VGAState::lock only */
51#define HGSMIHOSTFLAGS_IRQ UINT32_C(0x02)
52#ifdef VBOX_WITH_WDDM
53/* one or more guest commands is completed, should be accessed under FIFO lock only */
54# define HGSMIHOSTFLAGS_GCOMMAND_COMPLETED UINT32_C(0x04)
55/* watchdog timer interrupt flag (used for debugging), should be accessed under VGAState::lock only */
56# define HGSMIHOSTFLAGS_WATCHDOG UINT32_C(0x08)
57#endif
58/* vsync interrupt flag, should be accessed under VGAState::lock only */
59#define HGSMIHOSTFLAGS_VSYNC UINT32_C(0x10)
60/** monitor hotplug flag, should be accessed under VGAState::lock only */
61#define HGSMIHOSTFLAGS_HOTPLUG UINT32_C(0x20)
62/**
63 * Cursor capability state change flag, should be accessed under
64 * VGAState::lock only. @see VBVACONF32.
65 */
66#define HGSMIHOSTFLAGS_CURSOR_CAPABILITIES UINT32_C(0x40)
67
68typedef struct HGSMIHOSTFLAGS
69{
70 /*
71 * Host flags can be accessed and modified in multiple threads
72 * concurrently, e.g. CrOpenGL HGCM and GUI threads when completing
73 * HGSMI 3D and Video Accel respectively, EMT thread when dealing with
74 * HGSMI command processing, etc.
75 * Besides settings/cleaning flags atomically, some flags have their
76 * own special sync restrictions, see comments for flags above.
77 */
78 volatile uint32_t u32HostFlags;
79 uint32_t au32Reserved[3];
80} HGSMIHOSTFLAGS;
81AssertCompileSize(HGSMIHOSTFLAGS, 16);
82
83#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette