xserver-multidpi/hw/xfree86/ramdac/BT.h
Keith Packard 9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00

38 lines
1.3 KiB
C

#include "xf86RamDac.h"
extern _X_EXPORT RamDacHelperRecPtr BTramdacProbe(ScrnInfoPtr pScrn,
RamDacSupportedInfoRecPtr
ramdacs);
extern _X_EXPORT void BTramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
RamDacRegRecPtr RamDacRegRec);
extern _X_EXPORT void BTramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
RamDacRegRecPtr RamDacRegRec);
extern _X_EXPORT void BTramdacSetBpp(ScrnInfoPtr pScrn,
RamDacRegRecPtr RamDacRegRec);
#define ATT20C504_RAMDAC (VENDOR_BT << 16) | 0x00
#define ATT20C505_RAMDAC (VENDOR_BT << 16) | 0x01
#define BT485_RAMDAC (VENDOR_BT << 16) | 0x02
/*
* BT registers
*/
#define BT_WRITE_ADDR 0x00
#define BT_RAMDAC_DATA 0x01
#define BT_PIXEL_MASK 0x02
#define BT_READ_ADDR 0x03
#define BT_CURS_WR_ADDR 0x04
#define BT_CURS_DATA 0x05
#define BT_COMMAND_REG_0 0x06
#define BT_CURS_RD_ADDR 0x07
#define BT_COMMAND_REG_1 0x08
#define BT_COMMAND_REG_2 0x09
#define BT_STATUS_REG 0x0A
#define BT_CURS_RAM_DATA 0x0B
#define BT_CURS_X_LOW 0x0C
#define BT_CURS_X_HIGH 0x0D
#define BT_CURS_Y_LOW 0x0E
#define BT_CURS_Y_HIGH 0x0F