1 1.3 martin /* $NetBSD: video.h,v 1.3 2008/04/28 20:23:27 martin 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 * 15 1.1 jmmv * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND 16 1.1 jmmv * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 17 1.1 jmmv * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 1.1 jmmv * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 1.1 jmmv * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY 20 1.1 jmmv * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 1.1 jmmv * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 22 1.1 jmmv * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 1.1 jmmv * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 24 1.1 jmmv * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 1.1 jmmv * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 1.1 jmmv * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 1.1 jmmv */ 28 1.1 jmmv 29 1.1 jmmv #ifndef _CPU_VIDEO_H_ 30 1.1 jmmv #define _CPU_VIDEO_H_ 31 1.1 jmmv 32 1.2 jmmv #include <sys/types.h> 33 1.1 jmmv 34 1.2 jmmv struct mac68k_video { 35 1.2 jmmv /* From Booter via locore */ 36 1.2 jmmv vaddr_t mv_kvaddr; /* Address used in kernel for video */ 37 1.2 jmmv size_t mv_stride; /* Length of row in video RAM */ 38 1.2 jmmv size_t mv_depth; /* Number of bits per pixel */ 39 1.2 jmmv size_t mv_width; /* Framebuffer width */ 40 1.2 jmmv size_t mv_height; /* Framebuffer height */ 41 1.2 jmmv 42 1.2 jmmv /* 43 1.2 jmmv * Values for IIvx-like internal video 44 1.2 jmmv * -- should be zero if it is not used (usual case). 45 1.2 jmmv * 46 1.2 jmmv * XXX This doesn't seem to hold true nowadays. It seems that 47 1.2 jmmv * these fields are accessed from many places and they are 48 1.2 jmmv * non-zero of machines with non-internal video. They should also 49 1.2 jmmv * have better names to clarify, e.g, why we need mv_log and 50 1.2 jmmv * mv_kvaddr (do we need to have these two?) -- jmmv 20070829 51 1.2 jmmv */ 52 1.2 jmmv vaddr_t mv_log; /* logical addr */ 53 1.2 jmmv paddr_t mv_phys; /* physical addr */ 54 1.2 jmmv size_t mv_len; /* mem length */ 55 1.2 jmmv }; 56 1.2 jmmv 57 1.2 jmmv extern struct mac68k_video mac68k_video; 58 1.1 jmmv 59 1.1 jmmv #endif /* _CPU_VIDEO_H_ */ 60