aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm
Commit message (Collapse)AuthorAge
* [PATCH] mm: incorrect VM_FAULT_OOM returns from driversNick Piggin2006-12-07
| | | | | | | | | | | | | Some drivers are returning OOM when it is not in response to a memory shortage. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Dave Airlie <airlied@linux.ie> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] drm-sis linkage fixAndrew Morton2006-12-07
| | | | | | | | | | | | Fix http://bugzilla.kernel.org/show_bug.cgi?id=7606 WARNING: "drm_sman_set_manager" [drivers/char/drm/sis.ko] undefined! Cc: <daniel-silveira@gee.inatel.br> Cc: Dave Airlie <airlied@linux.ie> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* WorkStruct: make allyesconfigDavid Howells2006-11-22
| | | | | | Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
* drm: ioremap balanced with iounmap for drivers/char/drmAmol Lad2006-10-25
| | | | | | | | | | | ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Tested (compilation only) to make sure the files are compiling without any warning/error due to new changes Signed-off-by: Amol Lad <amol@verismonetworks.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fix error returns, sysfs error handlingJeff Garzik2006-10-25
| | | | | | | | | | | | - callers of drm_sysfs_create() and drm_sysfs_device_add() looked for errors using IS_ERR(), but the functions themselves only ever returned NULL on error. Fixed. - unwind from, and propagate sysfs errors Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* fix return code in error case.Dave Jones2006-10-25
| | | | | | | | The other failure returns in this function are negative, so make this one do the same. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: mga: set dev_priv_sizeTilman Sauerbeck2006-10-24
| | | | | | fd.o bug 1746 Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: savage: dev->agp_buffer_map is not initialized for AGP DMA on savagesMichael Karcher2006-10-24
| | | | | | fd.o bug 8662 Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: radeon: only allow specific type-3 packetss through verifierRoland Scheidegger2006-10-24
| | | | | | only allow specific type-3 packets to pass the verifier instead of all for r100/r200 as others might be unsafe (r300 already does this), and add checking for these we need but aren't safe. Check the RADEON_CP_INDX_BUFFER packet on both r200 and r300 as it isn't safe neither. Signed-off-by: Dave Airlie <airlied@linux.ie>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
* drm: Use register writes instead of BITBLT_MULTI packets for buffer swap blitsMichel Daenzer2006-09-21
| | | | | | | This takes up two more ring buffer entries per rectangle blitted but makes sure the blit is performed top to bottom, reducing the likelyhood of tearing. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: use radeon specific names for radeon flagsDave Airlie2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add device/vendor id to drm_device_t for compat with FreeBSD driversEric Anholt2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: allow multiple addMaps with the same 32-bit map offsset.Thomas Hellstrom2006-09-21
| | | | | | Reported on -mm kernels. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fd.o Bug #7595: Avoid u32 overflows in radeon_check_and_fixup_offset().Michel Daenzer2006-09-21
| | | | | | | | The overflows could cause valid offsets to get rejected under some circumstances, e.g. when the framebuffer resides at the very end of the card's address space. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Fix hashtab implementation leaking illegal error codes to user space.Thomas Hellstrom2006-09-21
| | | | | | reported by Dave Airlie Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: domain changes broke ppc r200Dave Airlie2006-09-21
| | | | | | | | | Freedesktop.org bug #8246 The domain changes regressed on PPC, go back to just using 0, as X.org's domain support is crap Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fixup setversion return codes..Dave Airlie2006-09-21
| | | | | | | | Frederik Deweerdt <deweerdt@free.fr> noticed some badness in setversion returns, however just making it work, breaks things... this code is hairy with backwards compat... Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fixup i915 error codesDave Airlie2006-09-21
| | | | | | | Frederik Deweerdt <deweerdt@free.fr> pointed this out, I fixed a missing DRM error wrapper also. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: realign sosme radeon code with drm git treeDave Airlie2006-09-21
| | | | | | | this applies some minor cleanups for the radeon driver, to use the 3D flush and reset the AGP flags on X recycle Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: realign via driver with drm git treeDave Airlie2006-09-21
| | | | | | This just realigns some code/whitespace between the kernel and main tree Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove hash tables on drm exitThomas Hellstrom2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: cleanupsAdrian Bunk2006-09-21
| | | | | | | | | This patch contains the following cleanups: - make 3 needlessly global functions static - sis_mm.c: fix compile warnings with CONFIG_FB_SIS=y Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: i810_dma.c: fix pointer arithmetic for 64-bit targetDenis Vlasenko2006-09-21
| | | | | | | | | | | First warning result from open-coded PTR_ERR, the rest is caused by code like this: *(u32 *) ((u32) buf_priv->kernel_virtual + used) I've also fixed a missing PTR_ERR in i830_dma.c Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: avoid kernel oops in some error paths calling drm_lastcloseThomas Hellstrom2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: allow detection of new VIA chipsetsChuck Short2006-09-21
| | | | | | | | | | | | | Update pci ids. patch location: http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=c ommitdiff;h=5195a64a27550a279b2ecaf400066a3823f2d053 Signed-off-by: Chuck Short <zulcss@gmail.com> Signed-off-by: Ben Collins <bcollins@ubuntu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fix i965 build bugAndrew Morton2006-09-21
| | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove FALSE/TRUE that snuck in with simple memory manager changes.Andrew Morton2006-09-21
| | | | | | | | Thanks to Andrew Morton for pointing these out, I've fixed a few his patch missed. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Add support for Intel i965G chipsets.Alan Hourihane2006-09-21
| | | | | | | | This is a patch prepared by Guangdeng Liao based off of Tungsten Graphics's final code drop. From: Alan Hourihane <alanh@tungstengraphics.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add better explanation for i830/i915Dave Airlie2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove a tab that snuck inDave Airlie2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fix return value in auth functionDave Airlie2006-09-21
| | | | | | This just fixes up the return value in the drm_auth:remove_magic Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: SiS 315 Awareness.Thomas Hellstrom2006-09-21
| | | | | | Add support for the SiS 315 to the DRM. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: update user token hashing and map handlesThomas Hellstrom2006-09-21
| | | | | | | | | | | | | | | | | | | Keep hashed user tokens, with the following changes: 32-bit physical device addresses are mapped directly to user-tokens. No duplicate maps are allowed, and the addresses are assumed to be outside of the range 0x10000000 through 0x30000000. The user-token is identical to the 32-bit physical start-address of the map. 64-bit physical device addressed are mapped to user-tokens in the range 0x10000000 to 0x30000000 with page-size increments. The user_token should not be interpreted as an address. Other map types, like upcoming TTM maps are mapped to user-tokens in the range 0x10000000 to 0x30000000 with page-size increments. The user_token should not be interpreted as an address. Implement hashed map lookups. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: move drm authentication to new generic hash table.Thomas Hellstrom2006-09-21
| | | | | | | Fix drm_remove_magic potential memory leak / corruption. Move drm authentication token hashing to new generic hash table implementation. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Add the P4VM800PRO (?) PCI ID.Dave Airlie2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add drm simple memory manager support for SiS and VIA driversThomas Hellstrom2006-09-21
| | | | | | | | This add support to the SiS and VIA drivers for the simple memory manager. This fixes a lot of problems with the current simple code these drivers used, including locking and SMP issues. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add simple DRM memory manager, and hash tableThomas Hellstrom2006-09-21
| | | | | | | | This adds the DRM hashtable and simple memory manager implementations from Tungsten Graphics, this is NOT the new memory manager, this is a replacement for the SIS and VIA memory managers. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: radeon: Use RADEON_RB3D_DSTCACHE_CTLSTAT instead of ↵Michel Dänzer2006-09-21
| | | | | | | | RADEON_RB2D_DSTCACHE_CTLSTAT. The latter seems to be a read-only mirror of the former. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: radeon: fix up bus mastering when writeback is disabledMichel Dänzer2006-09-21
| | | | | | | | | | When writeback isn't used, actually disable it in the hardware. Not doing this might waste bus bandwidth or even cause memory corruption or system crashes on systems that check bus transfers. No such incident has been reported though. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: radeon: implement RADEON_PARAM_SCRATCH_OFFSET getparamMichel Dänzer2006-09-21
| | | | | | When this succeeds, userspace can read the scratch register contents from th mapped writeback page directly. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: radeon: add some debug output when getparam is called with unknownMichel Dänzer2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: missing mutex unlockThomas Hellstrom2006-09-21
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove the DRM pci domainDave Airlie2006-09-21
| | | | | | | | | | This patch removes the pci_domain from the DRM device structure, and gets it via a macro that either asks the platform or does the alpha special case. jgarzik asked for this to just use the platform magic, but I've no alpha experience and I'd rather not just break it and wait for someone to give out. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove local copies of pci bus/slot/funcDave2006-09-21
| | | | | | The drm keeps a local copy of these for little use. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: cleanup old compat code and DRM fns from Linux only codeDave Airlie2006-09-21
| | | | | | | This patch removes some of the old compatibility macros from the DRM, and removes use of DRM wrappers from Linux specific code. Signed-off-by: Dave Airlie <airlied@linux.ie>
* [PATCH] drm: radeon flush TCL VAP for vertex program enable/disableRoland Scheidegger2006-08-30
| | | | | | | | The radeon requires a VAP state flush when enabling/disabling vertex programs on the r200 cards. Signed-off-by: Dave Airlie <airlied@linux.ie> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] irq-flags: drivers/drm: Use the new IRQF_ constantsThomas Gleixner2006-07-02
| | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-30
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [PATCH] spin/rwlock init cleanupsIngo Molnar2006-06-27
| | | | | | | | | | | | | | | | | | | | | locking init cleanups: - convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK() - convert rwlocks in a similar manner this patch was generated automatically. Motivation: - cleanliness - lockdep needs control of lock initialization, which the open-coded variants do not give - it's also useful for -rt and for lock debugging in general Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>