Wed Jul 24 02:49:21 2013 UTC ()
Add i915drm2 module.
(riastradh)
diff -r0 -r1.1.2.1 src/sys/external/bsd/drm2/i915drm/i915_module.c
diff -r0 -r1.1.2.1 src/sys/modules/i915drm2/Makefile
diff -r0 -r1.1.2.1 src/sys/modules/i915drm2/i915drm.ioconf
/* $NetBSD: i915_module.c,v 1.1.2.1 2013/07/24 02:49:21 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Taylor R. Campbell.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i915_module.c,v 1.1.2.1 2013/07/24 02:49:21 riastradh Exp $");
#include <sys/types.h>
#include <sys/module.h>
#include <sys/systm.h>
MODULE(MODULE_CLASS_DRIVER, i915drm2, "drm2"); /* XXX drm2pci */
#ifdef _MODULE
#include "ioconf.c"
#endif
static int
i915drm2_modcmd(modcmd_t cmd, void *arg __unused)
{
#ifdef _MODULE
int error;
#endif
switch (cmd) {
case MODULE_CMD_INIT:
#ifdef _MODULE
error = config_init_component(cfdriver_ioconf_i915drm,
cfattach_ioconf_i915drm, cfdata_ioconf_i915drm);
if (error) {
aprint_error("i915drm: failed to init component: %s\n",
error);
return error;
}
#endif
return 0;
case MODULE_CMD_FINI:
#ifdef _MODULE
error = config_fini_component(cfdriver_ioconf_i915drm,
cfattach_ioconf_i915drm, cfdata_ioconf_i915drm);
if (error) {
aprint_error("i915drm: failed to fini component: %s\n",
error);
return error;
}
#endif
return 0;
default:
return ENOTTY;
}
}
# $NetBSD: Makefile,v 1.1.2.1 2013/07/24 02:49:21 riastradh Exp $
.include "../Makefile.inc"
.include "../drm2/Makefile.inc"
.PATH: ${S}/external/bsd/drm2/dist/drm/i915
KMOD= i915drm2
IOCONF= i915drm.ioconf
SRCS+= dvo_ch7017.c
SRCS+= dvo_ch7xxx.c
SRCS+= dvo_ivch.c
SRCS+= dvo_ns2501.c
SRCS+= dvo_sil164.c
SRCS+= dvo_tfp410.c
SRCS+= i915_debugfs.c
SRCS+= i915_dma.c
SRCS+= i915_drv.c
SRCS+= i915_gem.c
SRCS+= i915_gem_context.c
SRCS+= i915_gem_debug.c
SRCS+= i915_gem_dmabuf.c
SRCS+= i915_gem_evict.c
SRCS+= i915_gem_execbuffer.c
SRCS+= i915_gem_gtt.c
SRCS+= i915_gem_stolen.c
SRCS+= i915_gem_tiling.c
SRCS+= i915_ioc32.c
SRCS+= i915_irq.c
SRCS+= i915_suspend.c
SRCS+= i915_sysfs.c
SRCS+= intel_bios.c
SRCS+= intel_crt.c
SRCS+= intel_ddi.c
SRCS+= intel_display.c
SRCS+= intel_dp.c
SRCS+= intel_dvo.c
SRCS+= intel_fb.c
SRCS+= intel_hdmi.c
SRCS+= intel_i2c.c
SRCS+= intel_lvds.c
SRCS+= intel_modes.c
SRCS+= intel_opregion.c
SRCS+= intel_overlay.c
SRCS+= intel_panel.c
SRCS+= intel_pm.c
SRCS+= intel_ringbuffer.c
SRCS+= intel_sdvo.c
SRCS+= intel_sprite.c
SRCS+= intel_tv.c
.include <bsd.kmodule.mk>
# $NetBSD: i915drm.ioconf,v 1.1.2.1 2013/07/24 02:49:21 riastradh Exp $
ioconf i915drm
include "conf/files"
include "dev/pci/files.pci"
include "external/bsd/drm2/conf/files.drm2"
pseudo-root pci*
i915drm* at pci? dev ? function ?