Commit Graph

89 Commits (983db58a26c37237acf54af60f28a4243467079a)

Author SHA1 Message Date
Eric Anholt 983db58a26 Fix FreeBSD build after IRQ changes. 2003-07-26 03:18:34 +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
David Dawes 2134577e31 Support for building DRM module on OpenBSD (Wilbern Cobb, Matthieu Herrb).
(resync with XFree86 trunk)
2003-05-20 22:42:24 +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 87ed795ff3 Fix a typo: On takedown the mtrr operation is MEMRANGE_SET_REMOVE, not
_UPDATE.
2003-04-28 23:18:43 +00:00
Eric Anholt 22b9b720d5 Use real endian conversion functions. 2003-04-27 00:43:14 +00:00
Eric Anholt 9828bd24c8 Fix formatting of hw.dri sysctl. 2003-04-26 23:55:30 +00:00
Eric Anholt 766a1da2e5 Remove the map argument from DRM_*MEMORYBARRIER. Not all of the uses of
DRM_*MEMORYBARRIER we had were related to an MMIO space. This means
    arch-specific code on the BSDs, unfortunately. Also add
    DRM_MEMORYBARRIER() and change the DRM_READMEMORYBARRIER()s that used
    to be read/write barriers to it.
2003-04-26 23:32:00 +00:00
Eric Anholt a172ee2a18 MFL: Don't install irq handler unless the driver has been initialized. 2003-04-26 23:04:22 +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 a79adaab72 Missed files in the last commit: Remove memory debugging sysctl unless
MEMORY_DEBUG is set.
2003-04-26 22:21:37 +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 79a0c5757e Remove #if 0'ed code. 2003-04-26 21:57:43 +00:00
Eric Anholt e60eb69bc0 Replace the C atomic_cmpset_int compatibility function for -stable with the
real i386 atomic_cmpset_int from -current. FreeBSD-stable won't ever
    have DRM support for non-i386.
2003-04-26 06:53:22 +00:00
Eric Anholt acb5d6b273 Disable MTRRs on FreeBSD-stable. Without this, it hangs on boot in the MTRR
setting for AGP cards on SMP machines.
2003-04-26 06:39:55 +00:00
Eric Anholt 77ee73f8cd Merge from FreeBSD-current. 2003-04-25 02:27:21 +00:00
Eric Anholt 58650c3a9d Clean up the DRM_COPY_TO_USER()ing of DRM(infobufs), making it more
legible.
2003-04-25 00:02:14 +00:00
Eric Anholt 781828b26e Clean up the style of the linux-compat code and use ioctl() directly rather
than reimplementing it.
2003-04-24 23:57:29 +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 6f88a5351c Whitespace and remove a dead commented line. 2003-04-01 18:53:24 +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
Alan Hourihane c14006ba9f XFree86 4.3.0 merge 2003-03-25 00:29:14 +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 638d45d2a0 Make dma_addr_t an unsigned long not a uint32, don't try to use memrange
functions on FreeBSD non-x86, and remove a dead define.
2003-03-08 05:05:41 +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 a01d26f39d Put cdevsw initialization in line with FreeBSD-current. (From r1.10,r1.11
of FreeBSD CVS)
2003-03-05 06:06:27 +00:00
Eric Anholt 3f786dbd18 Update mmap handling for FreeBSD-current (Based on r1.3 of FreeBSD CVS). 2003-03-05 06:04:50 +00:00
Eric Anholt 1434bfe4a8 Remove a paste-o in DRM_SPINUNINIT and add a volatile to the compatibility
atomic_cmpset_int.
2003-03-05 04:14:52 +00:00
Keith Whitwell 51e5f73d2a DRM_FREE/2 patch from Philip Brown 2003-03-04 11:41:12 +00:00
Eric Anholt b487f30ea5 Fix build on NetBSD. 2003-02-22 18:40:12 +00:00
Eric Anholt cfa778af9c Merge from bsd-4-0-0-branch. 2003-02-21 23:23:09 +00:00
Michel Daenzer c7d471b6ae don't inflate relative vblank sequence numbers on repeated calls (e.g. when
interrupted by a signal)
2003-02-02 03:06:47 +00:00
Eric Anholt 66f57c403c Fix build on -current: Provide M_WAITOK define. 2003-01-24 00:49:15 +00:00
David Dawes 05f761fa4f enums should be ints 2002-12-12 22:20:30 +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 e656655a36 Kernel support for vblank syncing on Rage 128 and Matrox. 2002-10-30 06:10:34 +00:00
Michel Daenzer 5e1b8ed88a preserve CRTC{,2}_OFFSET_CNTL in 2D driver to avoid bad effects when
pageflipping after a mode switch
take current page into account in AdjustFrame(); writing the CRTC offset
    via the CP was probably a bad idea as this can happen asynchronously,
    reverted
take frame offset into account when flipping pages
handle CRTC2 as well for pageflipping (untested)
preserve GEN_INT_CNTL on mode switches to prevent interrupts from getting
    disabled
2002-10-29 13:49:26 +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 9f21f02217 Catch up to -current. 2002-10-27 05:24:33 +00:00
Alan Hourihane b3a20ce219 final part of XFree86 4.2.99.2 merge 2002-10-22 23:38:53 +00:00
Eric Anholt 5e9fad3588 Fix reversed test that broke vblank waiting on FreeBSD.
Pointy hat to: anholt
2002-10-14 23:35:24 +00:00
Eric Anholt 537f2208f0 Remove some noise being spit to the console. 2002-09-29 23:56:17 +00:00