vboxvideo_15.c revision 5bcafe3775d64fbbdc14fb955c6797f068cadc59
0N/A * available from http://www.virtualbox.org. This file is free software;
0N/A * Clara, CA 95054 USA or visit http://www.sun.com if you need
0N/A * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com)
#ifdef DEBUG_michael
#ifdef DEBUG_VIDEO
#define TRACE \
#define TRACE2 \
#define TRACE3(...) \
#define TRACE do { } while(0)
#define TRACE2 do { } while(0)
#define TRACE3(...) do { } while(0)
#include "xorg-server.h"
#include "vboxvideo.h"
#include "version-generated.h"
#include <xf86.h>
#include "mipointer.h"
#include "mibstore.h"
#include "micmap.h"
#include "xf86cmap.h"
#include "extensions/dpms.h" */
#include "xf86Crtc.h"
#include "xf86Modes.h"
#ifndef PCIACCESS
char **argv);
int *indices,
enum GenericTypes
#ifdef PCIACCESS
#ifdef PCIACCESS
NULL,
NULL,
NULL,
#ifdef PCIACCESS
static VBOXPtr
hw/xfree86/modes/xf86Crtc.h and hw/xfree86/modes/xf86Modes.h in the
static Bool
"VirtualBox only supports virtual screen widths which are a multiple of 8. Rounding down from %d to %d\n",
"Unable to set up a virtual screen size of %dx%d with %d Kb of video memory. Please increase the video memory size.\n",
if (rc) {
if (rc) {
if (rc) {
return rc;
static Bool
static Bool
(void) mode;
return TRUE;
{ (void) crtc; }
(void) mode;
{ (void) output; }
return rc;
static Bool
static xf86OutputStatus
(void) output;
return XF86OutputStatusConnected;
if (isPreferred)
static DisplayModePtr
bool rc;
if (!rc || (0 == x) || (0 == y))
if (rc && (0 != x) && (0 != y)) {
/* Also report any modes the user may have requested in the xorg.conf
return pModes;
#ifdef RANDR_12_INTERFACE
static Bool
#ifdef RANDR_12_INTERFACE
static const char *fbSymbols[] = {
static const char *shadowfbSymbols[] = {
static const char *vbeSymbols[] = {
static const char *ramdacSymbols[] = {
#ifdef XFree86LOADER
static pointer
if (!Initialised)
#ifdef PCIACCESS
NULL);
if (ErrorMajor)
return (NULL);
static const OptionInfoRec *
return (VBOXOptions);
#ifdef PCIACCESS
static Bool
#ifndef PCIACCESS
static Bool
int numDevSections;
&devSections)) <= 0)
return (FALSE);
if (xf86GetPciVideoInfo()) {
int numUsed;
int *usedChips;
if (numUsed > 0) {
for (i = 0; i < numUsed; i++) {
return (foundScreen);
static Bool
return (FALSE);
return (FALSE);
return (FALSE);
#ifndef PCIACCESS
return FALSE;
return FALSE;
return (FALSE);
return FALSE;
&iDisplay)
return FALSE;
return FALSE;
return FALSE;
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
static Bool
unsigned flags;
#ifdef PCIACCESS
return (FALSE);
return (FALSE);
return (FALSE);
if (!miSetPixmapDepths())
return (FALSE);
return (FALSE);
return FALSE;
return FALSE;
return (FALSE);
return (FALSE);
return (TRUE);
static Bool
bool rc;
return rc;
static Bool
static ModeStatus
static int warned = 0;
if (!warned) {
return MODE_NOMODE;
return ret;
static Bool
return rc;
static Bool
if (rc)
return rc;
static Bool
#ifdef PCIACCESS
return rc;
#ifdef PCIACCESS
int i, idx;
#define VBOXDACDelay() \
for (i = 0; i < numColors; i++) {
VBOXDACDelay();
VBOXDACDelay();
VBOXDACDelay();
VBOXDACDelay();
* Just adapted from the std* functions in vgaHW.c
if (start) {
if (cont)
if (cont)
if (rc)
if (rc)
return rc;