xref: /netbsd-src/sys/arch/mac68k/include/video.h (revision 8ac07aec990b9d2e483062509d0a9fa5b4f57cf2)
1 /*	$NetBSD: video.h,v 1.2 2007/08/29 16:09:32 jmmv Exp $	*/
2 /*
3  * Copyright (c) 2007 The NetBSD Foundation, Inc.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  * 3. All advertising materials mentioning features or use of this
15  *    software must display the following acknowledgement:
16  *        This product includes software developed by the NetBSD
17  *        Foundation, Inc. and its contributors.
18  * 4. Neither the name of The NetBSD Foundation nor the names of its
19  *    contributors may be used to endorse or promote products derived
20  *    from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
23  * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
24  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26  * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
27  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
31  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
33  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34  */
35 
36 #ifndef _CPU_VIDEO_H_
37 #define _CPU_VIDEO_H_
38 
39 #include <sys/types.h>
40 
41 struct mac68k_video {
42 	/* From Booter via locore */
43 	vaddr_t mv_kvaddr;	/* Address used in kernel for video */
44 	size_t mv_stride;	/* Length of row in video RAM */
45 	size_t mv_depth;	/* Number of bits per pixel */
46 	size_t mv_width;	/* Framebuffer width */
47 	size_t mv_height;	/* Framebuffer height */
48 
49 	/*
50 	 * Values for IIvx-like internal video
51 	 * -- should be zero if it is not used (usual case).
52 	 *
53 	 * XXX This doesn't seem to hold true nowadays.  It seems that
54 	 * these fields are accessed from many places and they are
55 	 * non-zero of machines with non-internal video.  They should also
56 	 * have better names to clarify, e.g, why we need mv_log and
57 	 * mv_kvaddr (do we need to have these two?) -- jmmv 20070829
58 	 */
59 	vaddr_t mv_log;		/* logical addr */
60 	paddr_t mv_phys;	/* physical addr */
61 	size_t mv_len;		/* mem length */
62 };
63 
64 extern struct mac68k_video mac68k_video;
65 
66 #endif /* _CPU_VIDEO_H_ */
67