tcx.h revision e4da13ee
1e4da13eeSmacallan/*
2e4da13eeSmacallan * TCX framebuffer - defines.
3e4da13eeSmacallan *
4e4da13eeSmacallan * Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com)
5e4da13eeSmacallan *
6e4da13eeSmacallan * Permission is hereby granted, free of charge, to any person obtaining a copy
7e4da13eeSmacallan * of this software and associated documentation files (the "Software"), to deal
8e4da13eeSmacallan * in the Software without restriction, including without limitation the rights
9e4da13eeSmacallan * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10e4da13eeSmacallan * copies of the Software, and to permit persons to whom the Software is
11e4da13eeSmacallan * furnished to do so, subject to the following conditions:
12e4da13eeSmacallan *
13e4da13eeSmacallan * The above copyright notice and this permission notice shall be included in
14e4da13eeSmacallan * all copies or substantial portions of the Software.
15e4da13eeSmacallan *
16e4da13eeSmacallan * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17e4da13eeSmacallan * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18e4da13eeSmacallan * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19e4da13eeSmacallan * JAKUB JELINEK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20e4da13eeSmacallan * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21e4da13eeSmacallan * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22e4da13eeSmacallan */
23e4da13eeSmacallan/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/suntcx/tcx.h,v 1.1 2000/06/30 17:15:16 dawes Exp $ */
24e4da13eeSmacallan
25e4da13eeSmacallan#ifndef TCX_H
26e4da13eeSmacallan#define TCX_H
27e4da13eeSmacallan
28e4da13eeSmacallan#include "xf86.h"
29e4da13eeSmacallan#include "xf86_OSproc.h"
30e4da13eeSmacallan#include "xf86RamDac.h"
31e4da13eeSmacallan#include <X11/Xmd.h>
32e4da13eeSmacallan#include "gcstruct.h"
33e4da13eeSmacallan#include "xf86sbusBus.h"
34e4da13eeSmacallan#include "tcx_regs.h"
35e4da13eeSmacallan
36e4da13eeSmacallan/* Various offsets in virtual (ie. mmap()) spaces Linux and Solaris support. */
37e4da13eeSmacallan#define TCX_RAM8_VOFF		0x00000000
38e4da13eeSmacallan#define TCX_RAM24_VOFF		0x01000000
39e4da13eeSmacallan#define TCX_CPLANE_VOFF		0x28000000
40e4da13eeSmacallan#define TCX_TEC_VOFF		0x70000000
41e4da13eeSmacallan#define TCX_BTREGS_VOFF		0x70002000
42e4da13eeSmacallan#define TCX_THC_VOFF		0x70004000
43e4da13eeSmacallan#define TCX_DHC_VOFF		0x70008000
44e4da13eeSmacallan#define TCX_ALT_VOFF		0x7000a000
45e4da13eeSmacallan#define TCX_SYNC_VOFF		0x7000e000
46e4da13eeSmacallan
47e4da13eeSmacallantypedef struct {
48e4da13eeSmacallan	unsigned char	*fb;
49e4da13eeSmacallan	int		width;
50e4da13eeSmacallan	int		height;
51e4da13eeSmacallan	unsigned int	*cplane;
52e4da13eeSmacallan	TcxThcPtr	thc;
53e4da13eeSmacallan	sbusDevicePtr	psdp;
54e4da13eeSmacallan	CloseScreenProcPtr CloseScreen;
55e4da13eeSmacallan	Bool		HWCursor;
56e4da13eeSmacallan	xf86CursorInfoPtr CursorInfoRec;
57e4da13eeSmacallan	unsigned int	CursorXY;
58e4da13eeSmacallan	int		CursorBg, CursorFg;
59e4da13eeSmacallan	Bool		CursorEnabled;
60e4da13eeSmacallan	unsigned char	CursorShiftX, CursorShiftY;
61e4da13eeSmacallan	unsigned char	*CursorData;
62e4da13eeSmacallan	OptionInfoPtr	Options;
63e4da13eeSmacallan} TcxRec, *TcxPtr;
64e4da13eeSmacallan
65e4da13eeSmacallan#define TCX_CPLANE_MODE		0x03000000
66e4da13eeSmacallan
67e4da13eeSmacallan#define GET_TCX_FROM_SCRN(p)    ((TcxPtr)((p)->driverPrivate))
68e4da13eeSmacallan
69e4da13eeSmacallan#endif /* TCX_H */
70