Home | History | Annotate | only in /src/sys/external/bsd/drm/dist/bsd-core
History log of /src/sys/external/bsd/drm/dist/bsd-core
RevisionDateAuthorComments
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
include bsd.subdir.mk
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-09-28 10:40:36 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file Makefile was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.6 28-Aug-2011  jmcneill Split out ati_pcigart into a separate module so it can be shared with r128drm
 1.5 02-Sep-2009  mrg remove a memset() that isn't necessary.
 1.4 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.4 16-Sep-2009  yamt sync with head
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file ati_pcigart.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file ati_pcigart.c was added on branch mjf-devfs2 on 2008-09-28 10:40:36 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file ati_pcigart.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file ati_pcigart.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.26 18-Mar-2022  riastradh old drm: Use getticks(), not hardclock_ticks.

Should delete this code, no idea if it even still compiles.
 1.25 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.24 20-Apr-2015  riastradh branches: 1.24.18;
Remove old drm's container_of.
 1.23 01-Jul-2011  dyoung branches: 1.23.12; 1.23.30;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.22 09-Jun-2011  joerg dma_addr_t may not be a 64bit type, so add an explicit cast here instead
of silent truncation
 1.21 24-Feb-2011  mrg branches: 1.21.2;
convert all crtc values passed in from userland to be unsigned instead
of signed. there's still some more internal to the i915 driver that
should be converted.

tested on a radeon x1550.
 1.20 18-Feb-2011  jmcneill sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.19 24-May-2010  mrg branches: 1.19.2; 1.19.4;
use round_page() for PAGE_ALIGN(). from Onno van der Linden
<o.vd.linden@quicknet.nl> in PR#38700, though apparently i didn't
commit it way back when i closed that bug. oops?
 1.18 24-May-2010  mrg implement DRM_RADEON_CS ioctl, necessary for r600_dri to function.

this is mostly from freebsd (though it also exists in other versions
of the drm code) svn commits:

--
SVN rev 196470 on 2009-08-23 14:55:57Z by rnoland

Add kernel support for Radeon R6/7xx 3D.

You will still need Mesa from git and possibly an updated DDX driver,
but this is working fairly well now.
--
SVN rev 196142 on 2009-08-12 12:57:02Z by rnoland

Add support for radeon RS880 IGP chips to drm.
--
SVN rev 195501 on 2009-07-09 16:39:28Z by rnoland

Add support for Radeon HD 4770 (RV740) chips.
--
SVN rev 196471 on 2009-08-23 15:02:58Z by rnoland

Add GET_PARAM support for Z pipes.

This is needed for occulsion queries on rv530 chips.
--
SVN rev 198695 on 2009-10-30 18:07:22Z by rnoland

A bit of cleanup work on radeon_freelist_get()

* Fix the main loop to search all buffers before sleeping.
* Remove dead code
--
SVN rev 197606 on 2009-09-28 22:41:28Z by rnoland

Fix offset handling
--
SVN rev 197605 on 2009-09-28 22:40:29Z by rnoland

radeon_family is an enum, so ordering can be important.

sync up with what amd is shipping.
--
SVN rev 197603 on 2009-09-28 22:37:07Z by rnoland

R600 doesn't support IRQs yet, so don't try to use them.
--

special thanks to robert noland @ freebsd for making this an
easy port!
 1.17 19-May-2010  mrg only use bus_space*() on drm_local_map_t's that have been mapped into
some bus space somewhere. otherwise, just use normal accesses since
it is normal memory.

this fixes radeondrm on x86 since bus_space_tag_t became a pointer.

add the "GEM" and "TTM" mapping types to sysctl support (though right
now we will never have them in our list of maps.)
 1.16 26-Jan-2010  jmorse branches: 1.16.2; 1.16.4;
PR/42262: Support drm drivers (intel G33/G45) submapping pci resources
 1.15 06-Dec-2009  dyoung Delete the do-nothing device-activation hook, drm_activate().
 1.14 02-Sep-2009  mrg - normalize netbsd drm_mtrr_del() with freebsd, removing a few #if's
- make the mtrr code do nothing on non-x86
 1.13 07-Aug-2009  mrg remove some netbsd specific code that does nothing.
 1.12 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.11 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.10 30-Mar-2009  mrg branches: 1.10.2;
- apply from sys/dev:
revision 1.33
date: 2009/03/29 17:00:50; author: mrg; state: Exp; lines: +12 -4
add a comment explaining DRM_NETBSD_ADDR2HANDLE/DRM_NETBSD_HANDLE2ADDR:

* This hack strips the top bit from amd64 addresses, which avoid
* udv_attach() returning NULL for "negative" offset.
* A better hack would be to encode the offset of some kernel data
* structure..

add a new DRM_HANDLE_NEEDS_MASK macro to check whether the above need to
be applied for various mapping types (_DRM_SHM and _DRM_SCATTER_GATHER.)


also:
- use IPL_VM for now
- use a lot of bus_space
- struct drm_device now has a pointer to the device_t
 1.9 25-Jul-2008  bjs branches: 1.9.2; 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.14; 1.9.18;
- for DRM_NETBSD_HANDLE2ADDR/ADDR2HANDLE, do what uvm does to recover
the virtual address from a uoffset, e.g. uoffset + vm_map_min(kernel_map).

- Eliminate the bus_space_read/write-based DRM_READ/WRITE macros. The
memory we're reading/writing from is not always allocated with bus_space,
and so this will not do. Instead, since all of our bus_space maps are
linear, volatile pointer dereferences will do just fine.

- Unify members of struct drm_dma_handle amongst freebsd and netbsd:
the 'addr' member was superfluous; also, set dmah->tag from
dev->pa.pa_dmat and use that.

- we don't need BUS_DMA_ALLOCNOW, as bus_dmamap_load is called immediately
following bus_dmamap_create(), so there's no need to avoid deferring
allocation to load time.

- Add check for nsegs != 1 in drm_pci_alloc().

- We don't need the DRM_PCI_DMAADDR macro right now--it was only
used once.
 1.8 25-Jul-2008  mrg merge git-change-2580a065d81be645a14af1e91b8441f7e72fcbe4.
 1.7 25-Jul-2008  bjs IRQ_HANDLED should be 1, not 0.
 1.6 19-Jul-2008  mrg merge cornflakes from git-change-04893aa99abfbed8eb6d7067a974fa1f31193c87.
 1.5 19-Jul-2008  bjs use ALIGN() instead of rolling our own.
 1.4 19-Jul-2008  jmcneill Implement drm_drawable gunk and drm_locked_task, untested. i915drm links now.
 1.3 19-Jul-2008  bjs Change IPL of DRM_SPININIT macro to IPL_NONE. Currently, the only
mutex initialized by this macro is the dma lock, which certainly
should not be IPL_VM. The priorities of the other locks should be
revisited.

Also, in DRM_WAIT_ON, enforce the policy of "drm returns -errno
to shared code" (this used to be implemented via a macro).
 1.2 19-Jul-2008  mrg pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.4 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.3 25-Jul-2008  mrg import mesa-drm git from change 2580a065d81be645a14af1e91b8441f7e72fcbe4.
