Commit Graph

55 Commits (0f32a8852712e405f64c5917bcebefc441aa1ba3)

Author SHA1 Message Date
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
Eric Anholt ff58476011 - Converted Linux drivers to initialize DRM instances based on PCI IDs, not
just a single instance. Moved the PCI ID lists from <card>_drv.c in BSD
    to <card>.h. The PCI ID lists include a driver private field, which may
    be used by drivers for chip family or other information. Based on work
    by jonsmirl.
- Make tdfx_drv.c and tdfx.h match other drivers.
- Fixed up linking of sis shared files.
Tested with Radeon and SiS on Linux and FreeBSD, including a Linux setup
    with
2 SiS cards in a machine, but only one head being used (with DRI)
2003-10-17 03:14:39 +00:00
Michel Daenzer 9d7b01ebbe Merge from 2.6 kernel (Linus Torvalds) 2003-08-15 10:31:54 +00:00
Michel Daenzer da16867c84 Fix maplist entries being used after they were freed; thanks to Benjamin
Herrenschmidt for tracking this down
2003-08-06 11:46:21 +00:00
Keith Whitwell 3669639b21 Restore __HAVE_KERNEL_CTX_SWITCH, required for the sparc drm module in the
kernel tree. Added comments to that effect.
2003-07-11 15:27:55 +00:00
Keith Whitwell 2daf147652 Removed unused __HAVE_KERNEL_CTX_SWITCH, whatever that was. 2003-07-08 17:10:13 +00:00
Jose Fonseca 93522f6d3a Revert the janitorial - that works is now on the new branch
newdrm-0-0-1-branch.
2003-06-19 00:09:52 +00:00
Jose Fonseca 6611a5fb7f Split declarations/definitions in drm_scatter.h into drm_sg.h/drm_sg_tmp.h
respectively. Splited the work out of the ioctls and renamed (with the
    _ioctl prefix). Added some more documentation. Did the same for
    drm_sgpsupport.h.
2003-06-03 23:27:01 +00:00
Jose Fonseca d2443b2186 Merged DRM documentation. 2003-05-27 00:37:33 +00:00
Michel Daenzer e5d3c7f260 Support AGP bridges where the AGP aperture can't be accessed directly by
the CPU (David Mosberger, Benjamin Herrenschmidt, myself, Paul
    Mackerras, Jeff Wiedemeier)
2003-05-16 23:41:27 +00:00
Keith Whitwell c584292e30 Put back __HAVE_KERNEL_CTX_SWITCH for David Miller's sparc drm driver
(which doesn't live in our cvs).
2003-04-27 09:53:58 +00:00
Leif Delgass d6a82ff9c1 Remove unused dev->map_count. We always iterate the maplist with
list_for_each() and the count is not updated or used for stats.
2003-04-24 16:55:22 +00:00
Keith Whitwell a41594e8df Remove #if 0'd code and some unused string functions 2003-04-24 09:41:33 +00:00
Keith Whitwell e15b0b6a1b Install dummy/noop read & poll fops unless the driver has replacements. 2003-04-23 23:42:29 +00:00
Keith Whitwell 928c25d14f Move the excitingly named DRM(flush_block_and_flush) and friends to
gamma-specific code.
Fix templates so i8x0 drivers don't have to define __HAVE_DMA_WAITLIST.
2003-04-22 12:07:24 +00:00
Keith Whitwell aba6bf7eb3 remove unused __HAVE_KERNEL_CTX_SWITCH code 2003-04-22 11:39:34 +00:00
Keith Whitwell 056762a910 remove unused dma histogram code 2003-04-22 10:18:29 +00:00
Keith Whitwell fc4fb6b51b remove DRM read, poll and write_string 2003-04-22 08:06:14 +00:00
David Dawes c2d7ff1bf9 Bring some drm module changes over from the XFree86 trunk:
- Reset 'bound' flag for an agp entry after undbind succeeded in
    drm_agpsupport.h (Egbert Eich).
- Ignore hw_lock for drm device if lock was set by a different instance (ie
    Xserver) to prevent second server from spinning in driver release
    function (currently only relevant for i8xx drm drivers) (David Dawes).
- Use the agpgart "key" for the unique handle for bindings rather than the
    memory address (the key is guaranteed to be unique) (David Dawes).
2003-04-17 18:41:28 +00:00
Keith Whitwell 1728bc637d merged drm-filp-0-1-branch 2003-03-28 14:27:37 +00:00
Alan Hourihane b3eb34e0ea linux merge for drm 2003-03-25 11:36:43 +00:00
Michel Daenzer 55acd0d5a6 common ioctl to wait for vertical blank IRQs 2002-09-25 17:18:19 +00:00
Michel Daenzer cfa1a918b6 make sure we never oops because the hardware lock pointer in the sigdata
structure is out of date
2002-09-21 23:18:54 +00:00
Rik Faith 977b420d5d Updates from Rusty Russell to:
1) Remove redundant header inclusion
2) Silence bitop on non-long argument warnings (change int to long)
3) Move to ISO C (gcc 2.6) initializers (accepted by older gccs also) All
    of these are syntax changes that should not impact functionality.
