linux/drivers/gpu/drm/vmwgfx/device_include/svga_reg.h

/* SPDX-License-Identifier: GPL-2.0 OR MIT */
/*
 * Copyright 1998-2021 VMware, Inc.
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

/*
 * svga_reg.h --
 *
 *    Virtual hardware definitions for the VMware SVGA II device.
 */



#ifndef _SVGA_REG_H_
#define _SVGA_REG_H_

#include "vm_basic_types.h"

SvgaRegEnable;

SVGAMobId;

#define SVGA_MAX_WIDTH
#define SVGA_MAX_HEIGHT

#define SVGA_MAX_BITS_PER_PIXEL
#define SVGA_MAX_DEPTH
#define SVGA_MAX_DISPLAYS
#define SVGA_MAX_SCREEN_SIZE
#define SVGA_SCREEN_ROOT_LIMIT

#define SVGA_CURSOR_ON_HIDE
#define SVGA_CURSOR_ON_SHOW

#define SVGA_CURSOR_ON_REMOVE_FROM_FB

#define SVGA_CURSOR_ON_RESTORE_TO_FB

#define SVGA_FB_MAX_TRACEABLE_SIZE

#define SVGA_MAX_PSEUDOCOLOR_DEPTH
#define SVGA_MAX_PSEUDOCOLORS
#define SVGA_NUM_PALETTE_REGS

#define SVGA_MAGIC
#define SVGA_MAKE_ID(ver)

#define SVGA_VERSION_3
#define SVGA_ID_3

#define SVGA_VERSION_2
#define SVGA_ID_2

#define SVGA_VERSION_1
#define SVGA_ID_1

#define SVGA_VERSION_0
#define SVGA_ID_0

#define SVGA_ID_INVALID

#define SVGA_INDEX_PORT
#define SVGA_VALUE_PORT
#define SVGA_BIOS_PORT
#define SVGA_IRQSTATUS_PORT

#define SVGA_IRQFLAG_ANY_FENCE
#define SVGA_IRQFLAG_FIFO_PROGRESS
#define SVGA_IRQFLAG_FENCE_GOAL
#define SVGA_IRQFLAG_COMMAND_BUFFER
#define SVGA_IRQFLAG_ERROR
#define SVGA_IRQFLAG_REG_FENCE_GOAL
#define SVGA_IRQFLAG_MAX

#define SVGA_MAX_CURSOR_CMD_BYTES
#define SVGA_MAX_CURSOR_CMD_DIMENSION

enum {};

SVGARegGuestDriverId;

SVGARegMSHint;

SVGARegDirtyTracking;

#define SVGA_GMR_NULL
#define SVGA_GMR_FRAMEBUFFER

#pragma pack(push, 1)
SVGAGuestMemDescriptor;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAGuestPtr;
#pragma pack(pop)

#define SVGA_CB_MAX_SIZE_DEFAULT
#define SVGA_CB_MAX_SIZE_4MB
#define SVGA_CB_MAX_SIZE
#define SVGA_CB_MAX_QUEUED_PER_CONTEXT
#define SVGA_CB_MAX_COMMAND_SIZE

#define SVGA_CB_CONTEXT_MASK
SVGACBContext;

SVGACBStatus;

SVGACBFlags;

#pragma pack(push, 1)
SVGACBHeader;
#pragma pack(pop)

SVGADeviceContextCmdId;

SVGADCCmdStartStop;

SVGADCCmdPreempt;

SVGADCCmdStartQueue;

SVGADCCmdAsyncStopQueue;

SVGADCCmdEmptyQueue;

SVGAGMRImageFormat;

#pragma pack(push, 1)
SVGAGuestImage;
#pragma pack(pop)

SVGAColorBGRX;

#pragma pack(push, 1)
SVGASignedRect;
#pragma pack(pop)

#pragma pack(push, 1)
SVGASignedPoint;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAUnsignedPoint;
#pragma pack(pop)

#define SVGA_CAP_NONE
#define SVGA_CAP_RECT_COPY
#define SVGA_CAP_CURSOR
#define SVGA_CAP_CURSOR_BYPASS
#define SVGA_CAP_CURSOR_BYPASS_2
#define SVGA_CAP_8BIT_EMULATION
#define SVGA_CAP_ALPHA_CURSOR
#define SVGA_CAP_3D
#define SVGA_CAP_EXTENDED_FIFO
#define SVGA_CAP_MULTIMON
#define SVGA_CAP_PITCHLOCK
#define SVGA_CAP_IRQMASK
#define SVGA_CAP_DISPLAY_TOPOLOGY
#define SVGA_CAP_GMR
#define SVGA_CAP_TRACES
#define SVGA_CAP_GMR2
#define SVGA_CAP_SCREEN_OBJECT_2
#define SVGA_CAP_COMMAND_BUFFERS
#define SVGA_CAP_DEAD1
#define SVGA_CAP_CMD_BUFFERS_2
#define SVGA_CAP_GBOBJECTS
#define SVGA_CAP_DX
#define SVGA_CAP_HP_CMD_QUEUE
#define SVGA_CAP_NO_BB_RESTRICTION
#define SVGA_CAP_CAP2_REGISTER

