summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/linux/lnx_video.c
AgeCommit message (Collapse)AuthorFilesLines
2012-09-20linux: Make failure to iopl non-fatalAdam Jackson1-5/+2
We load the driver list, then enable I/O, then call driver probe based on whether I/O enable succeeded. That's bad, because the loaded security policy might forbid port access. We happen to treat that as fatal for some reason, which means even drivers that don't need I/O access (like kms and fbdev) don't get the chance to run. Facepalm. How about we just make that non-fatal instead, that sounds like a much better plan. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-09-20linux: Refactor xf86{En,Dis}ableIOAdam Jackson1-34/+48
Pull platform methods into their own sections for legibility, and rewrite the ifdefs to be more concise. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-03-21Introduce a consistent coding styleKeith Packard1-408/+400
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-11-18xfree86: Fix powerpc build with -Werror=int-to-pointer-cast ↵Jeremy Huddleston1-4/+4
-Werror=pointer-to-int-cast memType is a uint64_t on powerpc. Using memType only really makes sense for *physical* addresses, which can be 64-bit for 32-bit systems running on 64-bit hardware. However, unmapVidMem() only deals with *virtual* addresses, which are guaranteed to fit into an uintptr_t. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2011-10-29Move check definition MAP_FAILED in xf86_OSlib.hAlexandr Shadchin1-4/+0
Also remove odd definition MAP_FAILED. Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-12-31XFree86: Linux: AGP: Fix void-pointer-arithmetic warningDaniel Stone1-1/+1
Cast it to a char *, mimicking the return immediately below it. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2010-11-10Do not trap access to timer and keyboardSamuel Thibault1-0/+2
Disable timer/keyboard trapping on GNU/Hurd for now Trapping disabled for now, as some VBIOSes (mga-g450 notably) use these ports, and the int10 wrapper is not emulating them. It's effectively what happens in the Linux variant too, as iopl() is used there, making the ioperm() meaningless. Signed-off-by: Olaf Buddenhagen <antrik@users.sf.net> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23xfree86: nds32: add nds32 definition for support linux video related io.Macpaul Lin1-2/+3
Add __nds32__ definitions for supporing correct io method for lnx_video.c Signed-off-by: Macpaul Lin <macpaul@andestech.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-5/+5
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-11-16Use glibc's in/out routinesMatt Turner1-8/+4
Let's let glibc do the right thing for dense/sparse selection. The _alpha_iobase code has been unused since the switch to libpciaccess. It really should have been killed by fba700f1f6a8976. Signed-off-by: Matt Turner <mattst88@gmail.com> Tested-by: Michael Cree <mcree@orcon.net.nz> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-06Remove lnx_font.c and lnx.hMatt Turner1-1/+0
I couldn't find any version of the X xserver that ever used lnx_font.c so let's delete it. I tried contacting its author, Egbert, multiple times on IRC and email [*] but never got any response. It also hasn't been seriously touched since January 2005. [*] http://lists.x.org/archives/xorg-devel/2009-October/002855.html Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-08Resource leakage: 0 is a valid file descriptorMartin Ettl1-1/+1
When testing if an fd is valid, the required construct is >= 0, not > 0. [Daniel: Fixed up the Linux MTRR case as well.] Signed-off-by: Martin Ettl <ettl.martin@gmx.de> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-05-16xfree86: Remove superfluous ifdef DEBUG checks.Peter Hutterer1-14/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-12/+12
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
2008-11-24Remove xf86{En,Dis}ableInterrupts entirelyAdam Jackson1-18/+0
2008-11-24Remove the remnants of Jensen supportAdam Jackson1-188/+1
As being an EISA-only machine, and as ISA support is gone now...
2008-07-17Dead code removalDaniel Stone1-10/+0
Remove a whole bunch of code that was never built, be it entire files or just dead ifdefs.
2008-04-30Add M32R architecture support (bug #10020)Kazuhiro Inaoka1-2/+2
Still needs autotools support, so this won't actually _build_: it's just a starting point.
2008-01-22There is no such thing as /dev/cpu/mtrr.Adam Jackson1-10/+1
2007-08-21Fix an error message to not point to @xfree86.org.Adam Jackson1-1/+1
2007-06-29Death to RCS tags.Adam Jackson1-1/+0
2007-06-18Make xf86{En,Dis}ableInterrupts no-ops on Linux.Adam Jackson1-57/+5
2007-06-18Compile fixes for Linux ARM platforms.Lennart Buytenhek1-2/+3
2007-05-28Fixes for s390Bastian Blank1-1/+1
2006-08-12xfree86: don't do legacy IO on ARM or S/390 (Debian #362641)Bastian Blank1-8/+8
Don't attempt to poke legacy IO ranges on ARM or S/390.
2006-07-21Remove RCS tags. Fix Xprint makefile braindamage.Adam Jackson1-2/+0
2006-03-25Mark everything in xf86sym.c as _X_EXPORT.Adam Jackson1-15/+15
2005-09-19#include "xf86Axp.h" -> "shared/xf86Axp.h" for modular build. (Stefaan DeAlan Coopersmith1-1/+2
Roeck)
2005-08-26Better error message on failure to set iopl. (Debian #021)Daniel Stone1-4/+10
2005-07-03Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.Daniel Stone1-0/+4
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings. Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all source files in the xserver/xorg tree, predicated on defines of HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to <X11/fonts/foo.h>.
2005-05-15Bug 2750: Prevent mtrr_remove_offending from ending up in an endless loopThomas Hellstrom1-3/+2
if the offending region refuses to be removed.
2005-04-20Fix includes right throughout the Xserver tree:Daniel Stone1-1/+1
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h; change "foo.h", "extensions/foo.h" and "X11/foo.h" to <X11/extensions/foo.h> for extension headers, e.g. Xv.h; change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
2005-03-23Bugzilla #2750 (https://bugs.freedesktop.org/show_bug.cgi?id=2750)Thomas Hellstrom1-24/+66
Linux-only fixes: Fix case where a smaller write-combining region blocks write-combining setting of the whole frame buffer. Fix bug in wc setting code when regions are first splitted and setting of write-combining then fails.
2005-01-28Modifying X.Org Xserver DDX to allow to run X with ordinary userEgbert Eich1-6/+10
permissions when no access to HW registers is required. For API changes which mostly involve the modifications to make the RRFunc (introduced with 6.8) more flexible please check Bugzilla #2407. NOTE: This patch applies changes to OS specific files for other OSes which I cannot test.
2004-08-02Mon Aug 2 21:49:33 2004 Soeren Sandmann <sandmann@redhat.com>Søren Sandmann Pedersen1-2/+2
Remove double cast.
2004-06-16DRI XFree86-4_3_99_12-merge importDRI-XFree86-4_3_99_12-mergeEric Anholt1-1/+1
2004-04-23Merging XORG-CURRENT into trunkEgbert Eich1-1/+1
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich1-1/+1
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0Egbert Eich1-1/+1
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich1-1/+1
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich1-1/+1
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16Kaleb Keithley1-19/+36
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley1-454/+916
2003-11-14R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley1-0/+634