Home | History | Annotate | Download | only in drm
History log of /src/sys/external/bsd/drm2/drm/drm_vm.c
RevisionDateAuthorComments
 1.13  06-Jul-2022  riastradh uvm(9): fo_mmap caller guarantees positive size.

No functional change intended, just sprinkling assertions to make it
clearer.
 1.12  19-Dec-2021  riastradh Use drmP.h less in our local files.


Author: Maya Rashish <maya@NetBSD.org>
 1.11  14-Feb-2020  riastradh Reduce diffs by nixing DRM_SUSER macro, deleted upstream long ago.

Instead stub Linux capable(CAP_SYS_ADMIN).
 1.10  27-Aug-2018  riastradh branches: 1.10.6;
Need <uvm/uvm.h> for struct uvm_object.
 1.9  27-Aug-2018  riastradh Rename drm_mmap_* -> drm_legacy_mmap_* like upstream.
 1.8  27-Aug-2018  riastradh Get the legacy drm declarations from drm_legacy.h.
 1.7  31-Dec-2014  mrg branches: 1.7.16; 1.7.18;
fix a confusion between dev_t and devmajor_t, and include the primary
minor when calling makedev().
 1.6  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.5  26-Jul-2014  riastradh branches: 1.5.2; 1.5.4; 1.5.6;
Let the drm driver decide what part of what object gets mmapped.

Pass the file around too so radeon/ttm can get at it to verify access.

Add drm_gem_or_legacy_mmap_object for drivers to choose the previous
behaviour, like i915.
 1.4  16-Jul-2014  riastradh Make it build and boot on my test machines.

Screen blanks on boot on the Ivy Bridge system with

DRM error in cpt_serr_int_handler: PCH transcoder A FIFO underrun

But after that everything is OK. Appears to be an upstream problem.
To investigate...

I think there's a cache flushing issue somewhere -- there are little
display artefacts on my T60.
 1.3  01-May-2014  riastradh branches: 1.3.2; 1.3.4;
Tweak some DRM GEM page indexing crap.

- Fix order of subtraction in drm_mmap_paddr_locked.
- Address GEM objects' pages from 0, not from the mmap cookie.
- Check page alignment earlier in mmap code paths.
- Sprinkle kasserts throughout.

Still doesn't fix the garbage that is sometimes being scribbled all
over kernel memory!
 1.2  18-Mar-2014  riastradh branches: 1.2.2;
Merge riastradh-drm2 to HEAD.
 1.1  24-Jul-2013  riastradh branches: 1.1.2;
file drm_vm.c was initially added on branch riastradh-drm2.
 1.1.2.6  04-Mar-2014  riastradh Rework drm2 configuration and modularization.

- Split drm2.kmod into drmkms_linux, drmkms, drmkms_pci.
- Split up drmkms-related files.* similarly.
- Make drm_agp_* routines hooks that the drmkms_pci module installs.
- Reuse drm device major 180 for (old) drm and drmkms.

Now old drm and new drmkms can coexist happily in the same tree, with
or without PCI, and require no changes to userland.
 1.1.2.5  29-Jan-2014  riastradh First draft of in-kernel drm2 attachment.

The drm2 `drm' device is now called `drmkms' (likewise `i915drmkms',
&c.) so that it can coexist with the old drm code to reduce diffs
from HEAD. (Can't call a device `drm2'.)
 1.1.2.4  22-Jan-2014  riastradh Tidy up and reuse the code I had already written for gem mmapping.
 1.1.2.3  22-Jan-2014  riastradh Implement mmap on a drm device by a new kludgey ioctl.

There is currently no way to set up a custom choice of uvm object and
uvm pager ops for mmap: struct fileops has no fo_mmap, and device
nodes get to say only what paddr each offset maps to, not what uvm
object to use. For now, to avoid kernel changes outside the drm2
tree, we'll use a non-standard drm ioctl that calls uvm_map. This
requires source patches to userland programs, but for the most part
they can simply be converted from calling mmap to drmMap, which will
be adapted to use the ioctl.

This is not necessarily a permanent solution.
 1.1.2.2  08-Sep-2013  riastradh Avoid the PAGE_MASK mess in drm_gem_vm.c, drm_scatter.c, & drm_vm.c.
 1.1.2.1  24-Jul-2013  riastradh Add local drm_vm.c with uvm-style (but non-gem) drm page mapping.
 1.2.2.1  10-Aug-2014  tls Rebase.
 1.3.4.2  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.3.4.1  01-May-2014  yamt file drm_vm.c was added on branch yamt-pagecache on 2014-05-22 11:40:55 +0000
 1.3.2.2  18-May-2014  rmind sync with head
 1.3.2.1  01-May-2014  rmind file drm_vm.c was added on branch rmind-smpnet on 2014-05-18 17:46:00 +0000
 1.5.6.1  06-Apr-2015  skrll Sync with HEAD
 1.5.4.3  03-Dec-2017  jdolecek update from HEAD
 1.5.4.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1  26-Jul-2014  tls file drm_vm.c was added on branch tls-maxphys on 2014-08-20 00:04:20 +0000
 1.5.2.2  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.5.2.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.7.18.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.18.1  10-Jun-2019  christos Sync with HEAD
 1.7.16.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.10.6.1  29-Feb-2020  ad Sync with head.

RSS XML Feed