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

RSS XML Feed