Eric Anholt [Mon, 20 Oct 2003 05:09:21 +0000 (05:09 +0000)]
Fix the possibility of sleeping with locks held in sysctls by copying the
data into temporary variables with the lock held then outputting to
sysctls with the lock released. Rearranged a little extra code to aid
this. Note that drm_memory_debug.h hasn't had this fix applied, but I
consider that code to be just about dead anyway.
Eric Anholt [Mon, 20 Oct 2003 00:55:56 +0000 (00:55 +0000)]
Clean up BSD MTRR handling. The NetBSD code is untested, but it's my best
shot.
Eric Anholt [Sun, 19 Oct 2003 23:35:58 +0000 (23:35 +0000)]
- 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.
Eric Anholt [Sun, 19 Oct 2003 22:29:08 +0000 (22:29 +0000)]
Clean up extra zeroing of dev->dma, and use calloc to take advantage of
M_ZERO.
Eric Anholt [Sun, 19 Oct 2003 20:06:03 +0000 (20:06 +0000)]
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
Eric Anholt [Fri, 17 Oct 2003 05:13:48 +0000 (05:13 +0000)]
- 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.
Eric Anholt [Fri, 17 Oct 2003 03:14:39 +0000 (03:14 +0000)]
- 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)
Michel Daenzer [Thu, 16 Oct 2003 14:18:52 +0000 (14:18 +0000)]
Introduce COMMIT_RING() as in radeon DRM, stop using error prone writeback
for ring read pointer (Paul Mackerras)
Get rid of some superfluous stuff, minor fixes
Eric Anholt [Thu, 16 Oct 2003 03:20:03 +0000 (03:20 +0000)]
Try that again. It's a long.
Eric Anholt [Thu, 16 Oct 2003 03:19:06 +0000 (03:19 +0000)]
Debug printf format fix.
Eric Anholt [Fri, 3 Oct 2003 08:08:10 +0000 (08:08 +0000)]
Some code cleanups done while working on locking. Reduces always-true
tests, excessive indenation, convoluted handling of errors, or code
duplication.
Eric Anholt [Fri, 3 Oct 2003 07:02:51 +0000 (07:02 +0000)]
Stylistic preparation for SMPng locking work: DRM_LOCK/DRM_UNLOCK have side
effects, so make them look like functions (add parenthesis).
Eric Anholt [Thu, 2 Oct 2003 20:52:44 +0000 (20:52 +0000)]
Add an MIT-style copyright, assigned to myself, to these files. I think
I've touched enough of the code here, and there was no previous
copyright. Do some drive-by style fixes while I'm here.
Eric Anholt [Thu, 2 Oct 2003 07:02:34 +0000 (07:02 +0000)]
Axe more old gamma DMA infrastructure.
Eric Anholt [Thu, 2 Oct 2003 04:48:54 +0000 (04:48 +0000)]
Mostly whitespace cleanups and style(9) fixes focused on "if(" -> "if ("
Change some nearby memset()s to bzero()s or to calloc allocations to
take advantage of M_ZERO). Reverse some error tests to reduce high
levels of indentation. Move the sg_cleanup() call out of the maplist
loop in DRM(takedown)-- I can't see any need for it to be inside.
Eric Anholt [Thu, 2 Oct 2003 04:12:34 +0000 (04:12 +0000)]
Wrap sys/endian.h usage with __FreeBSD_version >= 480000.
Obtained from: i865-agp-0-1-branch
Eric Anholt [Thu, 2 Oct 2003 04:07:03 +0000 (04:07 +0000)]
Allow the DRM to attach to a "drmsub" device. This will be provided by the
i810 AGP module, working around the limitation of one driver per
device.
Obtained from: i865-0-1-branch
Eric Anholt [Thu, 2 Oct 2003 03:51:49 +0000 (03:51 +0000)]
MTRR issue with SMP and -stable seems to be resolved. Re-enable MTRRs on
4.x
Jose Fonseca [Tue, 30 Sep 2003 22:43:23 +0000 (22:43 +0000)]
file via_drm.h was initially added on branch cle266-0-0-1-branch.
Jose Fonseca [Tue, 30 Sep 2003 22:43:23 +0000 (22:43 +0000)]
file via.h was initially added on branch cle266-0-0-1-branch.
Jose Fonseca [Tue, 30 Sep 2003 22:43:23 +0000 (22:43 +0000)]
file via_drv.c was initially added on branch cle266-0-0-1-branch.
Jose Fonseca [Tue, 30 Sep 2003 22:43:23 +0000 (22:43 +0000)]
file via_drv.h was initially added on branch cle266-0-0-1-branch.
Jose Fonseca [Tue, 30 Sep 2003 22:43:23 +0000 (22:43 +0000)]
file via_ds.c was initially added on branch cle266-0-0-1-branch.
Jose Fonseca [Tue, 30 Sep 2003 22:43:23 +0000 (22:43 +0000)]
file via_ds.h was initially added on branch cle266-0-0-1-branch.
Jose Fonseca [Tue, 30 Sep 2003 22:43:23 +0000 (22:43 +0000)]
file via_map.c was initially added on branch cle266-0-0-1-branch.
Jose Fonseca [Tue, 30 Sep 2003 22:43:23 +0000 (22:43 +0000)]
file via_mm.c was initially added on branch cle266-0-0-1-branch.
Jose Fonseca [Tue, 30 Sep 2003 22:43:23 +0000 (22:43 +0000)]
file via_mm.h was initially added on branch cle266-0-0-1-branch.
Leif Delgass [Sun, 28 Sep 2003 21:27:09 +0000 (21:27 +0000)]
Fix typo in SiS help message (and testing cvs commit to
dri.freedesktop.org)
Eric Anholt [Thu, 25 Sep 2003 23:04:10 +0000 (23:04 +0000)]
Whitespace cleanup (spaces before tabs or instead of tabs).
Eric Anholt [Thu, 25 Sep 2003 19:08:46 +0000 (19:08 +0000)]
Whitespace cleanup.
Submitted by: Linus Torvalds <torvalds@osdl.org>
Eric Anholt [Thu, 25 Sep 2003 19:08:11 +0000 (19:08 +0000)]
Fix Kconfig for SiS DRM now that it doesn't require sisfb.
Submitted by: Linus Torvalds <torvalds@osdl.org>
Alan Hourihane [Wed, 24 Sep 2003 14:39:25 +0000 (14:39 +0000)]
post merge fix
Alan Hourihane [Sat, 13 Sep 2003 00:25:59 +0000 (00:25 +0000)]
compatibility layer still uses agp (not gart)
Alan Hourihane [Fri, 12 Sep 2003 20:03:17 +0000 (20:03 +0000)]
bsd drm fixes
Alan Hourihane [Fri, 12 Sep 2003 20:00:59 +0000 (20:00 +0000)]
linux drm fixes
Alan Hourihane [Fri, 12 Sep 2003 14:24:17 +0000 (14:24 +0000)]
resolve merge conflicts
Keith Whitwell [Tue, 9 Sep 2003 07:45:12 +0000 (07:45 +0000)]
Use spldrm/splx around tsleep() in DRM_WAIT_ON
Eric Anholt [Sun, 7 Sep 2003 23:56:20 +0000 (23:56 +0000)]
Correct format in debug printfs (free is a pointer, not an int).
Eric Anholt [Sun, 7 Sep 2003 23:27:04 +0000 (23:27 +0000)]
Fix for older -stable.
Obtained from: FreeBSD CVS
Eric Anholt [Fri, 29 Aug 2003 21:41:32 +0000 (21:41 +0000)]
Update to reflect renaming of SIS ioctls.
Eric Anholt [Fri, 29 Aug 2003 20:54:26 +0000 (20:54 +0000)]
These files were missed in the SiS DRM commit.
Eric Anholt [Fri, 29 Aug 2003 19:24:36 +0000 (19:24 +0000)]
Port the SiS DRM to FreeBSD. This includes the ability for the DRM to
allocate framebuffer memory without sisfb, and a new ioctl to be used
by the X Server which tells the DRM what region of framebuffer memory
to allocate from. Also fixes a possibility to panic the kernel I
believe. Tested on linux with sisfb and FreeBSD (without sisfb) with
new DRI only.
Eric Anholt [Fri, 29 Aug 2003 19:16:13 +0000 (19:16 +0000)]
Add DRM(calloc), which is convenient, used by the new sis code, and takes
advantage of M_ZERO on BSDs.
Eric Anholt [Fri, 29 Aug 2003 19:08:06 +0000 (19:08 +0000)]
Update radeon PCI IDs.
Eric Anholt [Fri, 29 Aug 2003 19:07:27 +0000 (19:07 +0000)]
This PCI header has been living in dev/pci/ for a while now.
Michel Daenzer [Thu, 28 Aug 2003 12:14:17 +0000 (12:14 +0000)]
Remove superfluous TLB flush
Michel Daenzer [Tue, 26 Aug 2003 16:49:33 +0000 (16:49 +0000)]
Rename agp to gart for radeon
Michel Daenzer [Tue, 26 Aug 2003 15:44:01 +0000 (15:44 +0000)]
Remove artificial PCI GART limitations, rename AGP to GART where
appropriate
Eric Anholt [Tue, 19 Aug 2003 02:22:57 +0000 (02:22 +0000)]
Fix the debug build.
Eric Anholt [Tue, 19 Aug 2003 00:41:00 +0000 (00:41 +0000)]
- 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.
Michel Daenzer [Mon, 18 Aug 2003 23:46:19 +0000 (23:46 +0000)]
Clean up Radeon DRI resume code
Eric Anholt [Mon, 18 Aug 2003 23:42:16 +0000 (23:42 +0000)]
Make r128_do_wait_for_idle static, as it's only used in this file.
Noticed by: CScout
Eric Anholt [Mon, 18 Aug 2003 23:41:05 +0000 (23:41 +0000)]
Remove an unnecessary #define __NO_VERSION__
Noticed by: CScout
Michel Daenzer [Fri, 15 Aug 2003 10:31:54 +0000 (10:31 +0000)]
Merge from 2.6 kernel (Linus Torvalds)
Dave Airlie [Fri, 15 Aug 2003 01:05:24 +0000 (01:05 +0000)]
DA: loads of whitespace .. some from Linus, some from me
Dave Airlie [Wed, 13 Aug 2003 23:35:40 +0000 (23:35 +0000)]
DA: patch from Matthew upgraded to latest DRI head to solve issue with i810
compatibility
Eric Anholt [Tue, 12 Aug 2003 21:48:16 +0000 (21:48 +0000)]
Whitespace cleanup from the pageflipping commit.
Eric Anholt [Tue, 12 Aug 2003 21:47:34 +0000 (21:47 +0000)]
Document change in interface version 1.9.
Eric Anholt [Tue, 12 Aug 2003 21:34:03 +0000 (21:34 +0000)]
Document the changes in interface version 2.5.
Eric Anholt [Tue, 12 Aug 2003 21:18:05 +0000 (21:18 +0000)]
Merge from FreeBSD r1.11: We have memset in the kernel, no need to define
it to bzero (which it was always used for).
Dave Airlie [Mon, 11 Aug 2003 01:46:02 +0000 (01:46 +0000)]
DA: code cleanups for i810_dma.c from 2.4 kernel
Ian Romanick [Fri, 8 Aug 2003 21:06:44 +0000 (21:06 +0000)]
Added some information as to when (which DRM version) various queries were
added.
Michel Daenzer [Thu, 7 Aug 2003 10:13:50 +0000 (10:13 +0000)]
build fix for kernels >= 2.6
Michel Daenzer [Wed, 6 Aug 2003 11:46:21 +0000 (11:46 +0000)]
Fix maplist entries being used after they were freed; thanks to Benjamin
Herrenschmidt for tracking this down
Michel Daenzer [Tue, 29 Jul 2003 10:11:48 +0000 (10:11 +0000)]
IRQ code cleanup suggested by Linus Torvalds
i830 build fix
Michel Daenzer [Sat, 26 Jul 2003 15:59:09 +0000 (15:59 +0000)]
Degrade uninformative error message to debug message, as in other drivers
Eric Anholt [Sat, 26 Jul 2003 03:25:40 +0000 (03:25 +0000)]
Add Rage 128 pageflipping support, defaults to off. DRM version bump to
2.5.0. It still has some issues, including a flicker in the fps meter
in tuxracer and I've seen garbage left behind after moving/closing
windows. However, it's usable. Add the Option "EnablePageFlip" "YES" to
use it.
Eric Anholt [Sat, 26 Jul 2003 03:18:34 +0000 (03:18 +0000)]
Fix FreeBSD build after IRQ changes.
Michel Daenzer [Fri, 25 Jul 2003 10:50:39 +0000 (10:50 +0000)]
Compile fixes for recent 2.5/2.6 Linux kernels. I hope this doesn't break
the i830 driver or the BSDs. :)
Michel Daenzer [Fri, 25 Jul 2003 10:31:37 +0000 (10:31 +0000)]
Fail in DRM(agp_acquire) if the AGP aperture can't be used, such that the X
server falls back to PCI GART or disables the DRI gracefully
Keith Whitwell [Fri, 11 Jul 2003 15:27:55 +0000 (15:27 +0000)]
Restore __HAVE_KERNEL_CTX_SWITCH, required for the sparc drm module in the
kernel tree. Added comments to that effect.
Dave Airlie [Wed, 9 Jul 2003 23:21:15 +0000 (23:21 +0000)]
DA: fix for bug 484 in Bugzilla, originally from me, reworked by David
Dawes to avoid backword incompatibilities...
Jose Fonseca [Wed, 9 Jul 2003 09:28:42 +0000 (09:28 +0000)]
file drm_mem.h was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Wed, 9 Jul 2003 09:26:17 +0000 (09:26 +0000)]
file drm_dma.c was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Wed, 9 Jul 2003 09:26:17 +0000 (09:26 +0000)]
file drm_fops.c was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Wed, 9 Jul 2003 09:26:17 +0000 (09:26 +0000)]
file drm_lock.c was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Wed, 9 Jul 2003 09:26:17 +0000 (09:26 +0000)]
file drm_stub.c was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Wed, 9 Jul 2003 09:26:17 +0000 (09:26 +0000)]
file drm_vm.c was initially added on branch newdrm-0-0-1-branch.
Keith Whitwell [Tue, 8 Jul 2003 17:10:13 +0000 (17:10 +0000)]
Removed unused __HAVE_KERNEL_CTX_SWITCH, whatever that was.
Leif Delgass [Fri, 4 Jul 2003 18:31:42 +0000 (18:31 +0000)]
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.
Jose Fonseca [Tue, 1 Jul 2003 18:56:57 +0000 (18:56 +0000)]
file drm_agp.c was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Tue, 1 Jul 2003 18:56:57 +0000 (18:56 +0000)]
file drm_bufs.c was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Tue, 1 Jul 2003 18:56:57 +0000 (18:56 +0000)]
file drm_mem.c was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Tue, 1 Jul 2003 18:56:57 +0000 (18:56 +0000)]
file drm_pci.c was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Tue, 1 Jul 2003 18:56:57 +0000 (18:56 +0000)]
file drm_sg.c was initially added on branch newdrm-0-0-1-branch.
Alan Hourihane [Mon, 23 Jun 2003 16:34:14 +0000 (16:34 +0000)]
file savage_dma.c was initially added on branch savage-1_0_0-branch.
Alan Hourihane [Mon, 23 Jun 2003 16:34:14 +0000 (16:34 +0000)]
file savage_state.c was initially added on branch savage-1_0_0-branch.
Jose Fonseca [Sat, 21 Jun 2003 15:27:51 +0000 (15:27 +0000)]
file drm_pci_tmp.h was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Sat, 21 Jun 2003 14:01:43 +0000 (14:01 +0000)]
file drm_stub_tmp.h was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Sat, 21 Jun 2003 13:18:47 +0000 (13:18 +0000)]
file drm_memory_tmp.h was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Sat, 21 Jun 2003 13:09:08 +0000 (13:09 +0000)]
file drm_vm_tmp.h was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Sat, 21 Jun 2003 12:49:34 +0000 (12:49 +0000)]
file drm_dma_tmp.h was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Sat, 21 Jun 2003 12:27:27 +0000 (12:27 +0000)]
file drm_lock_tmp.h was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Thu, 19 Jun 2003 00:14:25 +0000 (00:14 +0000)]
file drm_bufs_tmp.h was initially added on branch newdrm-0-0-1-branch.
Jose Fonseca [Thu, 19 Jun 2003 00:09:52 +0000 (00:09 +0000)]
Revert the janitorial - that works is now on the new branch
newdrm-0-0-1-branch.
Keith Whitwell [Wed, 18 Jun 2003 15:07:31 +0000 (15:07 +0000)]
file i830_compat.c was initially added on branch i865-agp-0-1-branch.
Keith Whitwell [Wed, 18 Jun 2003 15:07:31 +0000 (15:07 +0000)]
file i830.h was initially added on branch i865-agp-0-1-branch.
Keith Whitwell [Wed, 18 Jun 2003 15:07:31 +0000 (15:07 +0000)]
file i830_dma.c was initially added on branch i865-agp-0-1-branch.
Keith Whitwell [Wed, 18 Jun 2003 15:07:31 +0000 (15:07 +0000)]
file i830_drm.h was initially added on branch i865-agp-0-1-branch.
Keith Whitwell [Wed, 18 Jun 2003 15:07:31 +0000 (15:07 +0000)]
file i830_drv.c was initially added on branch i865-agp-0-1-branch.