Age | Commit message (Collapse) | Author |
|
This reverts the series of commits
67dbb4ea33731415fe09c62149a34f472719ac1d
281ab031a8c9e5b593142eb4ec59a87faae8676a
47807ce381acc34a7ffee2b42e35e96c0f322e52
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 281ab031a8c9e5b593142eb4ec59a87faae8676a.
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>
|
|
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>
|
|
Manual fixups for some clashes due to re-indenting.
|
|
I recently picked up my older work to remove unnecessary #includes of
sched.h, starting from a patch by Dave Jones to not include sched.h
from module.h. This reduces the number of indirect includes of sched.h
by ~300. Another ~400 pointless direct includes can be removed after
this disentangling (patch to follow later).
However, quite a few indirect includes need to be fixed up for this.
In order to feed the patches through -mm with as little disturbance as
possible, I've split out the fixes I accumulated up to now (complete for
i386 and x86_64, more archs to follow later) and post them before the real
patch. This way this large part of the patch is kept simple with only
adding #includes, and all hunks are independent of each other. So if any
hunk rejects or gets in the way of other patches, just drop it. My scripts
will pick it up again in the next round.
Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
I've seen similar failure on alpha.
Obviously, someone forgot to convert sg->handle stuff for
PCI gart case.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
These haven't been used in quite a long time, takes 1K buffer out of structures.
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
This looks ugly, but it is the only thing that makes sense that doesn't
change the API.
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
|
|
|
|
The wrong state emission routines were being called for G550, and
consistent maps weren't correctly mapped...
Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
I've gotten a report on lkml, of a possible regression in the MGA DRM in
2.6.14-rc4 (since -rc1), I haven't been able to reproduce it here, but I've
figured out some possible issues in the mga code that were definitely
wrong, some of these are from DRM CVS, the main fix is the agp enable bit
on the old code path still used by everyone.....
Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Just enables some extra printk's, but still.. Only the sysadmin should
be able to do that.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
PCI Express support broke PCIGART
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
Finally cleaned up the sparse warnings for the drm.
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
In order to get some better debugging from people about certain hangs/crashes
we need to be able to turn AGP writeback off permanently...
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
A bunch of create_proc_dir_entry() calls creating directories had crept
in since the last sweep; converted to proc_mkdir().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
Andrew reported a warning on this line, just case to void *.
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
I've been threatening this for a while, so no point hanging around.
This lindents the DRM code which was always really bad in tabbing department.
I've also fixed some misnamed files in comments and removed some trailing
whitespace.
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
Make some of the DRM_ macros use the real kernel macros.
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
|
|
Add support for Radeon PCI Express cards (needs a new X.org DDX)
Also allows PCI GART table to be stored in VRAM for non PCIE cards
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
Add support for GL_ATI_fragment_shader, new packets R200_EMIT_PP_AFS_0/1,
R200_EMIT_PP_TXCTLALL_0-5 (replaces R200_EMIT_PP_TXFILTER_0-5, 2 more regs)
and R200_EMIT_ATF_TFACTOR (replaces R200_EMIT_TFACTOR_0 (8 consts instead of 6)
From: Roland Scheidegger, David Airlie
Signed-off-by: David Airlie <airlied@linux.ie>
|
|
This adds a missing change from CVS for consistent maps.
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
This patch removes CONFIG_PCI_NAMES.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
Al Viro noticed that MGA wouldn't build on non AGP systems.
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
This patch contains the following small cleanups:
- make two needlessly global functions static
- drm_sysfs.c: every file should #include the header with the prototypes
of the global functions it is offering
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
On 32-bit PPC a 0 handle is valid for AGP space, the 32/64 lookup
doesn't handle 0 correctly.
From: Ben Herrenschmidt <benh@kernel.crashing.org> and Paul Mackerras <paulus@samba.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
I found why my G5 was crashing when using the linux-2.6 version of the
DRM + git-drm.patch from 2.6.13-rc6-mm1, but not with the CVS DRM.
The reason was that dev->agp->cant_use_aperture wasn't getting set,
and the reason for that was that <linux/version.h> no longer gets
included and the #if LINUX_VERSION_CODE < 0x020408 in drm_agpsupport.c
was going the wrong way. With this patch (and a few others) a 32-bit
server works correctly, as does DRI.
From: Paul Mackerras <paulus@samba.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
Remove a bogus check on whether an area is memory (we need a better interface)
also change pgprot flags for powerpc
don't check on x86-64 either
From: Paul Mackerras <paulus@samba.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
Paul Mackerras did some new upload code for r300, I forgot to add it
to the kernel with r300 merge.
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
Fixup savage and via pci ids
From: Dave Airlie <airlied@linux.ie>
|
|
This adds initial r300 3D support to the radeon DRM.
From: Nicolai Haehnle, Vladimir Dergachev, and others.
Signed-off-by: David Airlie <airlied@linux.ie>
|
|
Add driver for savage chipsets.
From: Felix Kuehling
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
This patch removes all the drm kernel conditionals from the kernel DRM tree.
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
The gamma driver has been broken for quite a while, it doesn't build,
we don't have a userspace, mine is in Ireland etc...
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
This converts the drm_handle_t to unsigned int.
This is currently safe to do as we don't pass these across the kernel/user
boundary, but userspace does use these, but no-one builds userspace against
the kernel headers at present so it is okay to switch over the kernel copy
of drm.h at this point. (The CVS tree will switch over soon in sync with
some Mesa changes)
From: Egbert Eich <eich@suse.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
|
|
I basically combined Paul's patches with additions that I had made
for PCI scatter gather.
I also tried more carefully to avoid problems with the same token
assigned multiple times while trying to use the base address in the
token if possible to gain as much backward compatibility as possible
for broken DRI clients.
From: Paul Mackerras <paulus@samba.org> and Egbert Eich <eich@suse.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
|