Home | History | Annotate | Download | only in bsd-core
History log of /src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c
RevisionDateAuthorComments
 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

RSS XML Feed