profile/ivi/libdrm.git
19 years agoFixed a cut-and-paste bug that could cause an oops in mga_do_cleanup_dma
Ian Romanick [Fri, 14 Oct 2005 01:25:38 +0000 (01:25 +0000)]
Fixed a cut-and-paste bug that could cause an oops in mga_do_cleanup_dma
    when mga_do_init_dma fails. Still trying to determine why
    mga_do_init_dma is failing.
Signed-off-by: Ian Romanick <idr@us.ibm.com>
19 years agoBetter pkgconfig-fu: -ldrm in Libs:
Adam Jackson [Thu, 13 Oct 2005 21:03:31 +0000 (21:03 +0000)]
Better pkgconfig-fu: -ldrm in Libs:

19 years agoAdd X300 RV370
Dave Airlie [Thu, 13 Oct 2005 11:21:31 +0000 (11:21 +0000)]
Add X300 RV370

19 years agoThe Linux 2.6.9 (and earlier) fops structure does not contain a
Ian Romanick [Tue, 11 Oct 2005 17:34:49 +0000 (17:34 +0000)]
The Linux 2.6.9 (and earlier) fops structure does not contain a
    .compat_ioctl field. This change makes the DRM build on those kernels.
Signed-off-by: Ian Romanick <idr@us.ibm.com>
19 years agoSkeleton nv drm driver, to enable DMA in EXA. (Lars Knoll, minor updates by
Adam Jackson [Thu, 6 Oct 2005 23:31:29 +0000 (23:31 +0000)]
Skeleton nv drm driver, to enable DMA in EXA. (Lars Knoll, minor updates by
    me)

19 years agoremove version not used anymore
Dave Airlie [Thu, 6 Oct 2005 23:08:58 +0000 (23:08 +0000)]
remove version not used anymore

19 years agofix header this is now a c file
Dave Airlie [Fri, 30 Sep 2005 09:09:03 +0000 (09:09 +0000)]
fix header this is now a c file

19 years agonow I've lindented kernel it might be useful again
Dave Airlie [Fri, 30 Sep 2005 07:10:16 +0000 (07:10 +0000)]
now I've lindented kernel it might be useful again

19 years agoAdd support to turn writeback off via radeon module option
Dave Airlie [Fri, 30 Sep 2005 06:41:10 +0000 (06:41 +0000)]
Add support to turn writeback off via radeon module option

19 years agofix pci overriding from userspace
Dave Airlie [Fri, 30 Sep 2005 06:35:09 +0000 (06:35 +0000)]
fix pci overriding from userspace

19 years agofixup bens fix so it works..
Dave Airlie [Fri, 30 Sep 2005 03:39:02 +0000 (03:39 +0000)]
fixup bens fix so it works..

19 years agoAdd Bens fix for radeon maps on ppc
Dave Airlie [Fri, 30 Sep 2005 03:14:18 +0000 (03:14 +0000)]
Add Bens fix for radeon maps on ppc

19 years agovia: fix stray error printout message.
Thomas Hellstrom [Sun, 25 Sep 2005 14:38:07 +0000 (14:38 +0000)]
via: fix stray error printout message.

19 years agoAdd the via PCI DMA blit code.
Thomas Hellstrom [Sun, 25 Sep 2005 12:54:12 +0000 (12:54 +0000)]
Add the via PCI DMA blit code.

19 years agohopefully fix server recycling on PCIE
Dave Airlie [Sun, 25 Sep 2005 08:54:31 +0000 (08:54 +0000)]
hopefully fix server recycling on PCIE

19 years agoadd __ATTR
Dave Airlie [Sun, 25 Sep 2005 05:19:06 +0000 (05:19 +0000)]
add __ATTR

19 years agouse linux kernel macros don't make our own
Dave Airlie [Sun, 25 Sep 2005 03:09:51 +0000 (03:09 +0000)]
use linux kernel macros don't make our own

19 years agoremove pci_find_class use for alpha
Dave Airlie [Sun, 18 Sep 2005 09:31:06 +0000 (09:31 +0000)]
remove pci_find_class use for alpha

19 years agocompat for pci_pretty_name
Dave Airlie [Sat, 17 Sep 2005 04:16:51 +0000 (04:16 +0000)]
compat for pci_pretty_name

19 years agoupdate autogen from xserver tree
Dave Airlie [Mon, 12 Sep 2005 06:21:24 +0000 (06:21 +0000)]
update autogen from xserver tree

19 years agoFix the spelling of DRM_AUTH so that the bsd core stuff builds again. Next
Eric Anholt [Mon, 12 Sep 2005 05:35:51 +0000 (05:35 +0000)]
Fix the spelling of DRM_AUTH so that the bsd core stuff builds again. Next
    up is pcigart.

19 years agoadd some pci express chips
Dave Airlie [Mon, 12 Sep 2005 04:37:52 +0000 (04:37 +0000)]
add some pci express chips

19 years agomake PCI Express work on 64-bit machines, thanks to Alex Deucher (agd5f)
Dave Airlie [Mon, 12 Sep 2005 04:35:31 +0000 (04:35 +0000)]
make PCI Express work on 64-bit machines, thanks to Alex Deucher (agd5f)

19 years agoback out change as gart is now in framebuffer for PCIE
Dave Airlie [Sun, 11 Sep 2005 09:58:19 +0000 (09:58 +0000)]
back out change as gart is now in framebuffer for PCIE

19 years agoAdd GART in FB support for ati pcigart, and PCIE support for r300
Dave Airlie [Sun, 11 Sep 2005 08:51:23 +0000 (08:51 +0000)]
Add GART in FB support for ati pcigart, and PCIE support for r300

19 years agofix makefile bug
Dave Airlie [Sun, 11 Sep 2005 07:08:46 +0000 (07:08 +0000)]
fix makefile bug

19 years agoAdd support for GL_ATI_fragment_shader, new packets R200_EMIT_PP_AFS_0/1,
Roland Scheidegger [Fri, 9 Sep 2005 22:35:49 +0000 (22:35 +0000)]
Add support for GL_ATI_fragment_shader, new packets R200_EMIT_PP_AFS_0/1,
    R200_EMIT_PP_TXCTLALL_0-5 (replaces R200_EMIT_PP_TXFILTER_0-5, 2 more
    regs) and R200_EMIT_ATF_TFACTOR (replaces R200_EMIT_TFACTOR_0 (8 consts
    instead of 6)

19 years agoAdd another R300 PCI id. Submitted by: Daniel Estévez
Vladimir Dergachev [Fri, 9 Sep 2005 12:53:44 +0000 (12:53 +0000)]
Add another R300 PCI id. Submitted by: Daniel Estévez

19 years agoconvert ioctl flags to use flags instead of separate ints
Dave Airlie [Sat, 3 Sep 2005 03:27:14 +0000 (03:27 +0000)]
convert ioctl flags to use flags instead of separate ints

19 years agocheck is the map containing the lock
Dave Airlie [Sat, 3 Sep 2005 02:21:22 +0000 (02:21 +0000)]
check is the map containing the lock

19 years ago- Don't try to allocate mappings of less than a PAGE_SIZE in MGA DMA code.
Eric Anholt [Fri, 26 Aug 2005 23:27:19 +0000 (23:27 +0000)]
- Don't try to allocate mappings of less than a PAGE_SIZE in MGA DMA code.
- Comment out the "is this mapping/bufs in allocated AGP" bits in BSD
    because they break mga (which uses AGP allocation that doesn't track
    entries). It's not a security issue when we still have the related
    ioctls marked root-only.
- Apply some power-of-two alignment restrictions to hopefully avoid some
    panicing in bad cases of drm_pci_alloc() on FreeBSD.
- Add verbosity to some error handling that I found useful while debugging.

19 years agoPreviously, drm_get_resource_start() and drm_get_resource_len() would
Eric Anholt [Fri, 26 Aug 2005 20:56:11 +0000 (20:56 +0000)]
Previously, drm_get_resource_start() and drm_get_resource_len() would
    allocate the resource RF_ACTIVE, pull out the appropriate value, and
    return it. However, allocating large framebuffers RF_ACTIVE would run
    the system out of KVA, and this also left open the possibility of the
    resource getting moved after getting the offset. Instead, when either
    of these are called, allocate the resource if it isn't allocated
    already (non-RF_ACTIVE) and store it in the DRM device, to be cleaned
    up on lastclose.

19 years agoFix a lack of parenthesis in macro usage that showed up with INVARIANTS
Eric Anholt [Fri, 26 Aug 2005 19:07:03 +0000 (19:07 +0000)]
Fix a lack of parenthesis in macro usage that showed up with INVARIANTS
    turned on, i.e. in a kernel build.

19 years ago[1] Fix BSD DRM for the nonroot changes. [2] Don't attempt to acquire the
Eric Anholt [Fri, 26 Aug 2005 00:16:01 +0000 (00:16 +0000)]
[1] Fix BSD DRM for the nonroot changes. [2] Don't attempt to acquire the
    DMA lock in a non-DMA driver, as it will be uninitialized.
Submitted by: [1] jkim (minor changes by me)

19 years agoAdd missing .cvsignore files for autotoolery.
Eric Anholt [Thu, 25 Aug 2005 23:11:28 +0000 (23:11 +0000)]
Add missing .cvsignore files for autotoolery.

19 years agoInclude appropriate CFLAGS to find X headers, needed to build libdrm.
Eric Anholt [Thu, 25 Aug 2005 02:59:21 +0000 (02:59 +0000)]
Include appropriate CFLAGS to find X headers, needed to build libdrm.

19 years agoadd options for x86_64 and amd will small letters
Dave Airlie [Tue, 23 Aug 2005 04:10:50 +0000 (04:10 +0000)]
add options for x86_64 and amd will small letters

19 years agoremove the README in the linux-2.6 directory
Alan Hourihane [Mon, 22 Aug 2005 09:52:18 +0000 (09:52 +0000)]
remove the README in the linux-2.6 directory

19 years agoremove i915_pm code as it causes too many issues with current software
Alan Hourihane [Mon, 22 Aug 2005 09:50:12 +0000 (09:50 +0000)]
remove i915_pm code as it causes too many issues with current software
    suspend, and the DDX driver re-inits the board successfully anyway.

19 years agoallocating the PCIE table from GFP_DMA seems to stop it NMI'ing
Dave Airlie [Sun, 21 Aug 2005 11:07:03 +0000 (11:07 +0000)]
allocating the PCIE table from GFP_DMA seems to stop it NMI'ing

19 years agoWe don't need to install all the internal headers files only drm.h and
Dave Airlie [Sun, 21 Aug 2005 03:04:32 +0000 (03:04 +0000)]
We don't need to install all the internal headers files only drm.h and
    *_drm.h have user space interfaces

19 years agoadd x86_64 to the list as well
Dave Airlie [Sat, 20 Aug 2005 07:38:11 +0000 (07:38 +0000)]
add x86_64 to the list as well

19 years agoremove checks that make ppc64 not work properly... also fix ppc64 check..
Dave Airlie [Sat, 20 Aug 2005 07:33:07 +0000 (07:33 +0000)]
remove checks that make ppc64 not work properly... also fix ppc64 check..
    we should be safe doing this..

19 years agoadd powerpc64 to the list of archs that this test doesn't make sense on
Dave Airlie [Sat, 20 Aug 2005 07:12:45 +0000 (07:12 +0000)]
add powerpc64 to the list of archs that this test doesn't make sense on

19 years agoFix silly install issue by moving the header install rules for shared-core
Adam Jackson [Sat, 20 Aug 2005 03:32:09 +0000 (03:32 +0000)]
Fix silly install issue by moving the header install rules for shared-core
    into shared-core/Makefile.am. Bump to 1.0.3.

19 years agoAdd r300_reg.h. Bump to 1.0.2.
Adam Jackson [Fri, 19 Aug 2005 20:14:10 +0000 (20:14 +0000)]
Add r300_reg.h. Bump to 1.0.2.

19 years agoadd agp buffer token
Dave Airlie [Wed, 17 Aug 2005 22:59:00 +0000 (22:59 +0000)]
add agp buffer token

19 years agorevert reversion of a part of a patch from Jon, that I did last night while
Dave Airlie [Wed, 17 Aug 2005 10:48:38 +0000 (10:48 +0000)]
revert reversion of a part of a patch from Jon, that I did last night while
    checking things in in my sleep

19 years agocommit toggle switch to make Linux drm_handle_t unsigned int
Dave Airlie [Wed, 17 Aug 2005 00:14:18 +0000 (00:14 +0000)]
commit toggle switch to make Linux drm_handle_t unsigned int

19 years agoRemove the long-stale BSD non-core bits.
Eric Anholt [Tue, 16 Aug 2005 17:20:18 +0000 (17:20 +0000)]
Remove the long-stale BSD non-core bits.
Prodded by: CVS breakage resulting in complaints about this directory.

19 years agoadd Egberts 32/64 bit patch (its in kernel already...)
Dave Airlie [Tue, 16 Aug 2005 12:51:57 +0000 (12:51 +0000)]
add Egberts 32/64 bit patch (its in kernel already...)

19 years agoPort the VIA DRM to FreeBSD. Original patch by Jake, with some cleanup by
Eric Anholt [Mon, 15 Aug 2005 18:07:12 +0000 (18:07 +0000)]
Port the VIA DRM to FreeBSD. Original patch by Jake, with some cleanup by
    me to match other drivers and avoid ifdeffing. The linux via_drv.c will
    be moved from shared-core to linux-core soon by repocopy.
Submitted by: Jake Burkholder <jake@FreeBSD.org> Tested by: unichrome

19 years agoVIA bugvixes by Joris van Rantwijk Initial commit.
Thomas Hellstrom [Sun, 14 Aug 2005 09:52:09 +0000 (09:52 +0000)]
VIA bugvixes by Joris van Rantwijk Initial commit.

19 years agoFix build after linux-side checkin of master/root-only split. Still only
Eric Anholt [Fri, 12 Aug 2005 17:18:08 +0000 (17:18 +0000)]
Fix build after linux-side checkin of master/root-only split. Still only
    cares about root on the BSD side, but should be secure.

19 years agoReverting the previous via security-fix commit, since the assumption of
Thomas Hellstrom [Fri, 12 Aug 2005 14:19:33 +0000 (14:19 +0000)]
Reverting the previous via security-fix commit, since the assumption of
    contexts registered with the callers filp was wrong.

19 years agoMissing symbol export from previous via context check commit.
Thomas Hellstrom [Thu, 11 Aug 2005 13:05:12 +0000 (13:05 +0000)]
Missing symbol export from previous via context check commit.

19 years agoSecurity fix on via: Checking that the specified context belongs to the
Thomas Hellstrom [Wed, 10 Aug 2005 19:46:46 +0000 (19:46 +0000)]
Security fix on via: Checking that the specified context belongs to the
    caller on fb / agp memory alloc and free. Otherwise malicious clients
    can register allocations on other clients or free memory used by other
    clients which will lead to severe memory manager inconsistensies.

19 years agoMake sure savage has 3rd ioctl parameter
Jon Smirl [Tue, 9 Aug 2005 01:40:45 +0000 (01:40 +0000)]
Make sure savage has 3rd ioctl parameter

19 years agomake some functions static in the savage drm driver
Dave Airlie [Sun, 7 Aug 2005 05:37:25 +0000 (05:37 +0000)]
make some functions static in the savage drm driver

19 years agofix ioctl in r128 drm direction from Egbert Eich.
Dave Airlie [Sun, 7 Aug 2005 05:32:06 +0000 (05:32 +0000)]
fix ioctl in r128 drm direction from Egbert Eich.

19 years agoremove bus address
Dave Airlie [Sun, 7 Aug 2005 04:38:11 +0000 (04:38 +0000)]
remove bus address

19 years agoFix bug in return to userspace resctx code
Dave Airlie [Fri, 5 Aug 2005 13:04:21 +0000 (13:04 +0000)]
Fix bug in return to userspace resctx code
From: Egbert Eich <eich@suse.de>

19 years agoRename the driver hooks in the DRM to something a little more
Eric Anholt [Fri, 5 Aug 2005 03:50:23 +0000 (03:50 +0000)]
Rename the driver hooks in the DRM to something a little more
    understandable: preinit -> load postinit -> (removed) presetup ->
    firstopen postsetup -> (removed) open_helper -> open prerelease ->
    preclose free_filp_priv -> postclose pretakedown -> lastclose
    postcleanup -> unload release -> reclaim_buffers_locked version ->
    (removed)
postinit and version were replaced with generic code in the Linux DRM
    (drivers now set their version numbers and description in the driver
    structure, like on BSD). postsetup wasn't used at all. Fixes the savage
    hooks for initializing and tearing down mappings at the right times.
    Testing involved at least starting X, running glxgears, killing
    glxgears, exiting X, and repeating.
Tested on: FreeBSD (g200, g400, r200, r128) Linux (r200, savage4)

19 years agoImplement permanent sarea maps
Jon Smirl [Thu, 4 Aug 2005 14:48:43 +0000 (14:48 +0000)]
Implement permanent sarea maps

19 years agoTighten up AGP security. Verify that all uses of AGP are done inside
Jon Smirl [Thu, 4 Aug 2005 14:39:25 +0000 (14:39 +0000)]
Tighten up AGP security. Verify that all uses of AGP are done inside
    buffers that have been allocated from AGP. This includes some new
    capable(CAP_SYS_ADMIN) checks, these functions are also protected by
    the root requirement on the IOCTL macros.

19 years agoMark some radeon init variables deprecated. These used to be passed in but
Jon Smirl [Thu, 4 Aug 2005 13:59:48 +0000 (13:59 +0000)]
Mark some radeon init variables deprecated. These used to be passed in but
    the driver already knew their correct value. For example the physical
    address of the framebuffer and registers.

19 years agoSplit the control of master vs root priv. Everything is still marked as
Jon Smirl [Thu, 4 Aug 2005 13:15:27 +0000 (13:15 +0000)]
Split the control of master vs root priv. Everything is still marked as
    needing root.

19 years agoWhitespace fixups.
Eric Anholt [Thu, 4 Aug 2005 07:46:11 +0000 (07:46 +0000)]
Whitespace fixups.

19 years agoFix the MGA driver on BSD by passing in the proper chipset flags to the
Eric Anholt [Thu, 4 Aug 2005 07:42:01 +0000 (07:42 +0000)]
Fix the MGA driver on BSD by passing in the proper chipset flags to the
    driver's preinit routine, and by using DRM_COPY_TO_USER_IOCTL when
    copying out to an ioctl's data pointer. Pulled from the latest version
    of my drm-hook-rename.diff and only compile-tested after that.

19 years agoAdd a debugging error message from testing new MGA code on BSD.
Eric Anholt [Thu, 4 Aug 2005 07:31:21 +0000 (07:31 +0000)]
Add a debugging error message from testing new MGA code on BSD.

19 years agoversion bump
Adam Jackson [Mon, 1 Aug 2005 20:36:58 +0000 (20:36 +0000)]
version bump

19 years agoFix the pkgconfig info. (Donnie Berkholz)
Adam Jackson [Mon, 1 Aug 2005 20:31:35 +0000 (20:31 +0000)]
Fix the pkgconfig info. (Donnie Berkholz)

19 years agoFix issues with buffer aging when more than one dma buffer is discarded in
Eric Anholt [Thu, 28 Jul 2005 01:44:17 +0000 (01:44 +0000)]
Fix issues with buffer aging when more than one dma buffer is discarded in
    a cmdbuf, which could lead to hangs.
Submitted by: Aapo Tahkola

19 years agoCorrect a couple of descriptions of files in comments (were just
Eric Anholt [Wed, 27 Jul 2005 20:20:30 +0000 (20:20 +0000)]
Correct a couple of descriptions of files in comments (were just
    copy'n'pasted).
Submitted by: jkim

19 years agoLink in the savage files from shared-core.
Eric Anholt [Wed, 27 Jul 2005 20:19:29 +0000 (20:19 +0000)]
Link in the savage files from shared-core.
Submitted by: jkim

19 years agofix driver date and drm minor version for r300 support
Roland Scheidegger [Wed, 27 Jul 2005 18:19:11 +0000 (18:19 +0000)]
fix driver date and drm minor version for r300 support

19 years agoAdd latest r300 support from r300.sf.net CVS. Patch submitted by volodya,
Eric Anholt [Wed, 20 Jul 2005 21:17:47 +0000 (21:17 +0000)]
Add latest r300 support from r300.sf.net CVS. Patch submitted by volodya,
    with BSD fix from jkim and the r300_reg.h license from Nicolai Haehnle.
    Big thanks to everyone involved!

19 years agoAdd .cvsignore file.
Eric Anholt [Tue, 19 Jul 2005 20:59:57 +0000 (20:59 +0000)]
Add .cvsignore file.

19 years agorevert last change due to me bring up too early
Dave Airlie [Sat, 16 Jul 2005 03:11:53 +0000 (03:11 +0000)]
revert last change due to me bring up too early

19 years agoup the version
Dave Airlie [Sat, 16 Jul 2005 02:07:14 +0000 (02:07 +0000)]
up the version

19 years agoEgbert noticed this issue, but changing the IOW to IOWR mess up
Dave Airlie [Sat, 16 Jul 2005 02:03:03 +0000 (02:03 +0000)]
Egbert noticed this issue, but changing the IOW to IOWR mess up
    compatiblity with userspace..

19 years agoVIA: Fix sparse warnings (Alexey Dobriyan)
Thomas Hellstrom [Fri, 15 Jul 2005 21:22:51 +0000 (21:22 +0000)]
VIA: Fix sparse warnings (Alexey Dobriyan)

19 years agodistcheck fixes
Adam Jackson [Wed, 13 Jul 2005 00:13:12 +0000 (00:13 +0000)]
distcheck fixes

19 years agoIRQ must be assigned and enabled or this will hang
Jon Smirl [Mon, 11 Jul 2005 18:27:39 +0000 (18:27 +0000)]
IRQ must be assigned and enabled or this will hang

19 years agoautoconfiscate libdrm
Adam Jackson [Sun, 10 Jul 2005 22:42:42 +0000 (22:42 +0000)]
autoconfiscate libdrm

19 years agoSimplify the sysfs code
Jon Smirl [Sun, 3 Jul 2005 18:07:03 +0000 (18:07 +0000)]
Simplify the sysfs code

19 years agoAdd sysfs attribute dri_library_name on Linux. code in share-core/via_drv.c
Jon Smirl [Sun, 3 Jul 2005 17:16:12 +0000 (17:16 +0000)]
Add sysfs attribute dri_library_name on Linux. code in share-core/via_drv.c
    is ok to be shared, it will be passive on BSD.

19 years agorelease can happen before dev->ctxlist is allocated
Jon Smirl [Thu, 30 Jun 2005 16:00:35 +0000 (16:00 +0000)]
release can happen before dev->ctxlist is allocated

19 years agoRemove the AGP requirement from Makefile and Kconfig for MGA. Remove the
Ian Romanick [Wed, 29 Jun 2005 23:20:30 +0000 (23:20 +0000)]
Remove the AGP requirement from Makefile and Kconfig for MGA. Remove the
    AGP requirement from Kconfig for SIS. There never was a requirement in
    Makefile, and Eric Anholt confirms that the Makefile was correct.

19 years agoadd remaining calls
Alan Hourihane [Wed, 29 Jun 2005 13:19:47 +0000 (13:19 +0000)]
add remaining calls

19 years agoadd i915_ioc32.c
Alan Hourihane [Wed, 29 Jun 2005 13:13:22 +0000 (13:13 +0000)]
add i915_ioc32.c

19 years agosilence warning
Alan Hourihane [Wed, 29 Jun 2005 13:00:29 +0000 (13:00 +0000)]
silence warning

19 years agofix some warnings from cross compiler
Dave Airlie [Wed, 29 Jun 2005 12:02:18 +0000 (12:02 +0000)]
fix some warnings from cross compiler

19 years agomake r128/mga compile properly on sparc cross-compiler
Dave Airlie [Wed, 29 Jun 2005 11:56:42 +0000 (11:56 +0000)]
make r128/mga compile properly on sparc cross-compiler

19 years agoMove to linux specific directory
Alan Hourihane [Wed, 29 Jun 2005 11:36:37 +0000 (11:36 +0000)]
Move to linux specific directory

19 years agoadd mga and r128 32/64 bits
Dave Airlie [Wed, 29 Jun 2005 11:22:39 +0000 (11:22 +0000)]
add mga and r128 32/64 bits
This is Egberts code, ported to Pauls framework by me..

19 years agothese don't need reclaim buffers their release functions handle it
Dave Airlie [Wed, 29 Jun 2005 03:06:47 +0000 (03:06 +0000)]
these don't need reclaim buffers their release functions handle it

19 years agoBug in conversion from old DRM to core DRM....
Dave Airlie [Wed, 29 Jun 2005 02:57:18 +0000 (02:57 +0000)]
Bug in conversion from old DRM to core DRM....

19 years agoGet the BSD DRM compiling again after MGA and mapping changes. Note that
Eric Anholt [Wed, 29 Jun 2005 02:54:19 +0000 (02:54 +0000)]
Get the BSD DRM compiling again after MGA and mapping changes. Note that
    i915 has been disabled for the moment, rather than working around
    linux-specific code in the shared dir.

19 years ago- Remove drm_initmap and replace its usage with drm_addmap. This reduces
Eric Anholt [Tue, 28 Jun 2005 20:58:34 +0000 (20:58 +0000)]
- Remove drm_initmap and replace its usage with drm_addmap. This reduces
    code duplication, and it also hands you the map pointer so you don't
    need to re-find it.
- Remove the permanent maps flag. Instead, for register and framebuffer
    maps, we always check whether there's already a map of that type and
    offset around. Move the Radeon map initialization into presetup (first
    open) so it happens again after every takedown.
- Remove the split cleanup of maps between driver takedown (last close) and
    cleanup (module unload). Instead, always tear down maps on takedown,
    and drivers can recreate them on first open.
- Make MGA always use addmap, instead of allocating consistent memory in
    the PCI case and then faking up a map for it, which accomplished nearly
    the same thing, in a different order. Note that the maps are exposed to
    the user again: we may want to expose a flag to avoid this, but it's
    not a security concern, and saves us a lot of code.
- Remove rmmaps in the MGA driver. Since the function is only called during
    takedown anyway, we can let them die a natural death.
- Make removal of maps happen in one function, which is called by both
    drm_takedown and drm_rmmap_ioctl.
Reviewed by: idr (previous revision) Tested on: mga (old/new/pci dma),
    radeon, savage