Commit Graph

85 Commits (81eaff44c47cfb23e96b1cb848df5fd7ea24f913)

Author SHA1 Message Date
Eric Anholt 0cf1887139 - SMPng lock the DRM. This is only partial -- there are a few code paths
used by root (the X Server) which are not locked. However, it should
    deal with lost-IRQ issues on -current which I think people have been
    experiencing but I am unable to reproduce (though I understand why they
    would occur, because of a bug of mine). Note that most of the locking
    (DRM_LOCK()/UNLOCK()) is all covered by Giant still, so it doesn't
    matter yet.
- Remove locking on FreeBSD-stable and NetBSD. These are covered by the
    fact that there is no reentrancy of the kernel except by interrupts,
    which are locked using spldrm()/splx() instead.
2003-10-19 23:35:58 +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 89dd7be3dd Axe more old gamma DMA infrastructure. 2003-10-02 07:02:34 +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
Eric Anholt ad78a613a4 - Remove $FreeBSD$ tags as they weren't too useful and merges are now being
done through perforce.
- Add copyright headers to drm_os_*bsd.h, still need to research the other
    copyright-less files better.
2003-08-19 00:41:00 +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
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
Eric Anholt ce514e08aa Add PCI DMA memory functions and make addbufs_pci and associated code use
it. To do this we need to save the bus address along with the virtual
    address in the seglist. Also fix some error handling and a few bits of
    whitespace.
2003-04-26 22:52:39 +00:00
Eric Anholt 8621ae310b Move the memory functions with debugging info to drm_memory_debug.h, and
remove a couple of dead functions.
2003-04-26 22:18:39 +00:00
Eric Anholt 77ee73f8cd Merge from FreeBSD-current. 2003-04-25 02:27:21 +00:00
Eric Anholt a147df879b Remove more gamma DMA infrastructure. Most of this code was copied straight
from linux, so it could be added back if some driver needed it in the
    future.
2003-04-24 19:09:55 +00:00
Eric Anholt 01178567eb Remove more gamma DMA code. This isn't all of it, but it's a major portion. 2003-04-24 06:19:54 +00:00
Eric Anholt c6d2af70cb Move some common code from addbufs_<type> to addbufs. Make buf_alloc be
protected by the count_lock and make it non-atomic.
2003-04-24 05:56:44 +00:00
Eric Anholt af3bfdef26 Remove the ioctl_count variable from the device. A reference is held to the
fp throughout the ioctl syscall, so the device can't be closed out from
    under us.
2003-04-24 05:14:05 +00:00
Eric Anholt bcd527ee71 Remove a bunch of dead code and fix spelling of a couple of comments. 2003-04-24 04:50:07 +00:00
Eric Anholt 9b2b2337b3 Move one definition to drm_drv.h and remove the rest of drm_init.h which
was all unused.
2003-04-24 00:46:03 +00:00
Eric Anholt e21473c888 Remove DRM_DMA_HISTOGRAM and associated code. 2003-04-24 00:37:35 +00:00
Eric Anholt 1fc0a5e1e4 Make DRM(read) and DRM(poll) stubs and remove DRM(write) and
DRM(write_string). This is the first part of removing much of the
    support code for gamma from the BSD DRM, since it appears that no new
    drivers are using it and nobody has ever shown interest in gamma on
    BSD.
2003-04-24 00:25:36 +00:00
Eric Anholt aea0418d0d Remove dead vma code and remove the unused devstate struct definition. 2003-03-29 18:22:28 +00:00
Eric Anholt 6ef79263b6 Add DRMFILE definitions and supply filp for BSD in the
post-drm-filp-0-1-branch world. The filp is a void * cast from the
    current pid. This is a temporary solution which maintains the status
    quo until a proper solution is implemented.
What is really needed is a unique pointer per open, hopefully with a device
    private area. This can be done in FreeBSD for all entry points except
    mmap, but is difficult (sys/dev/streams/streams.c is an example). I
    have partially completed code for this but have not had time to debug,
    so this is a temporary fix.
2003-03-29 03:38:47 +00:00
Eric Anholt 0bd0dd2300 Merge back from FreeBSD-current, adding FreeBSD ID tags to aid future
merging. Also includes an update to radeon PCI IDs.
2003-03-11 20:51:28 +00:00
Eric Anholt bf4b8ba753 Remove the vbl signal code because it's untested (and has lock issues on
-current).
2003-03-06 19:21:23 +00:00
Eric Anholt cfa778af9c Merge from bsd-4-0-0-branch. 2003-02-21 23:23:09 +00:00
Eric Anholt a885d6786f Add vblank signal code for BSD DRM. Untested so far, but working with a
4.2.0 userland at least.
2002-12-06 02:27:30 +00:00
Eric Anholt 10900dab7c Use bus_alloc_resource/bus_release_resource more properly: save the rid
returned by alloc.
2002-10-29 03:20:21 +00:00
Eric Anholt 97961e2c65 BSD vblank framework. 2002-09-26 07:45:07 +00:00
Alan Hourihane 74ef13fd00 merged bsd-3-0-0-branch 2002-07-05 08:31:11 +00:00
Alan Hourihane 46cacdca85 first pass at merging mesa 4.0 kernel drivers into new bsd-3-0-0 branch. 2002-03-06 19:30:45 +00:00
David Dawes 44aa4d6297 First pass merge of XFree86 4.2.0 import. 2002-01-27 20:05:42 +00:00
David Dawes 18fc5ee923 First pass of XFree86 4.0.99.2 merge. 2001-04-09 21:56:31 +00:00
Alan Hourihane 8bc39d01ca Import of XFree86 4.0.1 2000-07-10 21:32:06 +00:00
Doug Rabson d399dbcd56 Merged bsd-1-0-1 2000-06-13 17:38:09 +00:00
Doug Rabson fa0a35a25f Merged bsd-1-0-0 2000-05-30 17:13:31 +00:00