summaryrefslogtreecommitdiff
path: root/drivers/char
Commit message (Collapse)AuthorAgeFilesLines
* Merge refs/heads/drm-latest from ↵Linus Torvalds2005-08-3057-3243/+7407
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
| * drm: fix a bad VERSION check.Dave Airlie2005-08-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * drm: fixes for powerpcDave Airlie2005-08-202-10/+10
| | | | | | | | | | | | | | | | | | 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>
| * drm: add new texture upload code from r300 projectDave Airlie2005-08-201-35/+29
| | | | | | | | | | | | | | 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>
| * drm: update pci ids for savage and viaDave Airlie2005-08-161-30/+25
| | | | | | | | | | | | Fixup savage and via pci ids From: Dave Airlie <airlied@linux.ie>
| * drm: add initial r300 3D support.Dave Airlie2005-08-168-2/+2325
| | | | | | | | | | | | | | 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>
| * drm: add savage driverDave Airlie2005-08-077-0/+3152
| | | | | | | | | | | | | | Add driver for savage chipsets. From: Felix Kuehling Signed-off-by: Dave Airlie <airlied@linux.ie>
| * drm: remove version.h and any version checks..Dave Airlie2005-08-075-107/+0
| | | | | | | | | | | | This patch removes all the drm kernel conditionals from the kernel DRM tree. Signed-off-by: Dave Airlie <airlied@linux.ie>
| * drm: fix warning in drm_pci.cDave Airlie2005-08-051-5/+5
| | | | | | | | | | Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * drm: remove the gamma driverDave Airlie2005-08-0511-2415/+0
| | | | | | | | | | | | | | 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>
| * drm: switch drm_handle_t to unsigned intDave Airlie2005-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * drm: updated DRM map patch for 32/64 bit systemsDave Airlie2005-08-0515-54/+177
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * drm: copy the right data back to userspace for getreserved contexts ioctlDave Airlie2005-08-051-1/+1
| | | | | | | | | | | | | | | | This fixes the information copied back to userspace by the get reserved contexts ioctl. From: Egbert Eich <eich@suse.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * drm: fix ioctl direction in r128 getparamDave Airlie2005-08-051-1/+1
| | | | | | | | | | | | | | Set the IOWR correctly for r128 getparam. From: Egbert Eich <eich@suse.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * Merge ../linux-2.6/Dave Airlie2005-07-3054-300/+650
| |\
| * | drm: cleanup buffer/map codeDave Airlie2005-07-108-130/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a patch from DRM CVS that cleans up some code that was in CVS that I never moved to the kernel, this patch produces the result of the cleanups and puts it into the kernel drm. From: Eric Anholt <anholt@freebsd.org>, Jon Smirl, Dave Airlie Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: add mga driver callbacksDave Airlie2005-07-101-0/+8
| | | | | | | | | | | | | | | | | | Add some missing driver callback for the PCI support Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | Add support for PCI MGA cards to MGA DRM.Dave Airlie2005-07-107-277/+888
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds serveral new ioctls and a new query to get_param query to support PCI MGA cards. Two ioctls were added to implement interrupt based waiting. With this change, the client-side driver no longer needs to map the primary DMA region or the MMIO region. Previously, end-of-frame waiting was done by busy waiting in the client-side driver until one of the MMIO registers (the current DMA pointer) matched a pointer to the end of primary DMA space. By using interrupts, the busy waiting and the extra mappings are removed. A third ioctl was added to bootstrap DMA. This ioctl, which is used by the X-server, moves a *LOT* of code from the X-server into the kernel. This allows the kernel to do whatever needs to be done to setup DMA buffers. The entire process and the locations of the buffers are hidden from user-mode. Additionally, a get_param query was added to differentiate between G4x0 cards and G550 cards. A gap was left in the numbering sequence so that, if needed, G450 cards could be distinguished from G400 cards. According to Ville Syrjälä, the G4x0 cards and the G550 cards handle anisotropic filtering differently. This seems the most compatible way to let the client-side driver know which card it's own. Doing this very small change now eliminates the need to bump the DRM minor version twice. http://marc.theaimsgroup.com/?l=dri-devel&m=106625815319773&w=2 (airlied - this may not work at this point, I think the follow on buffer cleanup patches will be needed) From: Ian Romanick <idr@us.ibm.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: make drm_alloc_agp take a dev arg.Dave Airlie2005-07-103-4/+4
| | | | | | | | | | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: add new mga ids and typesDave Airlie2005-07-102-4/+6
| | | | | | | | | | | | | | | From: Ian Romanick <idr@us.ibm.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: add test for AGP devices and driver override for it.Dave Airlie2005-07-1013-3/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added device_is_agp callback to drm_driver. This function is called by the platform-specific drm_device_is_agp function. Added implementation of this function the the Linux-specific portion of the MGA driver to detect PCI G450 cards. Added code to the Linux-specific portion of the generic DRM layer to not initialize AGP infrastructure if the card is not AGP (this matches what already existed in BSD). Fix up i810/i830 and i915 drivers to always return AGP as they don't always report the capability. Fix the MGA to not report AGP for a card that has an AGP chip behind a PCI bridge. From: Ian Romanick, Dave Airlie, Alan Hourihane Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: destatic exported function.Dave Airlie2005-07-102-2/+4
| | | | | | | | | | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: export symbols for use by driversDave Airlie2005-07-103-0/+7
| | | | | | | | | | | | | | | | | | | | | This just exports symbols for use in drivers. From: Ian Romanick <idr@us.ibm.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: fix minor function header issueDave Airlie2005-07-101-2/+2
| | | | | | | | | | | | | | | From: Ian Romanick <idr@us.ibm.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: update some function so a driver can call themDave Airlie2005-07-104-101/+167
| | | | | | | | | | | | | | | | | | | | | | | | This patch splits some ioctl functions so that they can be called in-kernel by a DRM driver. The driver will use them later. From: Ian Romanick <idr@us.ibm.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: update support for drm pci buffersDave Airlie2005-07-107-39/+78
| | | | | | | | | | | | | | | | | | | | | | | | The DRM needs to change the drm_pci interface for FreeBSD compatiblity, this patch introduces the drm_dma_handle_t and uses it in the Linux code. From: Tonnerre Lombard, Eric Anholt, and Sergey Vlasov Signed-off-by: David Airlie <airlied@linux.ie>
| * | Refactor common, boilerplate ioctl code from drm_addbufs_* functions intoDave Airlie2005-07-101-82/+44
| | | | | | | | | | | | | | | | | | | | | | | | drm_addbufs. This makes the code more like the BSD code, and makes the drm_addbufs_* functions callable in-kernel. From: Ian Romanick <idr@us.ibm.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: add framebuffer mapsDave Airlie2005-07-103-4/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch makes drmAddBufs/drmMapBufs can handle buffers in video memory The attached patch adds a new buffer type DRM_FB_BUFFER. It works like AGP memory but uses video memory. From: Austin Yuan <austinyuan@viatech.com.cn> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: add _DRM_CONSISTENT map typeDave Airlie2005-07-105-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | Added a new DRM map type _DRM_CONSISTENT for consistent PCI memory. It uses drm_pci_alloc/free for allocating/freeing the memory. From: Felix Kuhling <fxkuehl@gmx.de> Signed-off-by: David Airlie <airlied@linux.ie>
* | | Merge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6 Linus Torvalds2005-08-293-3/+3
|\ \ \
| * | | [PATCH] Make MODULE_DEVICE_TABLE work for vio devicesStephen Rothwell2005-08-303-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make MODULE_DEVICE_TABLE work for vio devices. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | | | [RANDOM]: Introduce secure_dccp_sequence_numberArnaldo Carvalho de Melo2005-08-291-0/+34
|/ / / | | | | | | | | | | | | | | | | | | Code contributed by Stephen Hemminger. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | [PATCH] Remove race between con_open and con_closePaul Mackerras2005-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Same race and same patch also by Steven Rostedt <rostedt@goodmis.org> ] I have a laptop (G3 powerbook) which will pretty reliably hit a race between con_open and con_close late in the boot process and oops in vt_ioctl due to tty->driver_data being NULL. What happens is this: process A opens /dev/tty6; it comes into con_open() (drivers/char/vt.c) and assign a non-NULL value to tty->driver_data. Then process A closes that and concurrently process B opens /dev/tty6. Process A gets through con_close() and clears tty->driver_data, since tty->count == 1. However, before process A can decrement tty->count, we switch to process B (e.g. at the down(&tty_sem) call at drivers/char/tty_io.c line 1626). So process B gets to run and comes into con_open with tty->count == 2, as tty->count is incremented (in init_dev) before con_open is called. Because tty->count != 1, we don't set tty->driver_data. Then when the process tries to do anything with that fd, it oopses. The simple and effective fix for this is to test tty->driver_data rather than tty->count in con_open. The testing and setting of tty->driver_data is serialized with respect to the clearing of tty->driver_data in con_close by the console_sem. We can't get a situation where con_open sees tty->driver_data != NULL and then con_close on a different fd clears tty->driver_data, because tty->count is incremented before con_open is called. Thus this patch eliminates the race, and in fact with this patch my laptop doesn't oops. Signed-off-by: Paul Mackerras <paulus@samba.org> [ Same patch Signed-off-by: Steven Rostedt <rostedt@goodmis.org> in http://marc.theaimsgroup.com/?l=linux-kernel&m=112450820432121&w=2 ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] Kconfig fix (sparc32 drivers/char dependencies)Al Viro2005-08-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | since sparc32 Kconfig includes drivers/char/Kconfig (instead of duplicating its parts) we need several new dependencies there to exclude the stuff broken on sparc32 and not excluded by existing dependencies. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] Kconfig fix (m32r genrtc)Al Viro2005-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | genrtc is not for m32r; marked as such. Probably ought to put that into arch/* - list of "don't build it on <platform>" is getting too long. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] Kconfig fix (epca on 64bit)Al Viro2005-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | epca is broken on 64bit; marked as such Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | Fix up mmap of /dev/kmemLinus Torvalds2005-08-131-4/+8
| | | | | | | | | | | | | | | | | | This leaves the issue of whether we should deprecate the whole thing (or if we should check the whole mmap range, for that matter) open. Just do the minimal fix for now.
* | | [PATCH] i8xx_tco.c: arm watchdog only when startedWim Van Sebroeck2005-08-091-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | i8xx_tco.c v0.08: only "arm" the watchdog when the watchdog has been started. (Kernel Bug 4251: system reset when battery is read and i8xx_tco driver loaded) Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] tpm_infineon: Support for new TPM 1.2 and PNPACPIMarcel Selhorst2005-08-052-44/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch includes support for the new Infineon Trusted Platform Module SLB 9635 TT 1.2 and does further include ACPI-support for both chip versions (SLD 9630 TT 1.1 and SLB9635 TT 1.2). Since the ioports and configuration registers are not correctly set on some machines, the configuration is now done via PNPACPI, which reads out the correct values out of the DSDT-table. Note that you have to have CONFIG_PNP, CONFIG_ACPI_BUS and CONFIG_PNPACPI enabled to run this driver (assuming that mainboards including a TPM do have the need for ACPI anyway). Signed-off-by: Marcel Selhorst <selhorst@crypto.rub.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] rtc: msleep() cannot be used from interruptPetr Vandrovec2005-08-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the beginning of July my Opteron box was randomly crashing and being rebooted by hardware watchdog. Today it finally did it in front of me, and this patch will hopefully fix it. The problem is that at the end of June (the 28th, to be exact: commit 47f176fdaf8924bc83fddcf9658f2fd3ef60d573, "[PATCH] Using msleep() instead of HZ") rtc_get_rtc_time was converted to use msleep() instead of busy waiting. But rtc_get_rtc_time is used by hpet_rtc_interrupt, and scheduling is not allowed during interrupt. So I'm reverting this part of original change, replacing msleep() back with busy loop. The original code was busy waiting for up to 20ms, but on my hardware in the worst case update-in-progress bit was asserted for at most 363 passes through loop (on 2GHz dual Opteron), much less than even one jiffie, not even talking about 20ms. So I changed code to just wait only as long as necessary. Otherwise when RTC was set to generate 8192Hz timer, it stopped doing anything for 20ms (160 pulses were skipped!) from time to time, and this is rather suboptimal as far as I can tell. Signed-off-by: Petr Vandrovec <vandrove@vc.cvut.cz> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] ARM: 2833/2: Remove support for WDIOF_MAGICCLOSE from sa1100-wdtIan Campbell2005-08-031-39/+10
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Ian Campbell On PXA255 there is no way to disable the watchdog. Turning off OIER[E3] as suggested in the existing comment does not work. I posted a note to the ARM mailing list a little while ago asking for opinions from people using SA1100. There was one reponse from Nico who believes that the SA1100 is the same as the PXA255 in this respect. You also asked me to involve the watchdog maintainer which I tried to do but didn't hear anything back. There are only a couple of other drivers which can't stop the watchdog and there seems to be no consistancy regarding printing an error etc. I decided to print something since that matches the case for all the other drivers when NOWAYOUT is turned on. Also, I changed the device .name to "watchdog" like most of the other watchdogs. udev uses it as the device name (by default) and spaces etc. get in the way. Superceded 2833/1 because 2.6.13-rc4 caused rejects. Signed-off-by: Ian Campbell <icampbell@arcom.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [PATCH] agp: restore APBASE after setting APSIZEMatthew Garrett2005-07-292-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When leaving S3 state, the AGP bridge may not have all PCI configuration registers set in the same way as they were at boot. This should be fixed by pci_restore_state - however, the APBASE register cannot be set to conflict with the APSIZE register. If APSIZE is larger than it was before suspend, pci_restore_state will not restore APBASE correctly. The attached patch adds an extra item to the agp_bridge_data structure and uses it to store the value of APBASE. On resume, this is then written after APSIZE has been set. This patch only touches the path used for Intel chipsets without integrated graphics, and may need to be extended to work with the others. Without this patch, I get the symptoms described in bug 4921 - APBASE ends up overlapping various PCI devices, and as a result they fail to work after resume. Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds2005-07-292-83/+67
|\ \
| * | Input: check keycodesize when adjusting keymapsVojtech Pavlik2005-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | When changing key mappings we need to make sure that the new keycode value can be stored in dev->keycodesize bytes. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * | Merge rsync://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6Dmitry Torokhov2005-07-1160-424/+6530
| |\ \ | | |/
| * | Input: make name, phys and uniq be 'const char *' because onceDmitry Torokhov2005-06-301-22/+2
| | | | | | | | | | | | | | | | | | set noone should attempt to change them. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * | Sonypi: make sure that input_work is not running when unloadingDmitry Torokhov2005-06-301-59/+63
| | | | | | | | | | | | | | | | | | | | | the module; submit/retrieve key release data into/from input_fifo in one shot. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | | [PATCH] clean up inline static vs static inlineJesper Juhl2005-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `gcc -W' likes to complain if the static keyword is not at the beginning of the declaration. This patch fixes all remaining occurrences of "inline static" up with "static inline" in the entire kernel tree (140 occurrences in 47 files). While making this change I came across a few lines with trailing whitespace that I also fixed up, I have also added or removed a blank line or two here and there, but there are no functional changes in the patch. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] turn many #if $undefined_string into #ifdef $undefined_stringOlaf Hering2005-07-273-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | turn many #if $undefined_string into #ifdef $undefined_string to fix some warnings after -Wno-def was added to global CFLAGS Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] ppc64: tpm_infineon build fixAndrew Morton2005-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | ppc64 uses symbol `DAR', as does the TPM driver, causing a build failure. Change the TPM name. Cc: Marcel Selhorst <selhorst@crypto.rub.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>