2002-08-06 18:00:57 +00:00
Alan Hourihane 74ef13fd00 merged bsd-3-0-0-branch 2002-07-05 08:31:11 +00:00
Keith Whitwell 9e67da5626 Allow drm to build under 2.4 and 2.5(.14) 2002-05-16 23:47:15 +00:00
David Dawes ab87c5d0d1 First pass of mesa-4-0 branch merge into trunk. 2002-02-14 02:00:26 +00:00
Alan Hourihane 05fb3e93f2 wrap the MODULE_LICENSE definition. 2001-11-02 17:40:11 +00:00
Alan Hourihane 92ad1b60e1 merge kernel 2.4.13-pre6. 2001-10-22 19:15:04 +00:00
Alan Hourihane ca820fca87 merge with 2.4.10 kernel 2001-09-25 09:32:16 +00:00
Alan Hourihane f4c2f14002 No one's maintaining 2.2.x support - so remove all the cruft. 2001-08-19 15:20:08 +00:00
Jeff Hartmann b6923b3953 Update to the code I sent Linus and Alan this morning. Added some missing
agp chipsets to drm_agpsupport.h, redid the card detection common code
    to use a structure (avoids endian porting issues), changed the tdfx
    driver to use the kernel pci id '#defines'
2001-08-08 16:10:47 +00:00
Jeff Hartmann 51e38d96ea Lots of DRM fixes: added new pieces of template code so the ffb driver can
be ported, rolled back r128 and i810 version bumps so 4.1.0 works with
    cvs kernel modules, added Config.in and updated Makefile.kernel,
    incorporated lots of drm fixes inspired by patches sent by Redhat, made
    DRM(realloc) usage check for NULL allocations, restructure driver init
    routines to export dev_priv only when initialized and to check for all
    error conditions.
2001-08-07 18:15:10 +00:00
David Dawes 56bd9c2077 Merge the multihead-1-0-0 branch into the trunk, with the exception of the
glide header files.
The changes include:
- Brian Paul's changes to the tdfx client-side 3D driver to make it
    dlopen() the correct glide library (Voodoo3 or Voodoo5). This allows
    both types of the glide library to co-exist, and allows Voodoo3/Voodoo5
    cards to be mixed in multi-head configs.
- DRM kernel driver changes to allow a driver to set up multiple instances
    (minor numbers), one for each card present that the driver supports.
    This is currently implemented and tested only for the tdfx DRM driver.
- Add some missing missing <stdarg.h> includes.
- Some log message cleanups.
- Change the 2D tdfx driver to access VGA legacy registers via their PCI
    I/O space access points rather than their legacy addresses, and fix
    some problems with the way the VGA-related bits are initialised.
Status:
- With these changes, multi-head direct rendering works with multiple
    Voodoo3 and/or Voodoo5 cards. This has been tested with two PCI Voodoo3
    cards and an AGP Voodoo5 card, and all permutations of those.
Caveats:
- Xinerama is not supported. If Xinerama is enabled, then direct rendering
    gets disabled.
- The text mode on secondary screens will show junk after the X server
    exits.
- On some hardware, starting the X server on multiple 3dfx cards will
    result in a hard lockup. One workaround is to enable APIC support in a
    uni-processor kernel, or use an SMP kernel.
2001-07-30 19:59:39 +00:00
Jeff Hartmann 84a5e71087 Fixes that allow the modules to be built into the kernel 2001-07-23 20:25:38 +00:00
Alan Hourihane b804c09d06 fix build of i810 kernel driver for 2.4.3 or greater kernels 2001-04-30 16:18:22 +00:00
David Dawes 1759c16ab9 Import -f XFree86 4.0.99.2 2001-04-09 16:27:54 +00:00
Alan Hourihane 2bd9bf98c7 Handle drivers that don't have __HAVE_SG defined. 2001-04-06 08:39:02 +00:00
Kevin E Martin 5d6ddbca26 Merged ati-pcigart-1-0-0 2001-04-05 22:16:12 +00:00
Kevin E Martin 74e19a4018 Merged sarea-1-0-0 2001-03-14 22:22:50 +00:00