this pulls in a few vblank fixes.
 1.1.1.2 19-Jul-2008  mrg import mesa-drm git at change 04893aa99abfbed8eb6d7067a974fa1f31193c87.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.9.18.1 21-Apr-2010  matt sync to netbsd-5
 1.9.14.2 23-Jul-2009  jym Sync with HEAD.
 1.9.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.10.4 08-Dec-2010  riz Patch the following files (requested by mrg in ticket #1488):
sys/dev/pci/drm/files.pcidrm
sys/external/bsd/drm/dist/bsd-core/drmP.h
sys/external/bsd/drm/dist/bsd-core/drm_pciids.h
sys/external/bsd/drm/dist/bsd-core/drm_sysctl.c
sys/external/bsd/drm/dist/shared-core/r600_blit.c
sys/external/bsd/drm/dist/shared-core/r600_cp.c
sys/external/bsd/drm/dist/shared-core/radeon_cp.c
sys/external/bsd/drm/dist/shared-core/radeon_cs.c
sys/external/bsd/drm/dist/shared-core/radeon_drm.h
sys/external/bsd/drm/dist/shared-core/radeon_drv.h
sys/external/bsd/drm/dist/shared-core/radeon_state.c

implement DRM_RADEON_CS ioctl, necessary for r600_dri to function.
this is mostly from freebsd (though it also exists in other versions
of the drm code.)

only use bus_space*() on drm_local_map_ts that have been mapped into
some bus space somewhere. otherwise, just use normal accesses since
it is normal memory.
 1.9.10.3 30-Jan-2010  snj Pull up following revision(s) (requested by jmorse in ticket #1280):
sys/external/bsd/drm/dist/bsd-core/drm_bufs.c: revision 1.7
sys/external/bsd/drm/dist/bsd-core/drmP.h: revision 1.16
sys/external/bsd/drm/dist/bsd-core/drm_memory.c: revision 1.7
PR/42262: Support drm drivers (intel G33/G45) submapping pci resources
 1.9.10.2 14-Aug-2009  snj Pull up following revision(s) (requested by mrg in ticket #907):
sys/external/bsd/drm/dist/bsd-core/drm_fops.c: revision 1.6
sys/external/bsd/drm/dist/bsd-core/drmP.h: revision 1.13
remove some netbsd specific code that does nothing.
 1.9.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.9.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.9.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.9.6.1 25-Jul-2008  mjf file drmP.h was added on branch mjf-devfs2 on 2008-09-28 10:40:36 +0000
 1.9.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.9.4.1 25-Jul-2008  wrstuden file drmP.h was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.9.2.2 28-Jul-2008  simonb Sync with head.
 1.9.2.1 25-Jul-2008  simonb file drmP.h was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.10.2.7 11-Aug-2010  yamt sync with head.
 1.10.2.6 11-Mar-2010  yamt sync with head
 1.10.2.5 16-Sep-2009  yamt sync with head
 1.10.2.4 19-Aug-2009  yamt sync with head.
 1.10.2.3 18-Jul-2009  yamt sync with head.
 1.10.2.2 04-May-2009  yamt sync with head.
 1.10.2.1 30-Mar-2009  yamt file drmP.h was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.16.4.3 12-Jun-2011  rmind sync with head
 1.16.4.2 05-Mar-2011  rmind sync with head
 1.16.4.1 30-May-2010  rmind sync with head
 1.16.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.19.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.19.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.21.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.23.30.1 06-Jun-2015  skrll Sync with HEAD
 1.23.12.1 03-Dec-2017  jdolecek update from HEAD
 1.24.18.1 10-Jun-2019  christos Sync with HEAD
 1.4 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file drm_agpsupport.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file drm_agpsupport.c was added on branch mjf-devfs2 on 2008-09-28 10:40:36 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file drm_agpsupport.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file drm_agpsupport.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.5 04-Oct-2014  riastradh Canonicalize boolean result from test_and_set_bit.

Not actually semantically significant for any callers, but Linux
documentation insists it is important, so we'll follow suit.

Fixes last part of PR kern/48999.
 1.4 19-Jun-2009  mrg branches: 1.4.22;
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.3 19-Jul-2008  mrg branches: 1.3.2; 1.3.4; 1.3.6; 1.3.10; 1.3.14; 1.3.18; 1.3.20;
XXX: remove the (volatile uint32_t *) cast from atomic_read() macro for now.

now all bsd drm drivers build except for i915 which fails to link.
 1.2 19-Jul-2008  mrg pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.3.20.1 21-Apr-2010  matt sync to netbsd-5
 1.3.18.3 18-Jul-2009  yamt sync with head.
 1.3.18.2 04-May-2009  yamt sync with head.
 1.3.18.1 19-Jul-2008  yamt file drm_atomic.h was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.3.14.1 23-Jul-2009  jym Sync with HEAD.
 1.3.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.3.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.3.6.1 19-Jul-2008  mjf file drm_atomic.h was added on branch mjf-devfs2 on 2008-09-28 10:40:36 +0000
 1.3.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.4.1 19-Jul-2008  wrstuden file drm_atomic.h was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.3.2.2 28-Jul-2008  simonb Sync with head.
 1.3.2.1 19-Jul-2008  simonb file drm_atomic.h was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.4.22.1 03-Dec-2017  jdolecek update from HEAD
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file drm_auth.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file drm_auth.c was added on branch mjf-devfs2 on 2008-09-28 10:40:36 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file drm_auth.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file drm_auth.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.13 10-Jan-2015  chs initialize "addr" before passing its address to uvm_mmap_dev().
from Onno van der Linden in PR 49536.
 1.12 14-Dec-2014  chs add a new "fo_mmap" fileops method to allow use of arbitrary uvm_objects for
mappings of file objects. move vnode-specific details of mmap()ing a vnode
from uvm_mmap() to the new vnode-specific vn_mmap(). add new uvm_mmap_dev()
and uvm_mmap_anon() convenience functions for mapping character devices
and anonymous memory, and replace all other calls to uvm_mmap() with those.
use the new fileop in drm2 so that libdrm can use mmap() to map things
like on other platforms (instead of the ioctl that we have used so far).
 1.11 17-Jun-2012  chs branches: 1.11.2; 1.11.14; 1.11.16;
when freeing the DRM_SHM kernel memory that can be mapped by a user process,
remove any user mappings before freeing the memory, so that a user process
doesn't have still have access to that physical memory after it's reused.
this really shouldn't be using kernel malloc'd memory at all,
but changing that would be much more involved.
 1.10 29-Jan-2012  drochner branches: 1.10.2;
remove incomplete conversion to kmem_alloc -- inconsistent use
leads at least to diagnostic panics
 1.9 27-Jan-2012  para extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged
 1.8 21-Jul-2010  hannken branches: 1.8.8;
Using vfinddev() leads to vnode races as it returns an unreferenced
vnode that may disappear before the caller has a chance to reference it.

Reference the vnode while the specfs cache is locked.

Welcome to 5.99.37.

No objections on tech-kern.
 1.7 26-Jan-2010  jmorse branches: 1.7.2; 1.7.4;
PR/42262: Support drm drivers (intel G33/G45) submapping pci resources
 1.6 02-Sep-2009  mrg - normalize netbsd drm_mtrr_del() with freebsd, removing a few #if's
- make the mtrr code do nothing on non-x86
 1.5 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.4 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.3 30-Mar-2009  mrg branches: 1.3.2;
apply from sys/dev:
revision 1.11
date: 2009/03/29 19:50:17; author: mrg; state: Exp; lines: +9 -6
drm_addmap():
- for _DRM_CONSISTENT mappings, keep the handle.
- use DRM_HANDLE_NEEDS_MASK()

drm_mapbufs():
- use DRM_HANDLE_NEEDS_MASK()

drm_mmap():
- use DRM_HANDLE_NEEDS_MASK()
- for _DRM_SCATTER_GATHER and _DRM_SHM, use vtophys() on the
adjusted offset. XXX

this is gets radeon working on amd64 with an older PCI 9250 card.

XXX: need to excise vtophys() usage.
XXX: need to finish porting these fixes to external.



however, this doesn't get radeon working on amd64 here :(
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.10; 1.2.14; 1.2.18;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.18.1 21-Apr-2010  matt sync to netbsd-5
 1.2.14.2 23-Jul-2009  jym Sync with HEAD.
 1.2.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.10.2 30-Jan-2010  snj Pull up following revision(s) (requested by jmorse in ticket #1280):
sys/external/bsd/drm/dist/bsd-core/drm_bufs.c: revision 1.7
sys/external/bsd/drm/dist/bsd-core/drmP.h: revision 1.16
sys/external/bsd/drm/dist/bsd-core/drm_memory.c: revision 1.7
PR/42262: Support drm drivers (intel G33/G45) submapping pci resources
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file drm_bufs.c was added on branch mjf-devfs2 on 2008-09-28 10:40:36 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file drm_bufs.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file drm_bufs.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.3.2.6 11-Aug-2010  yamt sync with head.
 1.3.2.5 11-Mar-2010  yamt sync with head
 1.3.2.4 16-Sep-2009  yamt sync with head
 1.3.2.3 18-Jul-2009  yamt sync with head.
 1.3.2.2 04-May-2009  yamt sync with head.
 1.3.2.1 30-Mar-2009  yamt file drm_bufs.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.7.4.1 05-Mar-2011  rmind sync with head
 1.7.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.8.8.1 30-Oct-2012  yamt sync with head
 1.10.2.1 24-Jun-2012  riz Pull up following revision(s) (requested by chs in ticket #353):
sys/external/bsd/drm/dist/bsd-core/drm_bufs.c: revision 1.11
when freeing the DRM_SHM kernel memory that can be mapped by a user process,
remove any user mappings before freeing the memory, so that a user process
doesn't have still have access to that physical memory after it's reused.
this really shouldn't be using kernel malloc'd memory at all,
but changing that would be much more involved.
 1.11.16.1 06-Apr-2015  skrll Sync with HEAD
 1.11.14.2 11-Jan-2015  snj Pull up following revision(s) (requested by chs in ticket #402):
sys/external/bsd/drm/dist/bsd-core/drm_bufs.c: revision 1.13
initialize "addr" before passing its address to uvm_mmap_dev().
from Onno van der Linden in PR 49536.
 1.11.14.1 31-Dec-2014  snj Pull up following revision(s) (requested by chs in ticket #363):
common/lib/libprop/prop_kern.c: revision 1.18
sys/arch/mac68k/dev/grf_compat.c: revision 1.27
sys/arch/x68k/dev/grf.c: revision 1.45
sys/external/bsd/drm/dist/bsd-core/drm_bufs.c: revision 1.12
sys/external/bsd/drm2/drm/drm_drv.c: revision 1.12
sys/external/bsd/drm2/drm/drm_vm.c: revision 1.6
sys/external/bsd/drm2/include/linux/mm.h: revision 1.4
sys/kern/vfs_vnops.c: revision 1.192 via patch
sys/rump/librump/rumpkern/vm.c: revision 1.160
sys/sys/file.h: revision 1.78 via patch
sys/uvm/uvm_device.c: revision 1.64
sys/uvm/uvm_device.h: revision 1.13
sys/uvm/uvm_extern.h: revision 1.192
sys/uvm/uvm_mmap.c: revision 1.150 via patch
add a new "fo_mmap" fileops method to allow use of arbitrary uvm_objects for
mappings of file objects. move vnode-specific details of mmap()ing a vnode
from uvm_mmap() to the new vnode-specific vn_mmap(). add new uvm_mmap_dev()
and uvm_mmap_anon() convenience functions for mapping character devices
and anonymous memory, and replace all other calls to uvm_mmap() with those.
use the new fileop in drm2 so that libdrm can use mmap() to map things
like on other platforms (instead of the ioctl that we have used so far).
 1.11.2.1 03-Dec-2017  jdolecek update from HEAD
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.6; 1.1.1.1.10; 1.1.1.1.14; 1.1.1.1.18; 1.1.1.1.20;
import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.1.1.1.20.1 21-Apr-2010  matt sync to netbsd-5
 1.1.1.1.18.3 18-Jul-2009  yamt sync with head.
 1.1.1.1.18.2 04-May-2009  yamt sync with head.
 1.1.1.1.18.1 19-Jul-2008  yamt file drm_context.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.1.1.1.14.1 23-Jul-2009  jym Sync with HEAD.
 1.1.1.1.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.1.1.1.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.1.1.1.6.1 19-Jul-2008  mjf file drm_context.c was added on branch mjf-devfs2 on 2008-09-28 10:40:36 +0000
 1.1.1.1.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.1.1.4.1 19-Jul-2008  wrstuden file drm_context.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.1.1.1.2.2 28-Jul-2008  simonb Sync with head.
 1.1.1.1.2.1 19-Jul-2008  simonb file drm_context.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.4 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file drm_dma.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file drm_dma.c was added on branch mjf-devfs2 on 2008-09-28 10:40:36 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file drm_dma.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file drm_dma.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.5 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.4 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.3 19-Jul-2008  jmcneill branches: 1.3.2; 1.3.4; 1.3.6; 1.3.10; 1.3.14; 1.3.18; 1.3.20;
Implement drm_drawable gunk and drm_locked_task, untested. i915drm links now.
 1.2 19-Jul-2008  mrg pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.3.20.1 21-Apr-2010  matt sync to netbsd-5
 1.3.18.3 18-Jul-2009  yamt sync with head.
 1.3.18.2 04-May-2009  yamt sync with head.
 1.3.18.1 19-Jul-2008  yamt file drm_drawable.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.3.14.1 23-Jul-2009  jym Sync with HEAD.
 1.3.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.3.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.3.6.1 19-Jul-2008  mjf file drm_drawable.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.3.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.4.1 19-Jul-2008  wrstuden file drm_drawable.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.3.2.2 28-Jul-2008  simonb Sync with head.
 1.3.2.1 19-Jul-2008  simonb file drm_drawable.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.26 10-Nov-2014  christos branches: 1.26.10;
fix the module class.
 1.25 25-Jul-2014  dholland branches: 1.25.2;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.24 16-Mar-2014  dholland branches: 1.24.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.23 22-Jul-2013  soren Missing AB_QUIET newlines.
 1.22 29-Aug-2011  jmcneill branches: 1.22.2; 1.22.12; 1.22.16; 1.22.24;
have pci register itself as a module, and make PCI driver modules depend on it
 1.21 03-Aug-2011  mrg add a little bit of DRM_NO_AGP to help build on ofppc
 1.20 27-Feb-2011  jmcneill use pa_intrpin instead of pa_intrline for irq#, since drivers treat irq=0
as "no irq" and this matches pa_intrpin encoding
 1.19 06-Nov-2010  mrg branches: 1.19.2; 1.19.4;
call the sysctl destroy functions upon failure and unload, which
should fix PR#40029. while there, fix the radeon unload, which
was improperly matching mutex init/destroy operations and leading
to trying to destroy lock that was never initialised.
 1.18 06-Dec-2009  dyoung branches: 1.18.4;
Delete the do-nothing device-activation hook, drm_activate().
 1.17 02-Sep-2009  mrg - normalize netbsd drm_mtrr_del() with freebsd, removing a few #if's
- make the mtrr code do nothing on non-x86
 1.16 26-Aug-2009  mrg introduce an ugly but simple hack to work around external software
requirements: set the drm pci "domain" to the pci bus unit number.
this matches what libpciaccess does for netbsd and now drm is much
happier again.
 1.15 23-Aug-2009  mrg on netbsd with the single final close() action, make sure we clean up
all the files attached to dev->files. we check for one per "open_count"
that is above 1. could perhaps assert() that we are empty afterwards.

this fixes restarting X + drm after actually using drm.
 1.14 24-Jun-2009  mrg convert a DRM_ERROR() to DRM_DEBUG(). its failure is not fatal
and it tends to trigger on almost all cards.
 1.13 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.12 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.11 30-Mar-2009  mrg branches: 1.11.2;
- set dev->device to the device_t
- fix a DEBUG message
- apply from sys/dev:
revision 1.20
date: 2009/01/18 10:04:35; author: mrg; state: Exp; lines: +6 -2
Don't attempt to unload a DRM device that's in use. (Note:
Unloading doesn't work right in any case -- it doesn't clean up the
sysctl tree, among other things. This code needs Work, but at least
this prevents it crashing randomly due to autounload while X is
running.) Also, fix the dependency list for radeondrm.

contributed anonymously.
 1.10 21-Jul-2008  bjs branches: 1.10.2; 1.10.4; 1.10.6; 1.10.8; 1.10.10; 1.10.14; 1.10.18;
Remove #ifdef __FreeBSD__ around DRM_UPDATE_DRAW ioctl, as we have drawable
code (and if it does not work, we must make it work!).

Add missing entry for DRM_MODESET_IOCTL.
 1.9 20-Jul-2008  bjs add forgotten initialization/destruction for tsk_lock.
 1.8 19-Jul-2008  mrg move an XXXNETBSD along with the assignment that moved
 1.7 19-Jul-2008  mrg merge cornflakes from git-change-04893aa99abfbed8eb6d7067a974fa1f31193c87.
 1.6 19-Jul-2008  jmcneill PCI_PRODUCT works on pa_id, not pa_device
 1.5 19-Jul-2008  bjs dev->pci_device should be assigned PCI_PRODUCT(pa->pa_id), not the id
itself.
 1.4 19-Jul-2008  bjs set dev->kdev = kdev at open time, not in drm_ioctl.
 1.3 19-Jul-2008  jmcneill Implement drm_drawable gunk and drm_locked_task, untested. i915drm links now.
 1.2 19-Jul-2008  mrg pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.3 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.2 19-Jul-2008  mrg import mesa-drm git at change 04893aa99abfbed8eb6d7067a974fa1f31193c87.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.10.18.1 21-Apr-2010  matt sync to netbsd-5
 1.10.14.2 23-Jul-2009  jym Sync with HEAD.
 1.10.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.10.4 30-Aug-2009  snj Pull up following revision(s) (requested by mrg in ticket #936):
sys/external/bsd/drm/dist/bsd-core/drm_drv.c: revision 1.14
convert a DRM_ERROR() to DRM_DEBUG(). its failure is not fatal
and it tends to trigger on almost all cards.
 1.10.10.3 30-Aug-2009  snj Pull up following revision(s) (requested by mrg in ticket #935):
sys/external/bsd/drm/dist/bsd-core/drm_drv.c: revision 1.16
introduce an ugly but simple hack to work around external software
requirements: set the drm pci "domain" to the pci bus unit number.
this matches what libpciaccess does for netbsd and now drm is much
happier again.
 1.10.10.2 30-Aug-2009  snj Pull up following revision(s) (requested by mrg in ticket #927):
sys/external/bsd/drm/dist/bsd-core/drm_drv.c: revision 1.15
on netbsd with the single final close() action, make sure we clean up
all the files attached to dev->files. we check for one per "open_count"
that is above 1. could perhaps assert() that we are empty afterwards.
this fixes restarting X + drm after actually using drm.
 1.10.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.10.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.10.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.10.6.1 21-Jul-2008  mjf file drm_drv.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.10.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.10.4.1 21-Jul-2008  wrstuden file drm_drv.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.10.2.2 28-Jul-2008  simonb Sync with head.
 1.10.2.1 21-Jul-2008  simonb file drm_drv.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.11.2.5 11-Mar-2010  yamt sync with head
 1.11.2.4 16-Sep-2009  yamt sync with head
 1.11.2.3 18-Jul-2009  yamt sync with head.
 1.11.2.2 04-May-2009  yamt sync with head.
 1.11.2.1 30-Mar-2009  yamt file drm_drv.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:28 +0000
 1.18.4.1 05-Mar-2011  rmind sync with head
 1.19.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.19.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.22.24.1 23-Jul-2013  riastradh sync with HEAD
 1.22.16.2 18-May-2014  rmind sync with head
 1.22.16.1 28-Aug-2013  rmind sync with head
 1.22.12.2 03-Dec-2017  jdolecek update from HEAD
 1.22.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.24.2.1 10-Aug-2014  tls Rebase.
 1.25.2.1 11-Jan-2015  snj Pull up following revision(s) (requested by chs in ticket #401):
distrib/sets/lists/modules/md.amd64: revisions 1.46, 1.47 via patch
distrib/sets/lists/modules/md.i386: revisions 1.49, 1.50
sys/dev/ic/pcdisplayvar.h: revision 1.20
sys/dev/ic/vgavar.h: revision 1.32
sys/external/bsd/drm/dist/bsd-core/drm_drv.c: revision 1.26
sys/external/bsd/drm2/dist/drm/drm_agpsupport.c: revisions 1.5, 1.6
sys/external/bsd/drm2/dist/drm/drm_pci.c: revisions 1.4, 1.5
sys/external/bsd/drm2/dist/drm/drm_stub.c: revisions 1.6-1.8
sys/external/bsd/drm2/dist/drm/i915/i915_drv.h: revision 1.11
sys/external/bsd/drm2/dist/drm/radeon/cik.c: revision 1.3
sys/external/bsd/drm2/dist/drm/radeon/ni.c: revision 1.3
sys/external/bsd/drm2/dist/drm/radeon/si.c: revision 1.3
sys/external/bsd/drm2/dist/include/drm/drmP.h: revisions 1.8, 1.9
sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h: revisions 1.3, 1.4
sys/external/bsd/drm2/drm/drm_drv.c: revision 1.11
sys/external/bsd/drm2/drm/drm_module.c: revision 1.9
sys/external/bsd/drm2/drm/drm_sysctl.c: revisions 1.1-1.4
sys/external/bsd/drm2/drm/drm_vm.c: revision 1.7
sys/external/bsd/drm2/drm/files.drmkms: revisions 1.8, 1.9
sys/external/bsd/drm2/i915drm/files.i915drmkms: revision 1.9
sys/external/bsd/drm2/i915drm/i915_module.c: revisions 1.4, 1.5
sys/external/bsd/drm2/include/drm/drm_sysctl.h: revisions 1.1, 1.2
sys/external/bsd/drm2/include/linux/hdmi.h: revisions 1.3-1.5
sys/external/bsd/drm2/include/linux/module.h: revision 1.5
sys/external/bsd/drm2/include/linux/moduleparam.h: revisions 1.3, 1.4
sys/external/bsd/drm2/include/linux/pci.h: revision 1.11
sys/external/bsd/drm2/linux/linux_module.c: revision 1.5
sys/external/bsd/drm2/nouveau/files.nouveau: revision 1.4
sys/external/bsd/drm2/nouveau/nouveau_module.c: revision 1.3
sys/external/bsd/drm2/pci/drm_pci.c: revision 1.8
sys/external/bsd/drm2/pci/drm_pci_module.c: revision 1.3
sys/external/bsd/drm2/radeon/radeon_module.c: revision 1.3
sys/external/bsd/drm2/ttm/files.ttm: revision 1.1
sys/modules/drm2pci/Makefile: file removal
sys/modules/drmkms/Makefile: revisions 1.4-1.7
sys/modules/drmkms_linux/Makefile: revision 1.5
sys/modules/drmkms_pci/Makefile: revisions 1.3, 1.4
sys/modules/i915drmkms/Makefile: revisions 1.5-1.7
Split drm ttm config into a separate file.
--
Fix module build of drmkms_linux.
--
Remove vestigial drm2pci module, replaced by drmkms_pci.
--
fix the module class.
--
add the drmkms modules
--
make a drm_agp_destroy() function to resolve the circular dependency between
drmkms and drmkms_pci
--
finalize the idr code.
--
add drm_agp_destroy
--
fix drmkms module path for xen.
--
fix build failure.
/tmp/bracket/build/2014.11.10.22.43.46-i386/src/sys/external/bsd/drm2/include/linux/pci.h:36:20: fatal error: acpica.h: No such file or directory
--
make this work: add agpsupport and sysctl code
--
move agpsupport to drmkms to avoid circular dependencies.
--
turn on dynamic ldscript creation to handle link set symbol definitions
used in the automatic sysctl creation.
--
Add __link_set based code to automatically convert the linux module parameters
into sysctls.
--
this module needs MKLDSCRIPT too now
--
more _KERNEL_OPT
--
prettify and add to all the modules that have it.
--
fix description setting.
--
Adjust flags to allow building with clang.
--
Fix build with clang.
--
Drop casts in favour of expressions that actually give the right
pointer.
--
Move all PCI/AGP code back to drmkms_pci module where it belongs.
--
Use correct length for hdmi_infoframe_header_pack in <linux/hdmi.h>.
Fixes PR kern/49411.
--
Back out previous, fix PR kern/49411 correctly.
frame->header.length is not initialized in the vendor packet case.
Instead, make hdmi_infoframe_header_pack take the packet length and
subtract the size of the header when packing the header.
(Could make it take the payload length instead, but for callers it is
more convenient to have a name for the whole packet length.)
--
Fix bounds checking in hdmi_infoframe_header_pack (PR kern/49411).
--
Trivial build fix for no options SYSCTL_INCLUDE_DESCR case, to
avoid -Werror.
OK christos@ and riastradh@
--
fix debugging compilation (ALL kernel)
--
nouveau_nv50_fence.c needs -Wno-shadow.
--
fix a confusion between dev_t and devmajor_t, and include the primary
minor when calling makedev().
 1.26.10.2 29-Apr-2017  pgoyette Revise previous. Rather than explicitly including <sys/localcount.h>
in all the places where {b,c}devsw is initialized, just include it
from <sys/conf.h>. This avoids an include-sequence dependancy.
 1.26.10.1 29-Apr-2017  pgoyette Add DEVSW_MODULE_INIT to existing device-driver modules, so that they
willl have a localcount defined and thus be permitted to load. Without
a localcount, loading the module will return EINVAL.

XXX the dtrace and drm stuff might need to be fed back upstream?
 1.6 07-Aug-2009  mrg remove some netbsd specific code that does nothing.
 1.5 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.4 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.3 30-Mar-2009  mrg branches: 1.3.2;
XXX: drm_close_pid() went away, and the hack i tried to avoid it
XXX: ended up looping forever. replace it with a hack that doesn't
XXX: hang the system.
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.10; 1.2.14; 1.2.18;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.18.1 21-Apr-2010  matt sync to netbsd-5
 1.2.14.2 23-Jul-2009  jym Sync with HEAD.
 1.2.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.10.2 14-Aug-2009  snj Pull up following revision(s) (requested by mrg in ticket #907):
sys/external/bsd/drm/dist/bsd-core/drm_fops.c: revision 1.6
sys/external/bsd/drm/dist/bsd-core/drmP.h: revision 1.13
remove some netbsd specific code that does nothing.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file drm_fops.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file drm_fops.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file drm_fops.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.3.2.4 19-Aug-2009  yamt sync with head.
 1.3.2.3 18-Jul-2009  yamt sync with head.
 1.3.2.2 04-May-2009  yamt sync with head.
 1.3.2.1 30-Mar-2009  yamt file drm_fops.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.1 18-Feb-2011  jmcneill branches: 1.1.2; 1.1.4; 1.1.8;
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 18-Feb-2011  jruoho file drm_hashtab.c was added on branch jruoho-x86intr on 2011-06-06 09:09:10 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 18-Feb-2011  rmind file drm_hashtab.c was added on branch rmind-uvmplock on 2011-03-05 20:54:44 +0000
 1.1.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1 18-Feb-2011  bouyer file drm_hashtab.c was added on branch bouyer-quota2 on 2011-03-05 15:10:32 +0000
 1.1 18-Feb-2011  jmcneill branches: 1.1.2; 1.1.4; 1.1.8;
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 18-Feb-2011  jruoho file drm_hashtab.h was added on branch jruoho-x86intr on 2011-06-06 09:09:10 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 18-Feb-2011  rmind file drm_hashtab.h was added on branch rmind-uvmplock on 2011-03-05 20:54:44 +0000
 1.1.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1 18-Feb-2011  bouyer file drm_hashtab.h was added on branch bouyer-quota2 on 2011-03-05 15:10:32 +0000
 1.4 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file drm_ioctl.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file drm_ioctl.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file drm_ioctl.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file drm_ioctl.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.16 23-May-2020  ad Move proc_lock into the data segment. It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.
 1.15 29-Mar-2014  christos fix pci_intr_string
 1.14 05-Mar-2011  jakllsch branches: 1.14.4; 1.14.14; 1.14.18;
Make interrupt establishment failure be noted like most other PCI drivers do.
 1.13 24-Feb-2011  mrg convert all crtc values passed in from userland to be unsigned instead
of signed. there's still some more internal to the i915 driver that
should be converted.

tested on a radeon x1550.
 1.12 01-Jul-2010  rmind branches: 1.12.2; 1.12.4;
Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour. Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
 1.11 27-Sep-2009  mrg branches: 1.11.2; 1.11.4;
make sure to call pci_intr_*stablish() with the right first argument;
it worked by C-luck on x86, but macppc picked it up.
 1.10 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.9 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.8 29-Mar-2009  mrg branches: 1.8.2;
fix a device_t-ification.
 1.7 29-Jul-2008  bjs branches: 1.7.2; 1.7.4; 1.7.6; 1.7.8; 1.7.12; 1.7.16;
Fix type-o.
 1.6 25-Jul-2008  bjs branches: 1.6.2;
in the git sources, timo is jiffies + 5*DRM_HZ, not 5*DRM_HZ
 1.5 25-Jul-2008  mrg merge git-change-2580a065d81be645a14af1e91b8441f7e72fcbe4.
 1.4 19-Jul-2008  mrg merge cornflakes from git-change-04893aa99abfbed8eb6d7067a974fa1f31193c87.
 1.3 19-Jul-2008  jmcneill Implement drm_drawable gunk and drm_locked_task, untested. i915drm links now.
 1.2 19-Jul-2008  mrg pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.4 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.3 25-Jul-2008  mrg import mesa-drm git from change 2580a065d81be645a14af1e91b8441f7e72fcbe4.
this pulls in a few vblank fixes.
 1.1.1.2 19-Jul-2008  mrg import mesa-drm git at change 04893aa99abfbed8eb6d7067a974fa1f31193c87.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.6.2.3 31-Jul-2008  simonb Sync with head.
 1.6.2.2 28-Jul-2008  simonb Sync with head.
 1.6.2.1 25-Jul-2008  simonb file drm_irq.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.7.16.1 21-Apr-2010  matt sync to netbsd-5
 1.7.12.2 23-Jul-2009  jym Sync with HEAD.
 1.7.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.8.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.7.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.7.4.2 28-Sep-2008  mjf Sync with HEAD.
 1.7.4.1 29-Jul-2008  mjf file drm_irq.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.7.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.7.2.1 29-Jul-2008  wrstuden file drm_irq.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.8.2.5 11-Aug-2010  yamt sync with head.
 1.8.2.4 11-Mar-2010  yamt sync with head
 1.8.2.3 18-Jul-2009  yamt sync with head.
 1.8.2.2 04-May-2009  yamt sync with head.
 1.8.2.1 29-Mar-2009  yamt file drm_irq.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.11.4.3 06-Mar-2011  rmind sync with head (and fix few botches with this)
 1.11.4.2 05-Mar-2011  rmind sync with head
 1.11.4.1 03-Jul-2010  rmind sync with head
 1.11.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.12.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.12.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.14.18.1 18-May-2014  rmind sync with head
 1.14.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 18-Feb-2011  jmcneill sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg branches: 1.1.1.2.4; 1.1.1.2.6; 1.1.1.2.8;
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.6; 1.1.1.1.10; 1.1.1.1.14; 1.1.1.1.18; 1.1.1.1.20;
import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.1.1.2.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.1.1.2.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.1.2.4.1 05-Mar-2011  rmind sync with head
 1.1.1.1.20.1 21-Apr-2010  matt sync to netbsd-5
 1.1.1.1.18.3 18-Jul-2009  yamt sync with head.
 1.1.1.1.18.2 04-May-2009  yamt sync with head.
 1.1.1.1.18.1 19-Jul-2008  yamt file drm_linux_list.h was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.1.1.1.14.1 23-Jul-2009  jym Sync with HEAD.
 1.1.1.1.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.1.1.1.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.1.1.1.6.1 19-Jul-2008  mjf file drm_linux_list.h was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.1.1.1.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.1.1.4.1 19-Jul-2008  wrstuden file drm_linux_list.h was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.1.1.1.2.2 28-Jul-2008  simonb Sync with head.
 1.1.1.1.2.1 19-Jul-2008  simonb file drm_linux_list.h was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.4 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.3 19-Jul-2008  mrg branches: 1.3.2; 1.3.4; 1.3.6; 1.3.10; 1.3.14; 1.3.18; 1.3.20;
merge cornflakes from git-change-04893aa99abfbed8eb6d7067a974fa1f31193c87.
 1.2 19-Jul-2008  mrg pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.3 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.2 19-Jul-2008  mrg import mesa-drm git at change 04893aa99abfbed8eb6d7067a974fa1f31193c87.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.3.20.1 21-Apr-2010  matt sync to netbsd-5
 1.3.18.3 18-Jul-2009  yamt sync with head.
 1.3.18.2 04-May-2009  yamt sync with head.
 1.3.18.1 19-Jul-2008  yamt file drm_lock.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.3.14.1 23-Jul-2009  jym Sync with HEAD.
 1.3.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.3.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.3.6.1 19-Jul-2008  mjf file drm_lock.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.3.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.4.1 19-Jul-2008  wrstuden file drm_lock.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.3.2.2 28-Jul-2008  simonb Sync with head.
 1.3.2.1 19-Jul-2008  simonb file drm_lock.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.14 12-Jun-2014  riastradh Check bounds in agp_i810_borrow.

Out of paranoia, do a bus_space_subregion in case the old drm code
tries sizes that the agp_i810 code doesn't agree with.
 1.13 17-Oct-2013  christos branches: 1.13.2;
remove unused variables
 1.12 06-Jun-2013  mlelstv branches: 1.12.2;
fix build for 'no options MTRR'
 1.11 18-Feb-2011  jmcneill branches: 1.11.4; 1.11.14;
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.10 15-Feb-2011  jmcneill map the framebuffer and agp with BUS_SPACE_MAP_PREFETCHABLE
 1.9 12-Feb-2011  jmcneill wsdisplay isn't module friendly so don't add genfb support to the kmod for now
 1.8 11-Feb-2011  jmcneill Make DRM work with genfb again.
 1.7 26-Jan-2010  jmorse branches: 1.7.4; 1.7.6; 1.7.8;
PR/42262: Support drm drivers (intel G33/G45) submapping pci resources
 1.6 02-Sep-2009  mrg - normalize netbsd drm_mtrr_del() with freebsd, removing a few #if's
- make the mtrr code do nothing on non-x86
 1.5 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.4 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.3 19-Jul-2008  jmcneill branches: 1.3.2; 1.3.4; 1.3.6; 1.3.10; 1.3.14; 1.3.18; 1.3.20;
Pull in agp_i810.h so the agp borrow hack works on i915drm.
 1.2 19-Jul-2008  mrg pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.3.20.1 21-Apr-2010  matt sync to netbsd-5
 1.3.18.5 11-Mar-2010  yamt sync with head
 1.3.18.4 16-Sep-2009  yamt sync with head
 1.3.18.3 18-Jul-2009  yamt sync with head.
 1.3.18.2 04-May-2009  yamt sync with head.
 1.3.18.1 19-Jul-2008  yamt file drm_memory.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.3.14.1 23-Jul-2009  jym Sync with HEAD.
 1.3.10.2 30-Jan-2010  snj Pull up following revision(s) (requested by jmorse in ticket #1280):
sys/external/bsd/drm/dist/bsd-core/drm_bufs.c: revision 1.7
sys/external/bsd/drm/dist/bsd-core/drmP.h: revision 1.16
sys/external/bsd/drm/dist/bsd-core/drm_memory.c: revision 1.7
PR/42262: Support drm drivers (intel G33/G45) submapping pci resources
 1.3.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.3.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.3.6.1 19-Jul-2008  mjf file drm_memory.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.3.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.4.1 19-Jul-2008  wrstuden file drm_memory.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.3.2.2 28-Jul-2008  simonb Sync with head.
 1.3.2.1 19-Jul-2008  simonb file drm_memory.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.7.8.2 05-Mar-2011  bouyer Sync with HEAD
 1.7.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.7.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.7.4.1 05-Mar-2011  rmind sync with head
 1.11.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.14.1 23-Jun-2013  tls resync from head
 1.11.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.2.1 18-May-2014  rmind sync with head
 1.13.2.1 10-Aug-2014  tls Rebase.
 1.1 18-Feb-2011  jmcneill branches: 1.1.2; 1.1.4; 1.1.8;
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 18-Feb-2011  jruoho file drm_mm.c was added on branch jruoho-x86intr on 2011-06-06 09:09:10 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 18-Feb-2011  rmind file drm_mm.c was added on branch rmind-uvmplock on 2011-03-05 20:54:44 +0000
 1.1.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1 18-Feb-2011  bouyer file drm_mm.c was added on branch bouyer-quota2 on 2011-03-05 15:10:32 +0000
 1.1 18-Feb-2011  jmcneill branches: 1.1.2; 1.1.4; 1.1.8;
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 18-Feb-2011  jruoho file drm_mm.h was added on branch jruoho-x86intr on 2011-06-06 09:09:10 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 18-Feb-2011  rmind file drm_mm.h was added on branch rmind-uvmplock on 2011-03-05 20:54:44 +0000
 1.1.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1 18-Feb-2011  bouyer file drm_mm.h was added on branch bouyer-quota2 on 2011-03-05 15:10:32 +0000
 1.9 20-Mar-2010  mrg don't pass "maxaddr" as a boundary in bus_dmamap_create() like rev 1.8
did for _alloc().
 1.8 12-Sep-2009  drochner branches: 1.8.2; 1.8.4;
fix some confusion between highest DMA address and the boundary not to
be crossed in a transfer,
back out previous fixes which only added to the confusion
 1.7 20-Jun-2009  mrg some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.6 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.5 30-Mar-2009  mrg branches: 1.5.2;
- apply from sys/dev:
revision 1.14
date: 2009/03/29 19:39:10; author: mrg; state: Exp; lines: +4 -3
include the size in a falled allocation message.

- use BUS_DMA_ALLOCNOW in bus_dmamap_create() call

- remove a redundant check for NULL
 1.4 25-Jul-2008  bjs branches: 1.4.2; 1.4.4; 1.4.6; 1.4.8; 1.4.10; 1.4.14; 1.4.18;
- for DRM_NETBSD_HANDLE2ADDR/ADDR2HANDLE, do what uvm does to recover
the virtual address from a uoffset, e.g. uoffset + vm_map_min(kernel_map).

- Eliminate the bus_space_read/write-based DRM_READ/WRITE macros. The
memory we're reading/writing from is not always allocated with bus_space,
and so this will not do. Instead, since all of our bus_space maps are
linear, volatile pointer dereferences will do just fine.

- Unify members of struct drm_dma_handle amongst freebsd and netbsd:
the 'addr' member was superfluous; also, set dmah->tag from
dev->pa.pa_dmat and use that.

- we don't need BUS_DMA_ALLOCNOW, as bus_dmamap_load is called immediately
following bus_dmamap_create(), so there's no need to avoid deferring
allocation to load time.

- Add check for nsegs != 1 in drm_pci_alloc().

- We don't need the DRM_PCI_DMAADDR macro right now--it was only
used once.
 1.3 19-Jul-2008  mrg merge cornflakes from git-change-04893aa99abfbed8eb6d7067a974fa1f31193c87.
 1.2 19-Jul-2008  mrg pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.3 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.2 19-Jul-2008  mrg import mesa-drm git at change 04893aa99abfbed8eb6d7067a974fa1f31193c87.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.4.18.1 21-Apr-2010  matt sync to netbsd-5
 1.4.14.2 23-Jul-2009  jym Sync with HEAD.
 1.4.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.10.3 28-Mar-2010  snj Pull up following revision(s) (requested by mrg in ticket #1346):
sys/external/bsd/drm/dist/bsd-core/drm_pci.c: revision 1.9
don't pass "maxaddr" as a boundary in bus_dmamap_create() like rev 1.8
did for _alloc().
 1.4.10.2 28-Mar-2010  snj Pull up following revision(s) (requested by mrg in ticket #1346):
sys/external/bsd/drm/dist/bsd-core/drm_pci.c: revision 1.8
fix some confusion between highest DMA address and the boundary not to
be crossed in a transfer,
back out previous fixes which only added to the confusion
 1.4.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.4.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.4.6.1 25-Jul-2008  mjf file drm_pci.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.4.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.4.4.1 25-Jul-2008  wrstuden file drm_pci.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:47 +0000
 1.4.2.2 28-Jul-2008  simonb Sync with head.
 1.4.2.1 25-Jul-2008  simonb file drm_pci.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.5.2.5 11-Aug-2010  yamt sync with head.
 1.5.2.4 16-Sep-2009  yamt sync with head
 1.5.2.3 18-Jul-2009  yamt sync with head.
 1.5.2.2 04-May-2009  yamt sync with head.
 1.5.2.1 30-Mar-2009  yamt file drm_pci.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.8.4.1 30-May-2010  rmind sync with head
 1.8.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.9 10-Jul-2018  maya Remove viadrm(4), superseded by viadrmums.

Aside from viadrm using older drm code, it's also dysfunctional right now.
See PR port-i386/53364.
 1.8 11-Jun-2012  tsutsui branches: 1.8.38; 1.8.40;
Make i915drm work on Atom N4xx/D410/D510 + GMA3150 integrated graphic devices.

Patch is taken from FreeBSD:
http://www.freebsd.org/cgi/query-pr.cgi?pr=143427
and tested on MSI U135DX running NetBSD/i386 6.0_BETA2 with this patch.

Should be pulled up to netbsd-6.
 1.7 25-Jul-2011  jakllsch branches: 1.7.2; 1.7.8;
Add additional Radeon devices from FreeBSD via Dragon Fly BSD.
 1.6 17-Feb-2011  jakllsch Add the RS880 device IDs to radeondrm(4).
 1.5 06-Jan-2011  cegger branches: 1.5.2; 1.5.4;
recognize Radeon HD 4200. This lets radeondrm(4) attach.
"go ahead" macallan@
 1.4 26-Jun-2010  mrg add the latest generation of radeon cards.
 1.3 19-Jun-2009  mrg branches: 1.3.2; 1.3.4;
add a freshly generated drm_pciids.h
 1.2 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jul-2008  mrg branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.6; 1.1.1.1.10; 1.1.1.1.14; 1.1.1.1.18; 1.1.1.1.20;
import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.1.1.1.20.1 21-Apr-2010  matt sync to netbsd-5
 1.1.1.1.18.4 11-Aug-2010  yamt sync with head.
 1.1.1.1.18.3 18-Jul-2009  yamt sync with head.
 1.1.1.1.18.2 04-May-2009  yamt sync with head.
 1.1.1.1.18.1 19-Jul-2008  yamt file drm_pciids.h was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.1.1.1.14.1 23-Jul-2009  jym Sync with HEAD.
 1.1.1.1.10.2 08-Dec-2010  riz Patch the following files (requested by mrg in ticket #1488):
sys/dev/pci/drm/files.pcidrm
sys/external/bsd/drm/dist/bsd-core/drmP.h
sys/external/bsd/drm/dist/bsd-core/drm_pciids.h
sys/external/bsd/drm/dist/bsd-core/drm_sysctl.c
sys/external/bsd/drm/dist/shared-core/r600_blit.c
sys/external/bsd/drm/dist/shared-core/r600_cp.c
sys/external/bsd/drm/dist/shared-core/radeon_cp.c
sys/external/bsd/drm/dist/shared-core/radeon_cs.c
sys/external/bsd/drm/dist/shared-core/radeon_drm.h
sys/external/bsd/drm/dist/shared-core/radeon_drv.h
sys/external/bsd/drm/dist/shared-core/radeon_state.c

implement DRM_RADEON_CS ioctl, necessary for r600_dri to function.
this is mostly from freebsd (though it also exists in other versions
of the drm code.)

only use bus_space*() on drm_local_map_ts that have been mapped into
some bus space somewhere. otherwise, just use normal accesses since
it is normal memory.
 1.1.1.1.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.1.1.1.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.1.1.1.6.1 19-Jul-2008  mjf file drm_pciids.h was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.1.1.1.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.1.1.4.1 19-Jul-2008  wrstuden file drm_pciids.h was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.1.1.1.2.2 28-Jul-2008  simonb Sync with head.
 1.1.1.1.2.1 19-Jul-2008  simonb file drm_pciids.h was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.3.4.2 05-Mar-2011  rmind sync with head
 1.3.4.1 03-Jul-2010  rmind sync with head
 1.3.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.5.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.5.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.7.8.1 13-Jun-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #334):
sys/external/bsd/drm/dist/shared-core/i915_drv.h: revision 1.5
sys/external/bsd/drm/dist/bsd-core/drm_pciids.h: revision 1.8
sys/external/bsd/drm/dist/shared-core/drm_pciids.txt: revision 1.3
sys/external/bsd/drm/dist/shared-core/i915_reg.h: revision 1.2
Make i915drm work on Atom N4xx/D410/D510 + GMA3150 integrated graphic devices.
Patch is taken from FreeBSD:
http://www.freebsd.org/cgi/query-pr.cgi?pr=143427
and tested on MSI U135DX running NetBSD/i386 6.0_BETA2 with this patch.
Should be pulled up to netbsd-6.
 1.7.2.1 30-Oct-2012  yamt sync with head
 1.8.40.1 10-Jun-2019  christos Sync with HEAD
 1.8.38.1 28-Jul-2018  pgoyette Sync with HEAD
 1.4 27-Jul-2014  dholland Fix misplaced parenthesis, from Henning Petersen in PR 44804.
 1.3 20-Jun-2009  mrg branches: 1.3.22; 1.3.36;
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.2 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.6; 1.1.1.1.10; 1.1.1.1.14; 1.1.1.1.18; 1.1.1.1.20;
import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.1.1.1.20.1 21-Apr-2010  matt sync to netbsd-5
 1.1.1.1.18.3 18-Jul-2009  yamt sync with head.
 1.1.1.1.18.2 04-May-2009  yamt sync with head.
 1.1.1.1.18.1 19-Jul-2008  yamt file drm_scatter.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.1.1.1.14.1 23-Jul-2009  jym Sync with HEAD.
 1.1.1.1.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.1.1.1.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.1.1.1.6.1 19-Jul-2008  mjf file drm_scatter.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.1.1.1.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.1.1.4.1 19-Jul-2008  wrstuden file drm_scatter.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.1.1.1.2.2 28-Jul-2008  simonb Sync with head.
 1.1.1.1.2.1 19-Jul-2008  simonb file drm_scatter.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.3.36.1 10-Aug-2014  tls Rebase.
 1.3.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1 18-Feb-2011  jmcneill branches: 1.1.2; 1.1.4; 1.1.8;
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 18-Feb-2011  jruoho file drm_sman.c was added on branch jruoho-x86intr on 2011-06-06 09:09:10 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 18-Feb-2011  rmind file drm_sman.c was added on branch rmind-uvmplock on 2011-03-05 20:54:44 +0000
 1.1.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1 18-Feb-2011  bouyer file drm_sman.c was added on branch bouyer-quota2 on 2011-03-05 15:10:33 +0000
 1.1 18-Feb-2011  jmcneill branches: 1.1.2; 1.1.4; 1.1.8;
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 18-Feb-2011  jruoho file drm_sman.h was added on branch jruoho-x86intr on 2011-06-06 09:09:10 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 18-Feb-2011  rmind file drm_sman.h was added on branch rmind-uvmplock on 2011-03-05 20:54:44 +0000
 1.1.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1 18-Feb-2011  bouyer file drm_sman.h was added on branch bouyer-quota2 on 2011-03-05 15:10:33 +0000
 1.9 10-Nov-2019  chs in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.8 29-Sep-2012  chs branches: 1.8.38;
fix the DRM string sysctls to use copyout() instead of strcat()
to deliver the data to the user buffer.
 1.7 02-Jun-2012  dsl branches: 1.7.2;
Add some pre-processor magic to verify that the type of the data item
passed to sysctl_createv() actually matches the declared type for
the item itself.
In the places where the caller specifies a function and a structure
address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
 1.6 10-Nov-2010  mrg branches: 1.6.8; 1.6.14; 1.6.16;
use a sysctllog structure, and sysctl_teardown(), to destroy the drm data.

this should actually now fix PR#40029.
 1.5 19-May-2010  mrg only use bus_space*() on drm_local_map_t's that have been mapped into
some bus space somewhere. otherwise, just use normal accesses since
it is normal memory.

this fixes radeondrm on x86 since bus_space_tag_t became a pointer.

add the "GEM" and "TTM" mapping types to sysctl support (though right
now we will never have them in our list of maps.)
 1.4 20-Jun-2009  mrg branches: 1.4.2; 1.4.4;
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.4 11-Aug-2010  yamt sync with head.
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file drm_sysctl.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.3 31-Oct-2012  riz Pull up following revision(s) (requested by chs in ticket #1811):
sys/external/bsd/drm/dist/bsd-core/drm_sysctl.c: revision 1.8
fix the DRM string sysctls to use copyout() instead of strcat()
to deliver the data to the user buffer.
 1.2.10.2 08-Dec-2010  riz Patch the following files (requested by mrg in ticket #1488):
sys/dev/pci/drm/files.pcidrm
sys/external/bsd/drm/dist/bsd-core/drmP.h
sys/external/bsd/drm/dist/bsd-core/drm_pciids.h
sys/external/bsd/drm/dist/bsd-core/drm_sysctl.c
sys/external/bsd/drm/dist/shared-core/r600_blit.c
sys/external/bsd/drm/dist/shared-core/r600_cp.c
sys/external/bsd/drm/dist/shared-core/radeon_cp.c
sys/external/bsd/drm/dist/shared-core/radeon_cs.c
sys/external/bsd/drm/dist/shared-core/radeon_drm.h
sys/external/bsd/drm/dist/shared-core/radeon_drv.h
sys/external/bsd/drm/dist/shared-core/radeon_state.c

implement DRM_RADEON_CS ioctl, necessary for r600_dri to function.
this is mostly from freebsd (though it also exists in other versions
of the drm code.)

only use bus_space*() on drm_local_map_ts that have been mapped into
some bus space somewhere. otherwise, just use normal accesses since
it is normal memory.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file drm_sysctl.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file drm_sysctl.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file drm_sysctl.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.4.4.2 05-Mar-2011  rmind sync with head
 1.4.4.1 30-May-2010  rmind sync with head
 1.4.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.6.16.1 01-Nov-2012  matt sync with netbsd-6-0-RELEASE.
 1.6.14.1 01-Oct-2012  riz Pull up following revision(s) (requested by chs in ticket #579):
sys/external/bsd/drm/dist/bsd-core/drm_sysctl.c: revision 1.8
fix the DRM string sysctls to use copyout() instead of strcat()
to deliver the data to the user buffer.
 1.6.8.1 30-Oct-2012  yamt sync with head
 1.7.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7 17-Oct-2013  christos remove unused variables
 1.6 15-Feb-2011  jmcneill branches: 1.6.4; 1.6.14; 1.6.18;
map the framebuffer and agp with BUS_SPACE_MAP_PREFETCHABLE
 1.5 20-Jun-2009  mrg branches: 1.5.4; 1.5.6; 1.5.8;
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)

no functional changes intended.
 1.4 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.3 30-Mar-2009  mrg branches: 1.3.2;
apply from sys/dev:
revision 1.17
date: 2009/03/29 19:50:17; author: mrg; state: Exp; lines: +7 -7
drm_addmap():
- for _DRM_CONSISTENT mappings, keep the handle.
- use DRM_HANDLE_NEEDS_MASK()

drm_mapbufs():
- use DRM_HANDLE_NEEDS_MASK()

drm_mmap():
- use DRM_HANDLE_NEEDS_MASK()
- for _DRM_SCATTER_GATHER and _DRM_SHM, use vtophys() on the
adjusted offset. XXX

this is gets radeon working on amd64 with an older PCI 9250 card.

XXX: need to excise vtophys() usage.
XXX: need to finish porting these fixes to external.


yay! this takes care of one of the XXX's. still not quite working.
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.10; 1.2.14; 1.2.18;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.18.1 21-Apr-2010  matt sync to netbsd-5
 1.2.14.2 23-Jul-2009  jym Sync with HEAD.
 1.2.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file drm_vm.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file drm_vm.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file drm_vm.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.3.2.3 18-Jul-2009  yamt sync with head.
 1.3.2.2 04-May-2009  yamt sync with head.
 1.3.2.1 30-Mar-2009  yamt file drm_vm.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.5.8.1 17-Feb-2011  bouyer Sync with HEAD
 1.5.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.5.4.1 05-Mar-2011  rmind sync with head
 1.6.18.1 18-May-2014  rmind sync with head
 1.6.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.11 20-Jan-2017  maya Check pmf_device_register return value. NFC
Appeases static analyzers.
 1.10 28-Aug-2011  jmcneill branches: 1.10.12; 1.10.30; 1.10.34; 1.10.38;
return 'error' not 0, fixes non-module build
 1.9 28-Aug-2011  jmcneill set default WARNS for modules to 3 -- the only one that needs < 3 now is pf
 1.8 24-Feb-2010  dyoung A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.7 08-Jan-2010  dyoung branches: 1.7.2;
Expand PMF_FN_* macros.
 1.6 06-Dec-2009  dyoung Delete the do-nothing device-activation hook, drm_activate().
 1.5 27-Sep-2009  jmcneill deregister with pmf on detach
 1.4 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.3 09-May-2009  joerg softc split as needed by the rest of the drm code. Add basic
suspend/resume hooks.
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.5 11-Mar-2010  yamt sync with head
 1.2.18.4 18-Jul-2009  yamt sync with head.
 1.2.18.3 16-May-2009  yamt sync with head
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file i915_drv.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.2 23-Jul-2009  jym Sync with HEAD.
 1.2.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file i915_drv.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file i915_drv.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file i915_drv.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.7.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.10.38.1 21-Apr-2017  bouyer Sync with HEAD
 1.10.34.1 20-Mar-2017  pgoyette Sync with HEAD
 1.10.30.1 05-Feb-2017  skrll Sync with HEAD
 1.10.12.1 03-Dec-2017  jdolecek update from HEAD
 1.7 28-Aug-2011  jmcneill return 'error' not 0, fixes non-module build
 1.6 28-Aug-2011  jmcneill add mach64drm, mgadrm, r128drm, savagedrm, sisdrm, and tdfxdrm modules
 1.5 06-Dec-2009  dyoung Delete the do-nothing device-activation hook, drm_activate().
 1.4 23-Jun-2009  mrg add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.

use pci_find_device() to kill the one XXX rafal left.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.4 11-Mar-2010  yamt sync with head
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file mach64_drv.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.2 24-Jun-2009  snj Pull up following revision(s) (requested by mrg in ticket #830):
sys/external/bsd/drm/dist/bsd-core/mach64_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/mga_drv.c: revision 1.5
sys/external/bsd/drm/dist/bsd-core/r128_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/savage_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/sis_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/mach64_dma.c: revision 1.2
sys/external/bsd/drm/dist/shared-core/mach64_drv.h: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_bci.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_state.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/sis_ds.c: revision 1.4
add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.
use pci_find_device() to kill the one XXX rafal left.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file mach64_drv.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file mach64_drv.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file mach64_drv.c was added on branch simonb-wapbl on 2008-07-28 14:37:28 +0000
 1.9 28-Aug-2011  jmcneill add mach64drm, mgadrm, r128drm, savagedrm, sisdrm, and tdfxdrm modules
 1.8 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.7 06-Dec-2009  dyoung branches: 1.7.4; 1.7.6;
Delete the do-nothing device-activation hook, drm_activate().
 1.6 24-Jun-2009  mrg don't include pcidevs_data.h.
 1.5 23-Jun-2009  mrg add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.

use pci_find_device() to kill the one XXX rafal left.
 1.4 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.3 19-Jul-2008  mrg branches: 1.3.2; 1.3.4; 1.3.6; 1.3.10; 1.3.14; 1.3.18; 1.3.20;
XXX: always return DRM_MIGHT_BE_AGP for now -- need to implement the
XXX: releant bus controller grovelling for netbsd pci.
 1.2 19-Jul-2008  mrg pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.3.20.1 21-Apr-2010  matt sync to netbsd-5
 1.3.18.4 11-Mar-2010  yamt sync with head
 1.3.18.3 18-Jul-2009  yamt sync with head.
 1.3.18.2 04-May-2009  yamt sync with head.
 1.3.18.1 19-Jul-2008  yamt file mga_drv.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.3.14.1 23-Jul-2009  jym Sync with HEAD.
 1.3.10.3 25-Jun-2009  snj Pull up following revision(s) (requested by mrg in ticket #832):
sys/external/bsd/drm/dist/bsd-core/mga_drv.c: revision 1.6
don't include pcidevs_data.h.
 1.3.10.2 24-Jun-2009  snj Pull up following revision(s) (requested by mrg in ticket #830):
sys/external/bsd/drm/dist/bsd-core/mach64_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/mga_drv.c: revision 1.5
sys/external/bsd/drm/dist/bsd-core/r128_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/savage_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/sis_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/mach64_dma.c: revision 1.2
sys/external/bsd/drm/dist/shared-core/mach64_drv.h: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_bci.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_state.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/sis_ds.c: revision 1.4
add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.
use pci_find_device() to kill the one XXX rafal left.
 1.3.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.3.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.3.6.1 19-Jul-2008  mjf file mga_drv.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.3.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.4.1 19-Jul-2008  wrstuden file mga_drv.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.3.2.2 28-Jul-2008  simonb Sync with head.
 1.3.2.1 19-Jul-2008  simonb file mga_drv.c was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.7.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.7.4.1 21-Apr-2011  rmind sync with head
 1.2 14-Sep-2018  mrg remove unused code:
- old drm nouveau was never ported
- the libdrm in this repo was never used
- these tests were never used, and this whole tree is obsolete, but
we never ported some of the old drivers to new drm.

XXX: probably can delete i915drm.
XXX: would ike to delete old radeondrm, but it is still the only
functional drm on some older radeon r100/r200 chipsets.
 1.1 19-Jun-2009  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jun-2009  mrg branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.10; 1.1.1.1.68; 1.1.1.1.70;
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1.70.1 10-Jun-2019  christos Sync with HEAD
 1.1.1.1.68.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.1.1.10.2 21-Apr-2010  matt sync to netbsd-5
 1.1.1.1.10.1 19-Jun-2009  matt file nouveau_drv.c was added on branch matt-nb5-mips64 on 2010-04-21 00:27:56 +0000
 1.1.1.1.4.2 18-Jul-2009  yamt sync with head.
 1.1.1.1.4.1 19-Jun-2009  yamt file nouveau_drv.c was added on branch yamt-nfs-mp on 2009-07-18 14:53:13 +0000
 1.1.1.1.2.2 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.1.1.1.2.1 19-Jun-2009  snj file nouveau_drv.c was added on branch netbsd-5 on 2009-06-20 23:42:52 +0000
 1.2 14-Sep-2018  mrg remove unused code:
- old drm nouveau was never ported
- the libdrm in this repo was never used
- these tests were never used, and this whole tree is obsolete, but
we never ported some of the old drivers to new drm.

XXX: probably can delete i915drm.
XXX: would ike to delete old radeondrm, but it is still the only
functional drm on some older radeon r100/r200 chipsets.
 1.1 19-Jun-2009  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jun-2009  mrg branches: 1.1.1.1.2; 1.1.1.1.4; 1.1.1.1.10; 1.1.1.1.68; 1.1.1.1.70;
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1.70.1 10-Jun-2019  christos Sync with HEAD
 1.1.1.1.68.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.1.1.10.2 21-Apr-2010  matt sync to netbsd-5
 1.1.1.1.10.1 19-Jun-2009  matt file nouveau_sgdma.c was added on branch matt-nb5-mips64 on 2010-04-21 00:27:56 +0000
 1.1.1.1.4.2 18-Jul-2009  yamt sync with head.
 1.1.1.1.4.1 19-Jun-2009  yamt file nouveau_sgdma.c was added on branch yamt-nfs-mp on 2009-07-18 14:53:13 +0000
 1.1.1.1.2.2 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.1.1.1.2.1 19-Jun-2009  snj file nouveau_sgdma.c was added on branch netbsd-5 on 2009-06-20 23:42:52 +0000
 1.6 28-Aug-2011  jmcneill add mach64drm, mgadrm, r128drm, savagedrm, sisdrm, and tdfxdrm modules
 1.5 06-Dec-2009  dyoung Delete the do-nothing device-activation hook, drm_activate().
 1.4 23-Jun-2009  mrg add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.

use pci_find_device() to kill the one XXX rafal left.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.4 11-Mar-2010  yamt sync with head
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file r128_drv.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.2 24-Jun-2009  snj Pull up following revision(s) (requested by mrg in ticket #830):
sys/external/bsd/drm/dist/bsd-core/mach64_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/mga_drv.c: revision 1.5
sys/external/bsd/drm/dist/bsd-core/r128_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/savage_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/sis_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/mach64_dma.c: revision 1.2
sys/external/bsd/drm/dist/shared-core/mach64_drv.h: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_bci.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_state.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/sis_ds.c: revision 1.4
add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.
use pci_find_device() to kill the one XXX rafal left.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file r128_drv.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file r128_drv.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file r128_drv.c was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.12 28-Aug-2011  jmcneill Split out ati_pcigart into a separate module so it can be shared with r128drm
 1.11 28-Aug-2011  jmcneill set default WARNS for modules to 3 -- the only one that needs < 3 now is pf
 1.10 05-Jul-2010  mrg move all the radeondrm firmware images into the filesystem. check that
some firmware sizes are the expected size. (XXX make all.)

based upon similar changes seen in the linux radeon drm driver.

this saves about 250KB in the kernel or module.
 1.9 03-Mar-2010  mrg branches: 1.9.2;
make suspend/resume actually work:
- we have to DRM_LOCK()/DRM_UNLOCK(), thus s/rad_dev/dev/ in a variable name
- only call into radeon_cp_{stop,resume}() if the device is active

with this my nforce4 dual core amd system is able to suspend/resume with both
X and drm active.
 1.8 24-Feb-2010  dyoung A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.7 08-Jan-2010  dyoung branches: 1.7.2;
Expand PMF_FN_* macros.
 1.6 14-Dec-2009  kefren add suspend/resume hooks for command processor
 1.5 12-Dec-2009  kefren add stub pmf hook
 1.4 06-Dec-2009  dyoung Delete the do-nothing device-activation hook, drm_activate().
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.5 11-Aug-2010  yamt sync with head.
 1.2.18.4 11-Mar-2010  yamt sync with head
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file radeon_drv.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.2 21-Nov-2010  riz Pull up following patch (requested by mrg in ticket #1406):
sys/external/bsd/drm/dist/bsd-core/radeon_drv.c: patch

Make suspend/resume actually work with radeondrm configured.
From Pierre Pronchery in kern/43327.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file radeon_drv.c was added on branch mjf-devfs2 on 2008-09-28 10:40:37 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file radeon_drv.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file radeon_drv.c was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.7.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.7.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.9.2.1 05-Mar-2011  rmind sync with head
 1.7 28-Aug-2011  jmcneill return 'error' not 0, fixes non-module build
 1.6 28-Aug-2011  jmcneill add mach64drm, mgadrm, r128drm, savagedrm, sisdrm, and tdfxdrm modules
 1.5 06-Dec-2009  dyoung Delete the do-nothing device-activation hook, drm_activate().
 1.4 23-Jun-2009  mrg add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.

use pci_find_device() to kill the one XXX rafal left.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.4 11-Mar-2010  yamt sync with head
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file savage_drv.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.2 24-Jun-2009  snj Pull up following revision(s) (requested by mrg in ticket #830):
sys/external/bsd/drm/dist/bsd-core/mach64_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/mga_drv.c: revision 1.5
sys/external/bsd/drm/dist/bsd-core/r128_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/savage_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/sis_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/mach64_dma.c: revision 1.2
sys/external/bsd/drm/dist/shared-core/mach64_drv.h: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_bci.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_state.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/sis_ds.c: revision 1.4
add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.
use pci_find_device() to kill the one XXX rafal left.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file savage_drv.c was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file savage_drv.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file savage_drv.c was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.7 28-Aug-2011  jmcneill return 'error' not 0, fixes non-module build
 1.6 28-Aug-2011  jmcneill add mach64drm, mgadrm, r128drm, savagedrm, sisdrm, and tdfxdrm modules
 1.5 06-Dec-2009  dyoung Delete the do-nothing device-activation hook, drm_activate().
 1.4 23-Jun-2009  mrg add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.

use pci_find_device() to kill the one XXX rafal left.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.4 11-Mar-2010  yamt sync with head
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file sis_drv.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.2 24-Jun-2009  snj Pull up following revision(s) (requested by mrg in ticket #830):
sys/external/bsd/drm/dist/bsd-core/mach64_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/mga_drv.c: revision 1.5
sys/external/bsd/drm/dist/bsd-core/r128_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/savage_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/sis_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/mach64_dma.c: revision 1.2
sys/external/bsd/drm/dist/shared-core/mach64_drv.h: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_bci.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_state.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/sis_ds.c: revision 1.4
add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.
use pci_find_device() to kill the one XXX rafal left.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file sis_drv.c was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file sis_drv.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file sis_drv.c was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.7 28-Aug-2011  jmcneill return 'error' not 0, fixes non-module build
 1.6 28-Aug-2011  jmcneill add mach64drm, mgadrm, r128drm, savagedrm, sisdrm, and tdfxdrm modules
 1.5 06-Dec-2009  dyoung Delete the do-nothing device-activation hook, drm_activate().
 1.4 23-Jun-2009  mrg add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.

use pci_find_device() to kill the one XXX rafal left.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.4 11-Mar-2010  yamt sync with head
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file tdfx_drv.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.2 24-Jun-2009  snj Pull up following revision(s) (requested by mrg in ticket #830):
sys/external/bsd/drm/dist/bsd-core/mach64_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/mga_drv.c: revision 1.5
sys/external/bsd/drm/dist/bsd-core/r128_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/savage_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/sis_drv.c: revision 1.4
sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/mach64_dma.c: revision 1.2
sys/external/bsd/drm/dist/shared-core/mach64_drv.h: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_bci.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/savage_state.c: revision 1.4
sys/external/bsd/drm/dist/shared-core/sis_ds.c: revision 1.4
add a bunch of fixes mostly from rafal@.
this fixes the build for all the other drm modules.
use pci_find_device() to kill the one XXX rafal left.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file tdfx_drv.c was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file tdfx_drv.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file tdfx_drv.c was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.3 10-Jul-2018  maya Remove viadrm(4), superseded by viadrmums.

Aside from viadrm using older drm code, it's also dysfunctional right now.
See PR port-i386/53364.
 1.2 17-Oct-2013  christos branches: 1.2.28; 1.2.30;
remove unused variables
 1.1 18-Feb-2011  jmcneill branches: 1.1.2; 1.1.4; 1.1.8; 1.1.10; 1.1.20; 1.1.24;
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.1.24.1 18-May-2014  rmind sync with head
 1.1.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 18-Feb-2011  jruoho file via_dmablit.c was added on branch jruoho-x86intr on 2011-06-06 09:09:11 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 18-Feb-2011  rmind file via_dmablit.c was added on branch rmind-uvmplock on 2011-03-05 20:54:44 +0000
 1.1.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1 18-Feb-2011  bouyer file via_dmablit.c was added on branch bouyer-quota2 on 2011-03-05 15:10:33 +0000
 1.2.30.1 10-Jun-2019  christos Sync with HEAD
 1.2.28.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2 10-Jul-2018  maya Remove viadrm(4), superseded by viadrmums.

Aside from viadrm using older drm code, it's also dysfunctional right now.
See PR port-i386/53364.
 1.1 18-Feb-2011  jmcneill branches: 1.1.2; 1.1.4; 1.1.8; 1.1.60; 1.1.62;
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.1.62.1 10-Jun-2019  christos Sync with HEAD
 1.1.60.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 18-Feb-2011  jruoho file via_dmablit.h was added on branch jruoho-x86intr on 2011-06-06 09:09:11 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 18-Feb-2011  rmind file via_dmablit.h was added on branch rmind-uvmplock on 2011-03-05 20:54:44 +0000
 1.1.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1 18-Feb-2011  bouyer file via_dmablit.h was added on branch bouyer-quota2 on 2011-03-05 15:10:33 +0000
 1.9 10-Jul-2018  maya Remove viadrm(4), superseded by viadrmums.

Aside from viadrm using older drm code, it's also dysfunctional right now.
See PR port-i386/53364.
 1.8 18-Feb-2011  jmcneill branches: 1.8.54; 1.8.56;
sync viadrm with FreeBSD, big new feature is AGP DMA and PCI DMA support
 1.7 18-Feb-2011  jmcneill get rid of #ifdef __FreeBSD__ sections
use ioconf & add a module dependency on "drm"
 1.6 06-Dec-2009  dyoung branches: 1.6.4; 1.6.6; 1.6.8;
Delete the do-nothing device-activation hook, drm_activate().
 1.5 27-Sep-2009  jmcneill register with pmf
 1.4 27-Sep-2009  jmcneill Port viadrm to NetBSD and fix a bunch of compile issues:

viadrm0 at vga1: VIA P4M900 / VN896
viadrm0: AGP at 0xf0000000 128MB
viadrm0: Initialized via 2.11.1 20070202

xf86-video-openchrome seems happy with it, although 3d acceleration isn't
supported on the P4M900 so I can't test that part.
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.2 19-Jun-2009  mrg import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.4 11-Mar-2010  yamt sync with head
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file via_drv.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file via_drv.c was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file via_drv.c was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file via_drv.c was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.6.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.6.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.4.1 05-Mar-2011  rmind sync with head
 1.8.56.1 10-Jun-2019  christos Sync with HEAD
 1.8.54.1 28-Jul-2018  pgoyette Sync with HEAD
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file Makefile was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file Makefile was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:13:29 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file Makefile was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:13:30 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file Makefile was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:13:30 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file Makefile was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:13:30 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file Makefile was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:13:30 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-09-28 10:40:38 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file Makefile was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:13:30 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-09-28 10:40:39 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file Makefile was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000
 1.3 19-Jun-2009  mrg merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
 1.2 19-Jul-2008  mrg branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.18; 1.2.20;
pull over many many changes from netbsd-current sys/dev/{,pci/}drm/.
make the mesa-drm style Makefile's actually run on netbsd (but i doubt
they work yet.)

this still has a lot to go. it doesn't work yet, but it's getting
close.

most of this is from other authors than myself: yorrick, drochner,
jared, bjs, all contributed a lot more than i have so far, but there's
a bunch of clean up from myself in here as well.
 1.1 19-Jul-2008  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jul-2008  mrg import mesa-drm git from version 5d27fd94afaaf434c3a92af0075420b550055bfb,
which is approximately june 25th or so.
 1.2.20.1 21-Apr-2010  matt sync to netbsd-5
 1.2.18.3 18-Jul-2009  yamt sync with head.
 1.2.18.2 04-May-2009  yamt sync with head.
 1.2.18.1 19-Jul-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:13:30 +0000
 1.2.14.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.1 20-Jun-2009  snj Apply patch (requested by mrg in ticket #823):
import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
--
merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko and FUKAUMI
Naoki.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch. it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.

from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

- drm_scatter maps COHERENT memory
- drm_drawable: drawable handle allocation is done
inside lock
- drm_memory: when mapping "agp" memory, store offset
of mapped area, so that new requests to same offset
return the same area instead of trying to remap
and fail
- drm_vm: use bus_space_mmap for frame buffer and registers

- r600_cp.c: ioremapfree allocated gart range
- radeon_cp.c: use mtsleep
- some memset calls I had added had their args swapped,
and no memory was cleared
--
add a freshly generated drm_pciids.h
--
some minor clean up:
- reduce diffs to mesa-drm where possible
- fix various formatting issues
- netbsd uses major 180 for drm (XXX)
 1.2.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.1 19-Jul-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-09-28 10:40:39 +0000
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 19-Jul-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:48 +0000
 1.2.2.2 28-Jul-2008  simonb Sync with head.
 1.2.2.1 19-Jul-2008  simonb file Makefile was added on branch simonb-wapbl on 2008-07-28 14:37:29 +0000

RSS XML Feed