Remove the "inline" keyword from a bunch of big functions in the kernel with
the goal of shrinking it by 30kb to 40kb
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
These days ioctl32.h is only used for communication of fs/compat.c and
fs/compat_ioctl.c and doesn't contain anything of interest to drivers.
Remove inclusion in various drivers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
From: Andrew Morton <akpm@osdl.org>
drivers/char/drm/radeon_state.c: In function `radeon_cp_dispatch_texture':
drivers/char/drm/radeon_state.c:1653: warning: int format, different type arg
(arg 3)
drivers/char/drm/radeon_state.c:1661: warning: int format, different type arg
(arg 3)
drivers/char/drm/radeon_state.c:1689: warning: int format, different type arg
(arg 3)
sizeof() doesn't return an int.
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
From: Andrew Morton <akpm@osdl.org>
On alpha:
drivers/char/drm/via_dmablit.h:44: error: field `direction' has incomplete type
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
This patch pull in a lot of changes from CVS to the main core DRM,
and updates the radeon driver to 1.21.0 that supports r300 texrect
and radeon card type ioctl.
Signed-off-by: Dave Airlie <airlied@linux.ie>
In order to work on FreeBSD the gart needed to use a local mapping
This patch moves the mainline to the new code and aligns some comment
changes
From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
apply some whitespace cleanup and add wrappers for MTRR for OS calls
From: Eric Anholt <anholt@freebsd.org> + Dave Airlie <airlied@linux.ie>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Correct a LOR issue on FreeBSD by allocating temporary space and doing a single
DRM_COPY_FROM_USER rather than DRM_VERIFYAREA_READ followed by tons of
DRM_COPY_FROM_USER_UNCHECKED. I don't like the look of the temporary space
allocation, but I like the simplification in the rest of the file. Tested
with glxgears, tuxracer, and q3 on a savage4.
From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
This updates the DRM via driver to the latest CVS version, which contains
support for DMA blitting.
It also contains some whitespace and other minor fixes
From: Thomas Hellstrom <unichrome@shipmail.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
This reverts the series of commits
67dbb4ea33281ab031a847807ce381
that changed the GART VM start offset. It fixed some machines, but
seems to continually interact badly with some X versions.
Quoth Ben Herrenschmidt:
"So I think at this point, the best is that we keep the old bogus code
that at least is consistent with the bug in the server. I'm working on a
big patch to X that reworks the memory map stuff completely and fixes
those issues on the server side, I'll do a DRM patch matching this X fix
as well so that the memory map is only ever set in one place and with
what I hope is a correct algorithm..."
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
As reported by Jules Villard <jvillard@ens-lyon.fr> and some others, the
recent GART aperture start reconfiguration causes problems on some
setups.
What I _think_ might be happening is that the X server is also trying to
muck around with the card memory map and is forcing it back into a wrong
setting that also happens to no longer match what the DRM wants to do
and blows up. There are bugs all over the place in that code (and still
some bugs in the DRM as well anyway).
This patch attempts to avoid that by using the largest of the 2 values,
which I think will cause it to behave as it used to for you and will
still fix the problem with machines that have an aperture size smaller
than the video memory.
Acked-by: Jules Villard <jvillard@ens-lyon.fr>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fix a typo which breaks radeon drm compilation with gcc 2.95.3.
The offending line was added back in 2.6.11-rc3, but was harmless
back then. A recent addition nearby changed it into a compilation
breaker: commit 281ab031a8.
The doubled semi-colon ends up being an empty instruction, and the
variable declaration thus ends up being in the middle of "code".
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This finally fixes the radeon memory mapping bug that was incorrectly
fixed by the previous patch. This time, we use the actual vram size as
the size to calculate how far to move the AGP aperture from the
framebuffer in card's memory space.
If there are still issues with this patch, they are due to bugs in the X
driver that I'm working on fixing too.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ben noticed that on certain cards we've landed the AGP space on top of
the second aperture instead of after it.. Which messes things up a lot
on those machines.
This just moves the gart further out, a more correct fix is in the works
from Ben for after 2.6.15.
Signed-off-by: Dave Airlie <airlied@linux.ie>
CC: Ben Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This fixes a NULL pointer reference in DRM. The SiS driver tries to
allocate a big chunk of memory, but the return value is never checked.
Reported in Novell bugzilla #132271:
https://bugzilla.novell.com/show_bug.cgi?id=132271
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
A fix for a locking bug which is triggered when a client tries to lock with
flag DMA_QUIESCENT (typically the X server), but gets interrupted by a signal.
The locking IOCTL should then return an error, but if DMA_QUIESCENT succeeds
it returns 0, and the client falsely thinks it has the lock. In addition
The client waits for DMA_QUISCENT and possibly DMA_READY without having the lock.
From: Thomas Hellstrom
Signed-off-by: Dave Airlie <airlied@linux.ie>
We memset the structure across opens except for the flags. The correct
fix is more intrusive but this should fix a problem with bad iounmaps
seen on AGP radeons acting like PCI ones.
Signed-off-by: Dave Airlie <airlied@linux.ie>
The DRM only uses drm_alloc_pages for non-SG PCI cards using DRM.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
PCI->PCI bridge, then bus->self is allowed to be NULL. Certainly that's
the case on my Pegasos, and it makes the MGA DRM driver oops...
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Add PCI DMA blitengine to VIA DRM
Add portability code for porting VIA to FreeBSD.
Sync via_drm.h with 3d driver
From: Thomas Hellstrom <unichrome@shipmail.org>, Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Alan Hourihane wants to set MTRR in the DDX only as otherwise
we get problems with the shared memory chipset.
From: Alan Hourihane <alanh@fairlite.demon.co.uk>
Signed-off-by: Dave Airlie <airlied@linux.ie>
This simplifies the sysfs code for the drm and add a dri_library_name
attribute which can be used by a userspace app to figure out which
library to load.
From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Rename the driver hooks in the DRM to something a little more understandable:
preinit -> load
postinit -> (removed)
presetup -> firstopen
postsetup -> (removed)
open_helper -> open
prerelease -> preclose
free_filp_priv -> postclose
pretakedown -> lastclose
postcleanup -> unload
release -> reclaim_buffers_locked
version -> (removed)
postinit and version were replaced with generic code in the Linux DRM (drivers
now set their version numbers and description in the driver structure, like on
BSD). postsetup wasn't used at all. Fixes the savage hooks for
initializing and tearing down mappings at the right times. Testing involved at
least starting X, running glxgears, killing glxgears, exiting X, and repeating.
Tested on: FreeBSD (g200, g400, r200, r128)
Linux (r200, savage4)
From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Fix the PCIGART increment and add a cpu_to_le32 for ppc (untested)
Paulus was unsure if we need to cpu_to_le32 but the old code was definitely
wrong, so make it consistent and let the PPC guys figure it out later.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This is the drivers/char/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in drivers/char/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>