/*
*
* 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,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) 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.
*/
/*
* Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting documentation, and
* that the name of Marc Aurele La France not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. Marc Aurele La France makes no representations
* about the suitability of this software for any purpose. It is provided
* "as-is" without express or implied warranty.
*
* MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
* EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <stdio.h>
#include "radeon.h"
#include "radeon_probe.h"
#include "radeon_version.h"
#include "xf86.h"
#include "xf86_OSproc.h"
#include "efb.h"
#include "fb.h"
#ifdef XSERVER_LIBPCIACCESS
#include "pciaccess.h"
#endif
/* Module loader interface for subsidiary driver module */
{
{0, 0, 0, 0}
};
/*
* EFBSetup --
*
* This function is called every time the module is loaded.
*/
static pointer
(
int *ErrorMajor,
int *ErrorMinor
)
{
if (!Inited) {
}
}
/* The following record must be called efbModuleData */
{
};
#ifndef XSERVER_LIBPCIACCESS
{
int status;
int i;
int bar;
!= -1) {
// TODO: need to fill in the complete structure
//
for (i = 0; i < 6; i++) {
if (bar != 0) {
if (bar & PCI_MAP_IO) {
// TODO: size?
} else {
if (PCI_MAP_IS64BITMEM(bar)) {
if (i == 5) {
} else {
/* 64 bit architecture */
++i; /* Step over the next BAR */
}
}
}
}
}
}
return pciInfo;
}
#else
/*
* These defines are from the xorg 1.3 xf86pci.h
*/
#define PCI_MAP_IS64BITMEM(b) \
(((b) & PCI_MAP_MEMORY_TYPE) == PCI_MAP_MEMORY_TYPE_64BIT)
#define PCIGETMEMORY64(b) \
{
int status;
int i;
int bar;
!= -1) {
// TODO: need to fill in the complete structure
//
for (i = 0; i < 6; i++) {
if (bar != 0) {
if (PCI_MAP_IS_IO(bar)) {
} else {
if (PCI_MAP_IS64BITMEM(bar)) {
++i; /* Step over the next BAR */
} else {
}
}
}
}
}
return pciInfo;
}
#endif
{
int BUS_BASE = 0;
int fdd;
int prot;
unsigned long realSize;
int pageSize;
pageSize = getpagesize();
printf("base: %lx, realBase: %lx, alignOff: %lx \n",
if (flags & VIDMEM_READONLY) {
} else {
}
if (memBase == MAP_FAILED) {
printf("RADEONMapVidMem: Could not map framebuffer\n");
return NULL;
}
}
void
{
return;
}
void
{
int status;
} else {
}
}
void
{
//
// disable RANDR
//
}
}
void
{
}
{
//
// force detail timing to be the preferred one
//
}
}
return (xf86OutputGetEDIDModes(output));
}
{
//
// display modes have precedence
//
int mm;
char *modes;
} else {
done = 0;
} else {
}
}
}
}
if (found && preferredMode) {
while (dModes) {
(dModes != preferredMode)) {
}
}
}
}
return(pModes);
}
3/4, /* 4:3 AR */
4/5, /* 5:4 AR */
9/16 /* 16:9 AR */
};
{
int i, status;
unsigned int length;
unsigned char *data;
if (status == -1) {
return strdup(efb_default_mode);
}
if (status == -1) {
return strdup(efb_default_mode);
}
}
}
}
{
int o;
OptionInfoRec *p;
int first = 0;
if (swap) {
first = 1;
second = 0;
}
for (o = 0; o < 2; o++) {
if (!p->found) {
}
}
}
}
}
{
char *str;
doubleWide = TRUE;
}
doubleHigh = TRUE;
}
// do the output configuration here only if dual display is enabled
return;
}
char *outputOrder;
}
}
int mm;
char *modes;
found = 1;
}
}
} else {
}
//
// check for stream offset
//
if (doubleWide == TRUE) {
if (offset != 0) {
}
} else {
if (offset != 0) {
}
}
//
// if display virtual dimension is specified in xorg.conf, leave it alone
//
if (doubleWide) {
} else if (doubleHigh) {
}
}
}
}