Commit Graph

105 Commits (bd71ba642890856aff339482a9422ecea1ef55d1)

Author SHA1 Message Date
Dave Airlie 02df04d71d sync up with current 2.6 kernel bk tree - mostly __user annotations 2004-07-25 08:47:38 +00:00
Dave Airlie a776c5ec04 first set of __user annotations from kernel (Al Viro) 2004-07-20 12:43:12 +00:00
Dave Airlie 6c16cbd404 split out backwards compat into a separate file makes it easier for merging
to 2.6
2004-07-11 10:17:34 +00:00
Dave Airlie f9e2fe8470 fix issue in 2.4 kernels with returning NULL from this function 2004-07-11 09:58:49 +00:00
Dave Airlie 024fd4b150 2.4 compat 2004-05-30 23:38:08 +00:00
Dave Airlie 8350382cb1 another 2.4 fix 2004-05-18 09:46:31 +00:00
Dave Airlie df6c37fc88 2.4 compat fix 2004-05-18 09:42:22 +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 a9d2438999 fix 2.4 build 2004-05-02 13:03:51 +00:00
Dave Airlie d40443534c Add __user annotations from kernel 2004-04-22 12:41:43 +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 873e1c4d38 Add mach64 to the trunk 2004-04-12 05:27:40 +00:00
Dave Airlie 13724f032e 2.6 sysfs patches + stubs in drmP.h for 2.4 compatibility 2004-04-08 13:11:04 +00:00
Dave Airlie 3e0f3c1fbb more 2.4 compat fns 2004-04-08 12:20:39 +00:00
Jon Smirl 24115068e4 Fixes need to clean up the mess I made with the mesa merge. This code
allows the mesa drivers to use a single definition of the DRM
    sarea/IOCTLS located in the drm driver directory. Adjustments were made
    to the 2D drivers to not include these changes. Changes to the mesa
    copy of DRM were copied to the DRI copy. XFree86 bug: Reported by:
    Submitted by: Reviewed by: Obtained from:
2004-03-12 21:22:52 +00:00
Michel Daenzer f47ed99143 Remove extraneous code accidentally added with revision 1.86 2004-02-28 14:29:44 +00:00
Felix Kuehling d0031f22cf Conditionally add definition of list_for_each_entry_safe for kernel
versions that don't have it.
2004-02-21 19:54:51 +00:00
Keith Whitwell 82157579b5 drm_ctx_dtor.patch Submitted by: Erdi Chen 2004-02-20 22:55:12 +00:00
Michel Daenzer 2b9c12ef83 Adapt to nopage() prototype change in Linux 2.6.1.
Reviewed by: Arjan van de Ven <arjanv@redhat.com>, additional feedback from
    William Lee Irwin III and Linus Torvalds.
2004-01-11 00:14:28 +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
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 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
Eric Anholt a7aebb6dac Add DRM(calloc), which is convenient, used by the new sis code, and takes
advantage of M_ZERO on BSDs.
2003-08-29 19:16:13 +00:00
Michel Daenzer 4b60cae90e IRQ code cleanup suggested by Linus Torvalds
i830 build fix
2003-07-29 10:11:48 +00:00
Michel Daenzer bef7017749 Compile fixes for recent 2.5/2.6 Linux kernels. I hope this doesn't break
the i830 driver or the BSDs. :)
2003-07-25 10:50:39 +00:00
Leif Delgass 39e1c534c0 Don't need to include linux/wrapper.h - we only use Set/ClearPageReserved
from linux/mm.h now and wrapper.h has been removed in 2.5.69 and later.
2003-07-04 18:31:42 +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 fdf320a1b8 Move the linux AGP includes into drm_agp.h and only define the AGP data
structures if AGP support is enabled in the kernel (__REALLY_HAVE_AGP).
    This fixes the compile errors on kernels without AGP support.
2003-06-14 15:18:49 +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 2c40a56393 move prototypes for gamma functions to gamma_drv.h 2003-04-26 21:22:08 +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 73e20998b4 Rename drm_lists.h to gamma_lists.h 2003-04-22 12:14:59 +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 a1780925fb Move a chunk of gamma-specific code out of drm_dma.h. Remove unused
'DRM_FLAG_NOCTX' option.
2003-04-22 11:31:55 +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
David Dawes d1b7f551e6 Fix DRM module build on 2.5.41 and later kernels (tqueue -> workqueue). 2003-04-17 15:27:34 +00:00
Leif Delgass 10444e06d4 Use list_entry() to get container struct from struct list_head pointers.
Build fix for RedHat 9 kernel (5 args to remap_page_range()).
2003-04-08 01:30:43 +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
Eric Anholt cfa778af9c Merge from bsd-4-0-0-branch. 2003-02-21 23:23:09 +00:00
Michel Daenzer 826aad0aba limit number of pending vblank signals to 100 to prevent DoS, and minor
cleanups
2003-01-11 20:58:20 +00:00
Keith Whitwell fd621fd4a0 remove agpgart informational 2002-12-11 13:40:27 +00:00