#define SVGA_CAP2_NONE
#define SVGA_CAP2_GROW_OTABLE
#define SVGA_CAP2_INTRA_SURFACE_COPY
#define SVGA_CAP2_DX2
#define SVGA_CAP2_GB_MEMSIZE_2
#define SVGA_CAP2_SCREENDMA_REG
#define SVGA_CAP2_OTABLE_PTDEPTH_2
#define SVGA_CAP2_NON_MS_TO_MS_STRETCHBLT
#define SVGA_CAP2_CURSOR_MOB
#define SVGA_CAP2_MSHINT
#define SVGA_CAP2_CB_MAX_SIZE_4MB
#define SVGA_CAP2_DX3
#define SVGA_CAP2_FRAME_TYPE
#define SVGA_CAP2_COTABLE_COPY
#define SVGA_CAP2_TRACE_FULL_FB
#define SVGA_CAP2_EXTRA_REGS
#define SVGA_CAP2_LO_STAGING
#define SVGA_CAP2_VIDEO_BLT
#define SVGA_CAP2_RESERVED

SVGABackdoorCapType;

enum {};

#define SVGA_FIFO_3D_CAPS_SIZE

#define SVGA3D_FIFO_CAPS_RECORD_DEVCAPS
SVGA3dFifoCapsRecordType;

SVGA3dFifoCapPair;

#pragma pack(push, 1)
SVGA3dFifoCapsRecordHeader;
#pragma pack(pop)

#define SVGA_FIFO_EXTENDED_MANDATORY_REGS

#define SVGA_FIFO_CAP_NONE
#define SVGA_FIFO_CAP_FENCE
#define SVGA_FIFO_CAP_ACCELFRONT
#define SVGA_FIFO_CAP_PITCHLOCK
#define SVGA_FIFO_CAP_VIDEO
#define SVGA_FIFO_CAP_CURSOR_BYPASS_3
#define SVGA_FIFO_CAP_ESCAPE
#define SVGA_FIFO_CAP_RESERVE
#define SVGA_FIFO_CAP_SCREEN_OBJECT
#define SVGA_FIFO_CAP_GMR2
#define SVGA_FIFO_CAP_3D_HWVERSION_REVISED
#define SVGA_FIFO_CAP_SCREEN_OBJECT_2
#define SVGA_FIFO_CAP_DEAD

#define SVGA_FIFO_FLAG_NONE
#define SVGA_FIFO_FLAG_ACCELFRONT
#define SVGA_FIFO_FLAG_RESERVED

#define SVGA_FIFO_RESERVED_UNKNOWN

#define SVGA_SCREENDMA_REG_UNDEFINED
#define SVGA_SCREENDMA_REG_NOT_PRESENT
#define SVGA_SCREENDMA_REG_PRESENT
#define SVGA_SCREENDMA_REG_MAX

#define SVGA_NUM_OVERLAY_UNITS

#define SVGA_VIDEO_FLAG_COLORKEY

enum {};

#pragma pack(push, 1)
SVGAOverlayUnit;
#pragma pack(pop)

#define SVGA_INVALID_DISPLAY_ID

SVGADisplayTopology;

#define SVGA_SCREEN_MUST_BE_SET
#define SVGA_SCREEN_HAS_ROOT
#define SVGA_SCREEN_IS_PRIMARY
#define SVGA_SCREEN_FULLSCREEN_HINT

#define SVGA_SCREEN_DEACTIVATE

#define SVGA_SCREEN_BLANKING

#pragma pack(push, 1)
SVGAScreenObject;
#pragma pack(pop)

SVGAFifoCmdId;

#define SVGA_CMD_MAX_DATASIZE
#define SVGA_CMD_MAX_ARGS

#pragma pack(push, 1)
SVGAFifoCmdUpdate;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdRectCopy;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdRectRopCopy;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdDefineCursor;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdDefineAlphaCursor;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAGBColorCursorHeader;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAGBAlphaCursorHeader;
#pragma pack(pop)

SVGAGBCursorType;

#pragma pack(push, 1)
SVGAGBCursorHeader;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdUpdateVerbose;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdFrontRopFill;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdFence;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdEscape;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdDefineScreen;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdDestroyScreen;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdDefineGMRFB;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdBlitGMRFBToScreen;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdBlitScreenToGMRFB;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdAnnotationFill;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdAnnotationCopy;
#pragma pack(pop)

#pragma pack(push, 1)
SVGAFifoCmdDefineGMR2;
#pragma pack(pop)

SVGARemapGMR2Flags;

#pragma pack(push, 1)
SVGAFifoCmdRemapGMR2;
#pragma pack(pop)

#define SVGA_VRAM_MIN_SIZE
#define SVGA_VRAM_MIN_SIZE_3D
#define SVGA_VRAM_MAX_SIZE
#define SVGA_MEMORY_SIZE_MAX
#define SVGA_FIFO_SIZE_MAX
#define SVGA_GRAPHICS_MEMORY_KB_MIN
#define SVGA_GRAPHICS_MEMORY_KB_MAX_2GB
#define SVGA_GRAPHICS_MEMORY_KB_MAX_3GB
#define SVGA_GRAPHICS_MEMORY_KB_MAX_4GB
#define SVGA_GRAPHICS_MEMORY_KB_MAX_8GB
#define SVGA_GRAPHICS_MEMORY_KB_DEFAULT

#define SVGA_VRAM_SIZE_W2K

#if defined(VMX86_SERVER)
#define SVGA_VRAM_SIZE
#define SVGA_VRAM_SIZE_3D
#define SVGA_FIFO_SIZE
#define SVGA_FIFO_SIZE_3D
#define SVGA_MEMORY_SIZE_DEFAULT
#define SVGA_AUTODETECT_DEFAULT
#else
#define SVGA_VRAM_SIZE
#define SVGA_VRAM_SIZE_3D
#define SVGA_FIFO_SIZE
#define SVGA_FIFO_SIZE_3D
#define SVGA_MEMORY_SIZE_DEFAULT
#define SVGA_AUTODETECT_DEFAULT
#endif

#define SVGA_FIFO_SIZE_GBOBJECTS
#define SVGA_VRAM_SIZE_GBOBJECTS

#endif