Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [riastradh-drm2] src/sys/external/bsd/drm2
Module Name: src
Committed By: riastradh
Date: Wed Jul 24 02:18:42 UTC 2013
Modified Files:
src/sys/external/bsd/drm2/dist/include/drm [riastradh-drm2]: drmP.h
Added Files:
src/sys/external/bsd/drm2/drm [riastradh-drm2]: drm_drv.c
Log Message:
First draft of NetBSD drm(4) driver attachment goop.
- Attachments will look like: drm0 at i915drm0 at pci0. In the
future, we may have wsdisplay0 at (drmfb0 at) drm0 at pci0. The
intent is to avoid having vga0, radeonfb0, &c., attach at pci0, and
then having drm0 parasitically sucking their memory as we currently
do with old drm. The drm0 device exists only so that we can have a
unified /dev/drm device node exposed to userland (i.e., a single drm
device major).
- There are some OS-independent subroutines here that don't belong.
I wrote them by
. studying the Linux driver attachment goop in dist/drm/drm_drv.c,
drm_fops.c, and drm_stub.c;
. identifying what logic is about DRM rather than about Linux's
driver KPI; and
. writing NetBSD driver attachment goop based on that information,
with the logic that is about DRM and independent of driver KPI
separated out into separate subroutines (drm_open_file, &c.).
- Initialization of struct drm_device is missing. It's not clear yet
whether this should be done by i915drm_attach &c., perhaps using some
utility (say, drm_device_initialize) defined here, or whether this
should be done mostly by drm_attach.
- Poll and read are missing. I suspect they will have to be filled
in at some point, in spite of comments in the old drm code to the
effect that they exist only for legacy X servers -- it looks like
more recent libdrms rely on them.
- Compile-tested only so far; this code is far from running.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.22 -r1.1.1.1.2.23 \
src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r0 -r1.1.2.1 src/sys/external/bsd/drm2/drm/drm_drv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index