summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2006-09-28 09:09:27 -0600
committerJordan Crouse <jordan.crouse@amd.com>2006-09-28 09:24:59 -0600
commit2979196dae5615f2a78ace891d4ad6dd98c8fe6e (patch)
treeba2fad4179c2efa79b8004294236ac9b26461aff /src
parent45eeb43888e92e2736d9b678ce6d67fb99449800 (diff)
Update for 7.2 - fix config.h and other include problems.
This closes bug 8290 by applying the patch from Andres Salomon.
Diffstat (limited to 'src')
-rw-r--r--src/amd_driver.c14
-rw-r--r--src/amd_gx_cursor.c4
-rw-r--r--src/amd_gx_dga.c4
-rw-r--r--src/amd_gx_driver.c8
-rw-r--r--src/amd_gx_regacc.c4
-rw-r--r--src/amd_gx_shadow.c4
-rw-r--r--src/amd_gx_vga.c4
-rw-r--r--src/amd_lx_accel.c14
-rw-r--r--src/amd_lx_cursor.c4
-rw-r--r--src/amd_lx_dga.c4
-rw-r--r--src/amd_lx_driver.c8
-rw-r--r--src/amd_lx_regacc.c4
-rw-r--r--src/amd_lx_shadow.c4
-rw-r--r--src/amd_lx_video.c5
-rw-r--r--src/cimarron.c4
-rw-r--r--src/durango.c230
-rw-r--r--src/gfx/gfx_msr.c4
-rw-r--r--src/panel.c14
-rw-r--r--src/panel/panel.c1
-rw-r--r--src/panel/platform.c8
-rw-r--r--src/z4l.c13
21 files changed, 92 insertions, 267 deletions
diff --git a/src/amd_driver.c b/src/amd_driver.c
index 4e2c2d1..5f6c3d0 100644
--- a/src/amd_driver.c
+++ b/src/amd_driver.c
@@ -35,6 +35,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/* Includes that are used by all drivers */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -80,14 +84,14 @@
/* Check for some extensions */
#ifdef XFreeXDGA
#define _XF86_DGA_SERVER_
-#include "extensions/xf86dgastr.h"
+#include <X11/extensions/xf86dgastr.h>
#endif /* XFreeXDGA */
#ifdef DPMSExtension
#include "globals.h"
#include "opaque.h"
#define DPMS_SERVER
-#include "extensions/dpms.h"
+#include <X11/extensions/dpms.h>
#endif /* DPMSExtension */
/* A few things all drivers should have */
@@ -108,7 +112,7 @@ static int CPUDetected;
/* driver record contains the functions needed by the server after loading
* the driver module.
*/
-DriverRec AMD = {
+_X_EXPORT DriverRec AMD = {
AMD_VERSION_CURRENT,
AMD_DRIVER_NAME,
AmdIdentify,
@@ -300,8 +304,6 @@ const char *amdShadowSymbols[] = {
static MODULESETUPPROTO(AmdSetup);
-#define XORG_VERSION_CURRENT (((7) * 10000000) + ((1) * 100000) + ((0) * 1000) + 0)
-
static XF86ModuleVersionInfo AmdVersionRec = {
"amd",
MODULEVENDORSTRING,
@@ -322,7 +324,7 @@ static XF86ModuleVersionInfo AmdVersionRec = {
* This data is accessed by the loader. The name must be the module name
* followed by "ModuleInit".
*/
-XF86ModuleData amdModuleData = { &AmdVersionRec, AmdSetup, NULL };
+_X_EXPORT XF86ModuleData amdModuleData = { &AmdVersionRec, AmdSetup, NULL };
/*-------------------------------------------------------------------------
* AmdSetup.
diff --git a/src/amd_gx_cursor.c b/src/amd_gx_cursor.c
index b7fdb1e..3630482 100644
--- a/src/amd_gx_cursor.c
+++ b/src/amd_gx_cursor.c
@@ -30,6 +30,10 @@
* Project: Geode Xfree Frame buffer device driver.
* */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86_ansic.h"
diff --git a/src/amd_gx_dga.c b/src/amd_gx_dga.c
index c45c72f..2212962 100644
--- a/src/amd_gx_dga.c
+++ b/src/amd_gx_dga.c
@@ -32,6 +32,10 @@
* Project: Geode Xfree Frame buffer device driver.
* */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86_ansic.h"
diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c
index 00ff8d4..4691a58 100644
--- a/src/amd_gx_driver.c
+++ b/src/amd_gx_driver.c
@@ -33,6 +33,10 @@
* Project: Geode Xfree Frame buffer device driver.
* */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/* Includes that are used by all drivers */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -87,14 +91,14 @@
/* Check for some extensions */
#ifdef XFreeXDGA
#define _XF86_DGA_SERVER_
-#include "extensions/xf86dgastr.h"
+#include <X11/extensions/xf86dgastr.h>
#endif /* XFreeXDGA */
#ifdef DPMSExtension
#include "globals.h"
#include "opaque.h"
#define DPMS_SERVER
-#include "extensions/dpms.h"
+#include <X11/extensions/dpms.h>
#endif /* DPMSExtension */
#include "amd_gx_vga.c"
diff --git a/src/amd_gx_regacc.c b/src/amd_gx_regacc.c
index 7dc3339..cd1b429 100644
--- a/src/amd_gx_regacc.c
+++ b/src/amd_gx_regacc.c
@@ -37,6 +37,10 @@
* developer is willing to tune the file again for the specific project.
* */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "gfx_rtns.h"
#include "gfx_defs.h"
#include "gfx_regs.h"
diff --git a/src/amd_gx_shadow.c b/src/amd_gx_shadow.c
index feba8aa..41f4a5b 100644
--- a/src/amd_gx_shadow.c
+++ b/src/amd_gx_shadow.c
@@ -30,6 +30,10 @@
* Project: Geode Xfree Frame buffer device driver.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
diff --git a/src/amd_gx_vga.c b/src/amd_gx_vga.c
index 2cb4adb..2fbe2de 100644
--- a/src/amd_gx_vga.c
+++ b/src/amd_gx_vga.c
@@ -29,6 +29,10 @@
* to SoftVGA registers. It works for both VSA1 and VSA2.
* */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/* VGA STRUCTURE */
#define GU2_STD_CRTC_REGS 25
diff --git a/src/amd_lx_accel.c b/src/amd_lx_accel.c
index 9daefdf..3b65136 100644
--- a/src/amd_lx_accel.c
+++ b/src/amd_lx_accel.c
@@ -31,6 +31,10 @@
* Project: Geode Xfree Frame buffer device driver.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/* Xfree86 header files */
#include "vgaHW.h"
@@ -43,16 +47,6 @@
#include "xaarop.h"
#include "amd.h"
-#undef ulong
-typedef unsigned long ulong;
-
-#undef uint
-typedef unsigned int uint;
-
-#undef ushort
-typedef unsigned short ushort;
-
-#undef uchar
typedef unsigned char uchar;
#if DEBUGLVL>0
diff --git a/src/amd_lx_cursor.c b/src/amd_lx_cursor.c
index c3f72f2..5417d4b 100644
--- a/src/amd_lx_cursor.c
+++ b/src/amd_lx_cursor.c
@@ -32,6 +32,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86_ansic.h"
diff --git a/src/amd_lx_dga.c b/src/amd_lx_dga.c
index 02320ec..775d3f4 100644
--- a/src/amd_lx_dga.c
+++ b/src/amd_lx_dga.c
@@ -35,6 +35,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86_ansic.h"
diff --git a/src/amd_lx_driver.c b/src/amd_lx_driver.c
index 26c0383..9a2146a 100644
--- a/src/amd_lx_driver.c
+++ b/src/amd_lx_driver.c
@@ -35,6 +35,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/* Includes that are used by all drivers */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -82,14 +86,14 @@
/* Check for some extensions */
#ifdef XFreeXDGA
#define _XF86_DGA_SERVER_
-#include "extensions/xf86dgastr.h"
+#include <X11/extensions/xf86dgastr.h>
#endif /* XFreeXDGA */
#ifdef DPMSExtension
#include "globals.h"
#include "opaque.h"
#define DPMS_SERVER
-#include "extensions/dpms.h"
+#include <X11/extensions/dpms.h>
#endif /* DPMSExtension */
#include "amd_lx_vga.c"
diff --git a/src/amd_lx_regacc.c b/src/amd_lx_regacc.c
index 9ca4464..2acf5ce 100644
--- a/src/amd_lx_regacc.c
+++ b/src/amd_lx_regacc.c
@@ -38,6 +38,10 @@
* developer is willing to tune the file again for the specific project.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "cim_defs.h"
extern unsigned char *cim_vid_ptr;
diff --git a/src/amd_lx_shadow.c b/src/amd_lx_shadow.c
index 0e251ee..8440c4e 100644
--- a/src/amd_lx_shadow.c
+++ b/src/amd_lx_shadow.c
@@ -31,6 +31,10 @@
* Project: Geode Xfree Frame buffer device driver.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
diff --git a/src/amd_lx_video.c b/src/amd_lx_video.c
index 924269e..a0836b0 100644
--- a/src/amd_lx_video.c
+++ b/src/amd_lx_video.c
@@ -35,6 +35,11 @@
* Fixes & Extensions to support Y800 greyscale modes
* Alan Hourihane <alanh@fairlite.demon.co.uk>
*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#ifndef AMD_V4L2_VIDEO
#include "xf86.h"
#include "xf86_OSproc.h"
diff --git a/src/cimarron.c b/src/cimarron.c
index 80cb04a..76d8615 100644
--- a/src/cimarron.c
+++ b/src/cimarron.c
@@ -29,6 +29,10 @@
* and included in any Cimarron-based project.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/*----------------------------------------------------------------------*/
/* MODULE SETTINGS */
/* The following #defines affect which modules are included in the */
diff --git a/src/durango.c b/src/durango.c
index 857e65e..9fcfa6f 100644
--- a/src/durango.c
+++ b/src/durango.c
@@ -37,6 +37,10 @@
* developer is willing to tune the file again for the specific project.
* */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/* COMPILER OPTIONS
* These compiler options specify how the Durango routines are compiled
* for the different hardware platforms. For best performance, a driver
@@ -202,182 +206,9 @@ unsigned char *gfx_phys_vipptr = (unsigned char *)0x40015000;
* (A project may define WRITE_REG32 to call a routine, for example).
*/
#include "gfx_defs.h" /* register access macros */
-
-/* IO MACROS AND ROUTINES
- * These macros must be defined before the initialization or I2C
- * routines will work properly.
- */
-
-#if defined(OS_WIN32) /* For Windows */
-
-/* VSA II CALL */
-
-void
-gfx_msr_asm_read(unsigned short msrReg, unsigned long msrAddr,
- unsigned long *ptrHigh, unsigned long *ptrLow)
-{
- unsigned long temp1, temp2;
-
- _asm {
- mov dx, 0x0AC1C
- mov eax, 0x0FC530007
- out dx, eax add dl, 2 mov ecx, msrAddr mov cx, msrReg in ax, dx;
- ;
- EDX:EAX will contain MSR contents.mov temp1, edx mov temp2, eax}
-
- *ptrHigh = temp1;
- *ptrLow = temp2;
-}
-
-void
-gfx_msr_asm_write(unsigned short msrReg, unsigned long msrAddr,
- unsigned long *ptrHigh, unsigned long *ptrLow)
-{
- unsigned long temp1 = *ptrHigh;
- unsigned long temp2 = *ptrLow;
-
- _asm {
- mov dx, 0x0AC1C mov eax, 0x0FC530007 out dx, eax i add dl, 2;
- ECX contains msrAddr | msrReg mov ecx, msrAddr mov cx, msrReg;
-
- <OR_mask_hi > mov ebx, temp1;
- <OR_mask_hi > mov eax, temp2;
- <AND_mask_hi > mov esi, 0;
- <AND_mask_lo > mov edi, 0;
- MSR is written at this point out dx, ax}
-}
-
-unsigned char
-gfx_inb(unsigned short port)
-{
- unsigned char data;
-
- _asm {
- pushf mov dx, port in al, dx mov data, al popf}
- return (data);
-}
-
-unsigned short
-gfx_inw(unsigned short port)
-{
- unsigned short data;
-
- _asm {
- pushf mov dx, port in ax, dx mov data, ax popf}
- return (data);
-}
-
-unsigned long
-gfx_ind(unsigned short port)
-{
- unsigned long data;
-
- _asm {
- pushf mov dx, port in eax, dx mov data, eax popf}
- return (data);
-}
-
-void
-gfx_outb(unsigned short port, unsigned char data)
-{
- _asm {
- pushf mov al, data mov dx, port out dx, al popf}
-}
-
-void
-gfx_outw(unsigned short port, unsigned short data)
-{
- _asm {
- pushf mov ax, data mov dx, port out dx, ax popf}
-}
-
-void
-gfx_outd(unsigned short port, unsigned long data)
-{
- _asm {
- pushf mov eax, data mov dx, port out dx, eax popf}
-}
-
-#elif defined(OS_VXWORKS) || defined (OS_LINUX) /* VxWorks and Linux */
-
-extern unsigned long amd_asm_msr_vsa_rd(unsigned long, unsigned long *,
- unsigned long *);
-extern unsigned long amd_asm_msr_vsa_wr(unsigned long, unsigned long,
- unsigned long);
-
-void
-gfx_msr_asm_read(unsigned short msrReg, unsigned long msrAddr,
- unsigned long *ptrHigh, unsigned long *ptrLow)
-{
- unsigned long addr, val1, val2;
-
- addr = msrAddr | (unsigned long)msrReg;
- amd_asm_msr_vsa_rd(addr, &val2, &val1);
- *ptrHigh = val2;
- *ptrLow = val1;
-}
-
-void
-gfx_msr_asm_write(unsigned short msrReg, unsigned long msrAddr,
- unsigned long *ptrHigh, unsigned long *ptrLow)
-{
- unsigned long addr, val1, val2;
-
- val2 = *ptrHigh;
- val1 = *ptrLow;
- addr = (msrAddr & 0xFFFF0000) | (unsigned long)msrReg;
- amd_asm_msr_vsa_wr(addr, val2, val1);
-}
-
-unsigned char
-gfx_inb(unsigned short port)
-{
- unsigned char value;
- __asm__ volatile ("inb %1,%0":"=a" (value):"d"(port));
-
- return value;
-}
-
-unsigned short
-gfx_inw(unsigned short port)
-{
- unsigned short value;
- __asm__ volatile ("in %1,%0":"=a" (value):"d"(port));
-
- return value;
-}
-
-unsigned long
-gfx_ind(unsigned short port)
-{
- unsigned long value;
- __asm__ volatile ("inl %1,%0":"=a" (value):"d"(port));
-
- return value;
-}
-
-void
-gfx_outb(unsigned short port, unsigned char data)
-{
- __asm__ volatile ("outb %0,%1"::"a" (data), "d"(port));
-}
-
-void
-gfx_outw(unsigned short port, unsigned short data)
-{
- __asm__ volatile ("out %0,%1"::"a" (data), "d"(port));
-}
-
-void
-gfx_outd(unsigned short port, unsigned long data)
-{
- __asm__ volatile ("outl %0,%1"::"a" (data), "d"(port));
-}
-
-#elif defined(XFree86Server)
-
#include <xf86_ansic.h>
#include <compiler.h>
+
#define INB(port) inb(port)
#define INW(port) inw(port)
#define IND(port) inl(port)
@@ -468,57 +299,6 @@ gfx_outd(unsigned short port, unsigned long data)
: "1"(msr | adr),"2"(*(high)),"3"(*(low))); \
}
-#else /* else nothing */
-
-unsigned char
-gfx_inb(unsigned short port)
-{
- /* ADD OS SPECIFIC IMPLEMENTATION */
- return (0);
-}
-
-unsigned short
-gfx_inw(unsigned short port)
-{
- /* ADD OS SPECIFIC IMPLEMENTATION */
- return (0);
-}
-
-unsigned long
-gfx_ind(unsigned short port)
-{
- /* ADD OS SPECIFIC IMPLEMENTATION */
- return (0);
-}
-
-void
-gfx_outb(unsigned short port, unsigned char data)
-{
- /* ADD OS SPECIFIC IMPLEMENTATION */
-}
-
-void
-gfx_outw(unsigned short port, unsigned short data)
-{
- /* ADD OS SPECIFIC IMPLEMENTATION */
-}
-
-void
-gfx_outd(unsigned short port, unsigned long data)
-{
- /* ADD OS SPECIFIC IMPLEMENTATION */
-}
-#endif
-
-#ifndef XFree86Server
-#define INB(port) gfx_inb(port)
-#define INW(port) gfx_inw(port)
-#define IND(port) gfx_ind(port)
-#define OUTB(port, data) gfx_outb(port, data)
-#define OUTW(port, data) gfx_outw(port, data)
-#define OUTD(port, data) gfx_outd(port, data)
-#endif
-
/* INITIALIZATION ROUTINES
* These routines are used during the initialization of the driver to
* perform such tasks as detecting the type of CPU and video hardware.
diff --git a/src/gfx/gfx_msr.c b/src/gfx/gfx_msr.c
index 3d48d3d..1705acb 100644
--- a/src/gfx/gfx_msr.c
+++ b/src/gfx/gfx_msr.c
@@ -36,6 +36,10 @@
* gfx_msr_write
* */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/* INCLUDE SUPPORT FOR REDCLOUD, IF SPECIFIED */
#if GFX_MSR_REDCLOUD
diff --git a/src/panel.c b/src/panel.c
index 55bfc98..31eb9e7 100644
--- a/src/panel.c
+++ b/src/panel.c
@@ -30,23 +30,15 @@
* Project: Geode Xfree Frame buffer device driver.
* */
-#if defined(linux) /* Linux */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#ifdef __KERNEL__
#include <linux/string.h>
#include <asm/io.h>
-#elif !defined(XFree86Server)
-
-#include <linux/fs.h>
-#include <asm/mman.h>
-
-#endif /* __KERNEL__ */
-#elif defined(_WIN32) /* windows */
-
-#include <windows.h>
-
#endif
#include "panel.h"
diff --git a/src/panel/panel.c b/src/panel/panel.c
index b581fa9..ffd54c9 100644
--- a/src/panel/panel.c
+++ b/src/panel/panel.c
@@ -38,6 +38,7 @@
#include <asm/io.h>
#elif !defined(XFree86Server)
+#error blah
#include <linux/fs.h>
#include <asm/mman.h>
diff --git a/src/panel/platform.c b/src/panel/platform.c
index 24012e3..46bb71b 100644
--- a/src/panel/platform.c
+++ b/src/panel/platform.c
@@ -30,6 +30,7 @@
* SubModule: Geode FlatPanel library
* */
+
#define LINUX_ROM_SEGMENT 0x000F
#define SEGMENT_LENGTH 0xFFFF
#define PAGE_LENGTH 0x1000
@@ -146,14 +147,7 @@ FindStringInSeg(unsigned int segment_address, char *string_ptr)
/* silence compiler */
(void)mem_ptr;
-#if defined(linux) && !defined(XFree86Server)
- XpressROMPtr = (unsigned char *)ioremap(mem_ptr, SEGMENT_LENGTH + 1);
- psegment_buf = (char *)XpressROMPtr;
-#elif defined (XFree86Server)
psegment_buf = (char *)XpressROMPtr;
-#elif defined(_WIN32) /* Windows */
- psegment_buf = XpressROMPtr;
-#endif
/* Now search for the first character of the string_ptr */
for (i = 0; i < SEGMENT_LENGTH + 1; i++) {
diff --git a/src/z4l.c b/src/z4l.c
index ae08c3e..c83c953 100644
--- a/src/z4l.c
+++ b/src/z4l.c
@@ -26,12 +26,17 @@
/* prototype Xv interface for lxv4l2 driver */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <sys/time.h>
#include <sys/fcntl.h>
#include <asm/ioctl.h>
#include <asm/ioctls.h>
#include "xf86.h"
+#include <X11/extensions/Xv.h>
#include "xf86_OSproc.h"
#include "xf86Resources.h"
#include "xf86_ansic.h"
@@ -784,7 +789,7 @@ static int
Z4lPutImage(ScrnInfoPtr pScrni, short src_x, short src_y, short drw_x,
short drw_y, short src_w, short src_h, short drw_w, short drw_h,
int id, unsigned char *buf, short width, short height,
- Bool sync, RegionPtr clipBoxes, pointer data)
+ Bool sync, RegionPtr clipBoxes, pointer data, DrawablePtr pDraw)
{
int fd, size;
int y_pitch, uv_pitch, offset1, offset2;
@@ -915,7 +920,7 @@ Z4lQueryImageAttributes(ScrnInfoPtr pScrni, int id, unsigned short *width,
static int
Z4lPutVideo(ScrnInfoPtr pScrni, short src_x, short src_y, short drw_x,
short drw_y, short src_w, short src_h, short drw_w, short drw_h,
- RegionPtr clipBoxes, pointer data)
+ RegionPtr clipBoxes, pointer data, DrawablePtr pDraw)
{
int id;
Z4lPortPrivRec *pPriv = (Z4lPortPrivRec *) data;
@@ -1697,7 +1702,7 @@ Z4lIdentify(int flags)
xf86Msg(X_INFO, "z4l driver for Video4Linux\n");
}
-DriverRec Z4l = {
+_X_EXPORT DriverRec Z4l = {
40001,
"z4l",
Z4lIdentify,
@@ -1719,7 +1724,7 @@ static XF86ModuleVersionInfo z4lVersRec = {
{0, 0, 0, 0}
};
-XF86ModuleData z4lModuleData = { &z4lVersRec, z4lSetup, NULL };
+_X_EXPORT XF86ModuleData z4lModuleData = { &z4lVersRec, z4lSetup, NULL };
static pointer
z4lSetup(pointer module, pointer opts, int *errmaj, int *errmin)