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