Commit Graph

94 Commits (36356df3cbca8e7e703afadf91046214d7755a07)

Author SHA1 Message Date
Thomas Hellstrom 699d4ad53a 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.
2005-04-20 18:50:49 +00:00
Felix Kuehling 5128542814 Allow drivers to override reclaim_buffers in an OS-independent way by
passing drm_device_t* as first parameter, like in the BSD version.
2004-10-31 15:16:44 +00:00
Jon Smirl 816a291709 Switch SPIN_LOCK_UNLOCKED to spin_lock_init() 2004-10-29 17:09:54 +00:00
Jon Smirl 3981f17227 Fix refcount bug in stealth mode 2004-10-08 14:31:25 +00:00
Jon Smirl 6619c5d941 Fix drm_exit to allow for DRM(global) being deleted when framebuffer is
loaded.
2004-10-07 00:40:16 +00:00
Jon Smirl 6f31c42fe9 Remove size restriction on permanent addmap 2004-09-20 19:23:27 +00:00
Dave Airlie 5654880eee remove HAVE_COUNTERS 2004-09-20 11:29:16 +00:00
Jon Smirl c7c9d3ef7b Let's try adding the dyn-minor patch again. This patch will reuse minor
numbers if a card is hotplugged in/out instead of just having them
    increase.
2004-09-16 18:42:03 +00:00
Jon Smirl eeb0ef1a70 Back dyn-minor patch out for now. fops handling is broken on some cards 2004-09-15 17:44:30 +00:00
Jon Smirl 64ef12c55c Dynamic device minor support. Minor device numbers will be reused if the
device is hotplugged in/out of the system
2004-09-15 00:20:21 +00:00
Jon Smirl 13cb3f1b00 Fix error path in probe() to release resources if there is an error. 2004-09-12 19:24:08 +00:00
Jon Smirl e6d468ad7f More general patch to mark resources in use by all DRM drivers. Makes the
code Linux specific.
2004-09-10 16:44:28 +00:00
Dave Airlie c33f4449fc missed fix as part of last checkin 2004-09-05 23:33:57 +00:00
Dave Airlie eeae6a0a38 merge back bunch of whitespace and misc changes from kernel 2004-09-05 10:54:59 +00:00
Dave Airlie 4499ea42ea Fixup OS_HAS_AGP/OS_HAS_MTRR along lines of patches going to kernel, as
suggested by Arjan..
Signed-off-by: Dave Airlie <airlied@linux.ie>
2004-09-04 23:21:40 +00:00
Jon Smirl a070d15b53 Fix ref count problem in stealth mode. pci_get_subsys() with last parameter
set does the pci_dev_put for you.
2004-09-02 04:11:27 +00:00
Dave Airlie da6b448497 implement drm_core_check_feature and use it .. looks lots nicer 2004-08-30 11:34:51 +00:00
Dave Airlie 55c6e72306 remove hacky context thing that was gamma only 2004-08-29 12:17:26 +00:00
Dave Airlie 1430163b4b Drop GAMMA DRM from a great height ... 2004-08-29 12:04:35 +00:00
Jon Smirl 4a89c75456 Initialize pdev to NULL correctly so that pci_get_subsys() will work. 2004-08-28 23:59:51 +00:00
Jon Smirl 60f23ebc5c Make DRM detect vesafb and revert to stealth mode to avoid resource
conflicts
2004-08-27 02:26:07 +00:00
Dave Airlie d4dbf45781 Merged drmfntbl-0-0-2 2004-08-24 11:15:53 +00:00
Dave Airlie eac498baea addmap-base-2 patch from Jon Smirl:
sets up the DRM to have the ability to have permanent maps while the driver
    is loaded...
2004-08-24 10:43:45 +00:00
Erdi Chen 25e319c1ef This patch adds three new ioctl's to the VIA Unichrome/Pro DRM driver:
DRM_IOCTL_VIA_DMA_INIT DRM_IOCTL_VIA_CMDBUFFER DRM_IOCTL_VIA_FLUSH
The first ioctl sets up an area in AGP memory that will be used as the ring
    buffer. The second ioctl copies a command buffer from user space memory
    to the ring buffer. The third ioctl waits for engine idle until it
    returns.
