Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lafenghu
xf86-video-chips
xf86-video-chips-git-fixes.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xf86-video-chips-git-fixes.patch of Package xf86-video-chips
From 5f8a7320123255408b393eab9ecfae783920622a Mon Sep 17 00:00:00 2001 From: Mark Kettenis <kettenis@openbsd.org> Date: Mon, 26 Sep 2011 19:26:26 +0000 Subject: PciTag is unused when using libpciaccess Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Julien Cristau <jcristau@debian.org> --- diff --git a/src/ct_driver.h b/src/ct_driver.h index 10a24d4..39eeb6e 100644 --- a/src/ct_driver.h +++ b/src/ct_driver.h @@ -271,7 +271,9 @@ typedef struct { typedef struct _CHIPSRec { pciVideoPtr PciInfo; +#ifndef XSERVER_LIBPCIACCESS PCITAG PciTag; +#endif int Chipset; EntityInfoPtr pEnt; IOADDRESS PIOBase; -- cgit v0.9.0.2-2-gbebe From 94a8b34528b42a4fe6f81c8b8bd1ddb6bebaeea9 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed, 19 Oct 2011 06:04:32 +0000 Subject: util: Consolidate common macros Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> --- diff --git a/util/dRegs.c b/util/dRegs.c index b7edc8f..0d2f0cb 100644 --- a/util/dRegs.c +++ b/util/dRegs.c @@ -1,63 +1,8 @@ - - - - - - -#ifdef __NetBSD__ -# include <sys/types.h> -# include <machine/pio.h> -# include <machine/sysarch.h> -#else -# if defined(SVR4) && defined(i386) -# include <sys/types.h> -# ifdef NCR - /* broken NCR <sys/sysi86.h> */ -# define __STDC -# include <sys/sysi86.h> -# undef __STDC -# else -# include <sys/sysi86.h> -# endif -# ifdef SVR4 -# if !defined(sun) -# include <sys/seg.h> -# endif -# endif -# include <sys/v86.h> -# if defined(sun) -# include <sys/psw.h> -# endif -# endif -# include "AsmMacros.h" -#endif /* NetBSD */ - #include <unistd.h> #include <stdio.h> #include <stdlib.h> -#ifdef __NetBSD__ -# define SET_IOPL() i386_iopl(3) -# define RESET_IOPL() i386_iopl(0) -#else -# if defined(SVR4) && defined(i386) -# ifndef SI86IOPL -# define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL) -# define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0) -# else -# define SET_IOPL() sysi86(SI86IOPL,3) -# define RESET_IOPL() sysi86(SI86IOPL,0) -# endif -# else -# ifdef linux -# define SET_IOPL() iopl(3) -# define RESET_IOPL() iopl(0) -# else -# define SET_IOPL() (void)0 -# define RESET_IOPL() (void)0 -# endif -# endif -#endif +#include "iopl.h" int main(void) { diff --git a/util/iopl.h b/util/iopl.h new file mode 100644 index 0000000..d7890b3 --- a/dev/null +++ b/util/iopl.h @@ -0,0 +1,54 @@ +#ifdef __NetBSD__ +# include <sys/types.h> +# include <machine/pio.h> +# include <machine/sysarch.h> +#else +# if defined(SVR4) && defined(i386) +# include <sys/types.h> +# ifdef NCR + /* broken NCR <sys/sysi86.h> */ +# define __STDC +# include <sys/sysi86.h> +# undef __STDC +# else +# include <sys/sysi86.h> +# endif +# ifdef SVR4 +# if !defined(sun) +# include <sys/seg.h> +# endif +# endif +# include <sys/v86.h> +# if defined(sun) +# include <sys/psw.h> +# endif +# endif +# include "AsmMacros.h" +#endif /* NetBSD */ + +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> + +#ifdef __NetBSD__ +# define SET_IOPL() i386_iopl(3) +# define RESET_IOPL() i386_iopl(0) +#else +# if defined(SVR4) && defined(i386) +# ifndef SI86IOPL +# define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL) +# define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0) +# else +# define SET_IOPL() sysi86(SI86IOPL,3) +# define RESET_IOPL() sysi86(SI86IOPL,0) +# endif +# else +# ifdef linux +# define SET_IOPL() iopl(3) +# define RESET_IOPL() iopl(0) +# else +# define SET_IOPL() (void)0 +# define RESET_IOPL() (void)0 +# endif +# endif +#endif diff --git a/util/mRegs.c b/util/mRegs.c index f359738..843d01d 100644 --- a/util/mRegs.c +++ b/util/mRegs.c @@ -1,63 +1,8 @@ - - - - - - -#ifdef __NetBSD__ -# include <sys/types.h> -# include <machine/pio.h> -# include <machine/sysarch.h> -#else -# if defined(SVR4) && defined(i386) -# include <sys/types.h> -# ifdef NCR - /* broken NCR <sys/sysi86.h> */ -# define __STDC -# include <sys/sysi86.h> -# undef __STDC -# else -# include <sys/sysi86.h> -# endif -# ifdef SVR4 -# if !defined(sun) -# include <sys/seg.h> -# endif -# endif -# include <sys/v86.h> -# if defined(sun) -# include <sys/psw.h> -# endif -# endif -# include "AsmMacros.h" -#endif /* NetBSD */ - #include <unistd.h> #include <stdio.h> #include <stdlib.h> -#ifdef __NetBSD__ -# define SET_IOPL() i386_iopl(3) -# define RESET_IOPL() i386_iopl(0) -#else -# if defined(SVR4) && defined(i386) -# ifndef SI86IOPL -# define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL) -# define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0) -# else -# define SET_IOPL() sysi86(SI86IOPL,3) -# define RESET_IOPL() sysi86(SI86IOPL,0) -# endif -# else -# ifdef linux -# define SET_IOPL() iopl(3) -# define RESET_IOPL() iopl(0) -# else -# define SET_IOPL() (void)0 -# define RESET_IOPL() (void)0 -# endif -# endif -#endif +#include "iopl.h" int hex2int(char* str); diff --git a/util/modClock.c b/util/modClock.c index 89a291a..45af19b 100644 --- a/util/modClock.c +++ b/util/modClock.c @@ -1,61 +1,12 @@ - -#ifdef __NetBSD__ -# include <sys/types.h> -# include <machine/pio.h> -# include <machine/sysarch.h> -#else -# if defined(SVR4) && defined(i386) -# include <sys/types.h> -# ifdef NCR - /* broken NCR <sys/sysi86.h> */ -# define __STDC -# include <sys/sysi86.h> -# undef __STDC -# else -# include <sys/sysi86.h> -# endif -# ifdef SVR4 -# if !defined(sun) -# include <sys/seg.h> -# endif -# endif -# include <sys/v86.h> -# if defined(sun) -# include <sys/psw.h> -# endif -# endif -# include "AsmMacros.h" -#endif /* NetBSD */ - #include <unistd.h> #include <stdio.h> #include <stdlib.h> + #ifndef Lynx #include <fnmatch.h> #endif -#ifdef __NetBSD__ -# define SET_IOPL() i386_iopl(3) -# define RESET_IOPL() i386_iopl(0) -#else -# if defined(SVR4) && defined(i386) -# ifndef SI86IOPL -# define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL) -# define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0) -# else -# define SET_IOPL() sysi86(SI86IOPL,3) -# define RESET_IOPL() sysi86(SI86IOPL,0) -# endif -# else -# ifdef linux -# define SET_IOPL() iopl(3) -# define RESET_IOPL() iopl(0) -# else -# define SET_IOPL() (void)0 -# define RESET_IOPL() (void)0 -# endif -# endif -#endif +#include "iopl.h" #define tolerance 0.01 /* +/- 1% */ -- cgit v0.9.0.2-2-gbebe From c421f2477c99990d0dc712d6aece981fa6c961e5 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed, 19 Oct 2011 06:09:09 +0000 Subject: Fix implicit declaration of iopl warning: implicit declaration of function ‘iopl’ [-Wimplicit-function-declaration] Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> --- diff --git a/util/iopl.h b/util/iopl.h index d7890b3..e08207c 100644 --- a/util/iopl.h +++ b/util/iopl.h @@ -3,6 +3,12 @@ # include <machine/pio.h> # include <machine/sysarch.h> #else +# if defined(__linux__) +/* Can't because <sys/iopl.h> provides conflicting inb, outb, etc + * # include <sys/io.h> + */ +int iopl(int level); +# endif # if defined(SVR4) && defined(i386) # include <sys/types.h> # ifdef NCR -- cgit v0.9.0.2-2-gbebe From 8a5ea07f30cc71ecc413fad0713facff72f77472 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed, 19 Oct 2011 06:21:33 +0000 Subject: Build fix for ABI Version 12 ABI Version 12 removes support for multiple PCI domains. If you need to use this driver on a system with more than one PCI domain, you should either port this driver to using libpciaccess directly or stick with an older server. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> --- diff --git a/src/ct_driver.c b/src/ct_driver.c index e6538c6..a2e5c94 100644 --- a/src/ct_driver.c +++ b/src/ct_driver.c @@ -1446,7 +1446,12 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int flags) hwp = VGAHWPTR(pScrn); vgaHWGetIOBase(hwp); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 cPtr->PIOBase = hwp->PIOOffset; +#else + cPtr->PIOBase = 0; +#endif + /* * Must allow ensure that storage for the 2nd set of vga registers is * allocated for dual channel cards diff --git a/src/ct_driver.h b/src/ct_driver.h index 39eeb6e..9033867 100644 --- a/src/ct_driver.h +++ b/src/ct_driver.h @@ -276,8 +276,8 @@ typedef struct _CHIPSRec { #endif int Chipset; EntityInfoPtr pEnt; - IOADDRESS PIOBase; - CARD32 IOAddress; + unsigned long PIOBase; + unsigned long IOAddress; unsigned long FbAddress; unsigned int IOBase; unsigned char * FbBase; -- cgit v0.9.0.2-2-gbebe From 989cf4f1fb2ac57f38d363734b71a5cf749db146 Mon Sep 17 00:00:00 2001 From: Adam Jackson <ajax@redhat.com> Date: Mon, 19 Dec 2011 22:45:41 +0000 Subject: Fix for new vgaHW ABI Signed-off-by: Adam Jackson <ajax@redhat.com> --- diff --git a/src/ct_driver.c b/src/ct_driver.c index 95092a2..08ccd72 100644 --- a/src/ct_driver.c +++ b/src/ct_driver.c @@ -1444,6 +1444,7 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int flags) return FALSE; hwp = VGAHWPTR(pScrn); + vgaHWSetStdFuncs(hwp); vgaHWGetIOBase(hwp); #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 cPtr->PIOBase = hwp->PIOOffset; -- cgit v0.9.0.2-2-gbebe
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor