tcx.h revision ecc0bcc7
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"
34ecc0bcc7Smacallan#include "exa.h"
35e4da13eeSmacallan#include "tcx_regs.h"
36e4da13eeSmacallan
37e4da13eeSmacallan/* Various offsets in virtual (ie. mmap()) spaces Linux and Solaris support. */
38e4da13eeSmacallan#define TCX_RAM8_VOFF		0x00000000
39e4da13eeSmacallan#define TCX_RAM24_VOFF		0x01000000
40e4da13eeSmacallan#define TCX_CPLANE_VOFF		0x28000000
41ecc0bcc7Smacallan#define	TCX_RSTIP_VOFF		0x30000000
42ecc0bcc7Smacallan#define	TCX_RBLIT_VOFF		0x38000000
43e4da13eeSmacallan#define TCX_TEC_VOFF		0x70000000
44e4da13eeSmacallan#define TCX_BTREGS_VOFF		0x70002000
45e4da13eeSmacallan#define TCX_THC_VOFF		0x70004000
46e4da13eeSmacallan#define TCX_DHC_VOFF		0x70008000
47e4da13eeSmacallan#define TCX_ALT_VOFF		0x7000a000
48e4da13eeSmacallan#define TCX_SYNC_VOFF		0x7000e000
49e4da13eeSmacallan
50e4da13eeSmacallantypedef struct {
51e4da13eeSmacallan	unsigned char	*fb;
52e4da13eeSmacallan	int		width;
53e4da13eeSmacallan	int		height;
54e4da13eeSmacallan	unsigned int	*cplane;
55e4da13eeSmacallan	TcxThcPtr	thc;
56e4da13eeSmacallan	sbusDevicePtr	psdp;
57e4da13eeSmacallan	CloseScreenProcPtr CloseScreen;
58e4da13eeSmacallan	Bool		HWCursor;
59ecc0bcc7Smacallan	uint64_t	*rblit;
60ecc0bcc7Smacallan	uint64_t	*rstip;
61e4da13eeSmacallan	xf86CursorInfoPtr CursorInfoRec;
62e4da13eeSmacallan	unsigned int	CursorXY;
63e4da13eeSmacallan	int		CursorBg, CursorFg;
64ecc0bcc7Smacallan	Bool		CursorEnabled, NoAccel;
65e4da13eeSmacallan	unsigned char	CursorShiftX, CursorShiftY;
66e4da13eeSmacallan	unsigned char	*CursorData;
67e4da13eeSmacallan	OptionInfoPtr	Options;
68ecc0bcc7Smacallan	ExaDriverPtr	pExa;
69ecc0bcc7Smacallan	int		xdir, ydir, srcoff, srcpitch, fg;
70e4da13eeSmacallan} TcxRec, *TcxPtr;
71e4da13eeSmacallan
72ecc0bcc7SmacallanBool TcxInitAccel(ScreenPtr);
73ecc0bcc7Smacallan
74e4da13eeSmacallan#define TCX_CPLANE_MODE		0x03000000
75e4da13eeSmacallan
76e4da13eeSmacallan#define GET_TCX_FROM_SCRN(p)    ((TcxPtr)((p)->driverPrivate))
77e4da13eeSmacallan
78e4da13eeSmacallan#endif /* TCX_H */
79