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