The motivation for this patch is to avoid the wait for engine idle call
    before each buffer flush in the current DRI driver. With this patch,
    the DRI driver can continue to flush its buffer as long as there is
    free space in the ring buffer.
This patch adds an additional copy operation on the command buffer. This
    buffer copying is necessary to support multiple DRI clients rendering
    simultaneously. Otherwise, more CPU time will be spent in the busy loop
    waiting for engine idle between DRI context switch. Even in the single
    client case, the tradeoff is reasonable in comparision to the kernel
    call to check for free buffer space for the client to render directly
    to the ring buffer.
2004-08-24 01:44:37 +00:00
Dave Airlie 5c9ed83094 Merged drmfntbl-0-0-1 2004-08-17 13:10:05 +00:00
Jon Smirl 23bbff24aa Add dev to DRIVER_CTX_DTOR( dev, pos->handle) so that sis driver will
compile #if 0 get_pci_driver use in hotplug function until fbdev work
    around is written
2004-08-15 15:35:14 +00:00
Dave Airlie ecf1458b2c minor patch from Jon Smirl : sets up some things for later use 2004-08-11 09:07:36 +00:00
Dave Airlie 9277f9eef3 Patch from Jon Smirl to add attribute field to the pciids, and use this for
certain radeon combinations - intel drivers can probably use this for
    dual head capable devices etc..
2004-08-10 11:14:07 +00:00
Dave Airlie 4f8f02a192 fix for drm in /proc - from Jon Smirl 2004-08-03 09:21:11 +00:00
Dave Airlie c54ba5691a if the driver has already register don't do another intermodule register 2004-07-25 05:41:44 +00:00
Dave Airlie a776c5ec04 first set of __user annotations from kernel (Al Viro) 2004-07-20 12:43:12 +00:00
Dave Airlie 8efddd01e8 sparse cleanups from kernel: Al Viro 2004-07-15 13:03:55 +00:00
Dave Airlie bb5112b616 Fix reference counting for stub for new Linux PCI probe 2004-07-14 12:34:55 +00:00
Dave Airlie 87832bc81a fix bug with pci_disable_device in the wrong place (Paul Mackerras) remove
hack code from me..
2004-06-21 11:46:52 +00:00
Dave Airlie 1ee210e3b5 dirty hack to make mach64 work, (don't worry I'll get around to fixing it
asap..)
2004-06-12 02:30:52 +00:00
Dave Airlie a1160ba279 do some real testing and fix the DRM initialising and unloading 2004-05-10 11:16:26 +00:00
Dave Airlie a2f7a9fa5f Commit sysfs and drm PCI changes for 2.6 kernel 2004-05-09 06:45:17 +00:00
Dave Airlie a3612f450b better device class support from Jon Smirls patches.. 2004-05-02 12:27:17 +00:00
Dave Airlie 93bd67ef62 centralise pci ids into one place and use scripts to generate files for
kernel
2004-04-21 12:13:31 +00:00
Dave Airlie 9cff4b45e7 2.6 patches for larger dev_t 2004-04-08 12:22:22 +00:00
Dave Airlie 1bc7576474 patch from Linux kernel 2.6.5 2004-04-08 12:09:10 +00:00
Jon Smirl 0b6f155dbd Add a missing ifdef CTX to get rid of the waring in the gamma driver build.
XFree86 bug: Reported by: Submitted by: Reviewed by: Obtained from:
2004-03-16 00:52:24 +00:00
Keith Whitwell 82157579b5 drm_ctx_dtor.patch Submitted by: Erdi Chen 2004-02-20 22:55:12 +00:00
Eric Anholt 66c9e3053f - Tie the DRM to a specific device: setunique no longer succeeds when given
a busid that doesn't correspond to the device the DRM is attached to.
    This is a breaking of backwards-compatibility only for the
    multiple-DRI-head case with X Servers that don't use interface 1.1.
