1fc1821feSrugrat /*
2fc1821feSrugrat  * CDDL HEADER START
3fc1821feSrugrat  *
4fc1821feSrugrat  * The contents of this file are subject to the terms of the
5fc1821feSrugrat  * Common Development and Distribution License, Version 1.0 only
6fc1821feSrugrat  * (the "License").  You may not use this file except in compliance
7fc1821feSrugrat  * with the License.
8fc1821feSrugrat  *
9fc1821feSrugrat  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10fc1821feSrugrat  * or http://www.opensolaris.org/os/licensing.
11fc1821feSrugrat  * See the License for the specific language governing permissions
12fc1821feSrugrat  * and limitations under the License.
13fc1821feSrugrat  *
14fc1821feSrugrat  * When distributing Covered Code, include this CDDL HEADER in each
15fc1821feSrugrat  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16fc1821feSrugrat  * If applicable, add the following below this CDDL HEADER, with the
17fc1821feSrugrat  * fields enclosed by brackets "[]" replaced with your own identifying
18fc1821feSrugrat  * information: Portions Copyright [yyyy] [name of copyright owner]
19fc1821feSrugrat  *
20fc1821feSrugrat  * CDDL HEADER END
21fc1821feSrugrat  */
22fc1821feSrugrat /*
23613b2871SRichard Bean  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24fc1821feSrugrat  * Use is subject to license terms.
25fc1821feSrugrat  */
26fc1821feSrugrat 
27fc1821feSrugrat /*
28fc1821feSrugrat  * Private interfaces for graphics drivers for which there
29fc1821feSrugrat  * are yet no acceptable DDI interfaces.
30fc1821feSrugrat  */
31fc1821feSrugrat 
32fc1821feSrugrat #include <sys/types.h>
33fc1821feSrugrat #include <sys/param.h>
34fc1821feSrugrat #include <sys/sunddi.h>
35fc1821feSrugrat #include <sys/ddi_subrdefs.h>
36fc1821feSrugrat #include <sys/bootconf.h>
37fc1821feSrugrat #include <sys/psw.h>
38fc1821feSrugrat #include <sys/modctl.h>
39fc1821feSrugrat #include <sys/errno.h>
40fc1821feSrugrat #include <sys/reboot.h>
41*dc1b2691SGordon Ross #include <sys/gfx_private.h>
42fc1821feSrugrat 
43fc1821feSrugrat static struct modlmisc modlmisc = {
44613b2871SRichard Bean 	&mod_miscops, "gfx private interfaces"
45fc1821feSrugrat };
46fc1821feSrugrat 
47fc1821feSrugrat static struct modlinkage modlinkage = {
48fc1821feSrugrat 	MODREV_1, (void *)&modlmisc, NULL
49fc1821feSrugrat };
50fc1821feSrugrat 
51fc1821feSrugrat int
_init(void)52fc1821feSrugrat _init(void)
53fc1821feSrugrat {
54fc1821feSrugrat 	int	err;
55fc1821feSrugrat 
56fc1821feSrugrat 	if ((err = mod_install(&modlinkage)) != 0)
57fc1821feSrugrat 		return (err);
58fc1821feSrugrat 	return (0);
59fc1821feSrugrat }
60fc1821feSrugrat 
61fc1821feSrugrat int
_fini(void)62fc1821feSrugrat _fini(void)
63fc1821feSrugrat {
64fc1821feSrugrat 	int	err;
65fc1821feSrugrat 
66fc1821feSrugrat 	if ((err = mod_remove(&modlinkage)) != 0)
67fc1821feSrugrat 		return (err);
68fc1821feSrugrat 
69fc1821feSrugrat 	return (0);
70fc1821feSrugrat }
71fc1821feSrugrat 
72fc1821feSrugrat int
_info(struct modinfo * modinfop)73fc1821feSrugrat _info(struct modinfo *modinfop)
74fc1821feSrugrat {
75fc1821feSrugrat 	return (mod_info(&modlinkage, modinfop));
76fc1821feSrugrat }
77