1 /* $NetBSD: ct65550var.h,v 1.3 2017/02/02 19:55:05 macallan Exp $ */
2
3 /*
4 * Copyright (c) 2006 Michael Lorenz
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28 #ifndef CT65550VAR_H
29 #define CT65550VAR_H
30
31 #include <dev/wscons/wsdisplayvar.h>
32 #include <dev/wscons/wsconsio.h>
33 #include <dev/wsfont/wsfont.h>
34 #include <dev/rasops/rasops.h>
35 #include <dev/wscons/wsdisplay_vconsvar.h>
36 #include <dev/wscons/wsdisplay_glyphcachevar.h>
37 #include <dev/i2c/i2cvar.h>
38
39 struct chipsfb_softc {
40 device_t sc_dev;
41
42 bus_space_tag_t sc_memt;
43 bus_space_tag_t sc_iot;
44
45 bus_space_handle_t sc_fbh;
46 bus_space_handle_t sc_mmregh;
47 bus_space_handle_t sc_ioregh;
48 bus_addr_t sc_fb;
49 bus_size_t sc_fbsize, sc_ioregsize;
50
51 int (*sc_ioctl)(void *, void *, u_long, void *, int, struct lwp *);
52 paddr_t (*sc_mmap)(void *, void *, off_t, int);
53
54
55 size_t memsize;
56
57 int sc_bits_per_pixel;
58 int sc_width, sc_height, sc_linebytes;
59
60 int sc_mode;
61 uint32_t sc_bg;
62
63 u_char sc_cmap_red[256];
64 u_char sc_cmap_green[256];
65 u_char sc_cmap_blue[256];
66 int sc_dacw;
67
68 /*
69 * I2C stuff
70 * DDC2 clock is on GPIO1, data on GPIO0
71 */
72 struct i2c_controller sc_i2c;
73 uint8_t sc_edid[1024];
74 int sc_edidbytes; /* number of bytes read from the monitor */
75
76 struct vcons_data vd;
77 glyphcache sc_gc;
78 };
79
80 void chipsfb_do_attach(struct chipsfb_softc *sc);
81 uint32_t chipsfb_probe_vram(struct chipsfb_softc *sc);
82
83 #endif /* CT65550VAR_H */
Cache object: c48a68149a86442b9358e21bbd6a8c66
|