- Move irq_busid to drm_irq.h and make it only return the IRQ for the
    current device. Retains compatibility with previous X Servers, cleans
    up unnecessary code. This means no irq_busid on !__HAVE_IRQ, but can be
    changed if necessary.
- Bump interface version to 1.2. This version when set signifies that the
    control ioctl should ignore the irq number passed in and enable the
    interrupt handler for the attached device. Otherwise it errors out when
    the passed-in irq is not equal to the device's.
- Store the highest version the interface has been set to in the device.
- Fix a recursion on DRM_LOCK in irq_uninstall on FreeBSD. This leaves
    irq_uninstall being done without the lock in some cases, but it was
    racey anyways.
2003-11-05 08:13:52 +00:00
Michel Daenzer 2655ccddf4 Memory layout transition:
the 2D driver initializes MC_FB_LOCATION and related registers sanely
the DRM deduces the layout from these registers
clients use the new SETPARAM ioctl to tell the DRM where they think the
    framebuffer is located in the card's address space
the DRM uses all this information to check client state and fix it up if
    necessary
This is a prerequisite for things like direct rendering with IGP chips and
    video capturing.
2003-11-04 00:46:05 +00:00
Jon Smirl e4a2a9c040 Switch pci enumeration call to work on both 2.4 and 2.6 pci_for_each_dev is
not supported on 2.6
2003-10-24 17:40:54 +00:00
Eric Anholt b79d1b341f Move to "old-style" probing as documented in linux/Documentation/pci.txt.
This should resolve the probe problems with radeon framebuffer due to
    pci_driver attachment being exclusive.
2003-10-23 05:56:13 +00:00
Eric Anholt 06cb132e86 - Introduce a new ioctl, DRM_IOCTL_SET_VERSION. This ioctl allows the
server or client to notify the DRM that it expects a certain version of
    the device dependent or device independent interface. If the major
    doesn't match or minor is too large, EINVAL is returned. A major of -1
    means that the requestor doesn't care about that portion of the
    interface. The ioctl returns the actual versions in the same struct.
- Introduce DRM DI interface version 1.1. If the server requests version
    1.1, then the DRM sets the unique itself according to the busid of the
    device it probed, which may then be accessed as normal using getunique.
- Request version 1.1 in libdrm's drmOpenByBusID, allowing the X Server to
    request based on a BusID. Introduce a wrapper for DRM_IOCTL_SET_VERSION
    and bump libdrm minor version.
- Pass the busid in DRIScreenInit if libdrm can handle both a busid and
    name. This allows drmOpenByBusID to be used to find the DRM instead of
    just the driver name, which allows us in the future to tie a DRM more
    strongly to the device it probed to. Introduce a function
    DRICreatePCIBusID which creates a busid in the form pci:oooo:bb:dd.f
    similar to linux's pci_name() function. This matches the format used by
    the DRM in version 1.1. libdrm knows how to match both this format and
    the old PCI🅱️d:f format.
- Use the new DRICreatePCIBusID function in the *_dri.c to request the new,
    more exact busid format.
2003-10-23 02:23:31 +00:00
Eric Anholt 63ce8af555 Fix probing on 2.5+ kernels, which require that drivers have .id_table set.
We use PCI_ANY_ID to ask that our probe is called for every available
    device.
Submitted by: jonsmirl
2003-10-19 20:06:03 +00:00
Eric Anholt 2950f9e682 - Move IRQ functions from drm_dma.h to new drm_irq.h and disentangle them
from __HAVE_DMA. This will be useful for adding vblank sync support to
    sis and tdfx. Rename dma_service to irq_handler, which is more
    accurately what it is.
- Fix the #if _HAVE_DMA_IRQ in radeon, r128, mga, i810, i830, gamma to have
    the right number of underscores. This may have been a problem in the
    case that the server died without doing its DRM_IOCTL_CONTROL to
    uninit.
2003-10-17 05:13:48 +00:00