[xserver-commit] xserver/hw/kdrive/linux linux.c,1.16,1.17
Eric Anholt
xserver-commit@pdx.freedesktop.org
Wed, 19 Nov 2003 00:32:38 -0800
- Previous message: [xserver-commit] xserver/hw/kdrive/ati .cvsignore,NONE,1.1 Makefile.am,NONE,1.1 ati.c,NONE,1.1 ati.h,NONE,1.1 ati_draw.c,NONE,1.1 ati_reg.h,NONE,1.1 ati_stub.c,NONE,1.1
- Next message: [xserver-commit] xserver/hw/kdrive/src kdrive.h,1.43,1.44
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: anholt
Update of /cvs/xserver/xserver/hw/kdrive/linux
In directory pdx:/home/anholt/xserver/hw/kdrive/linux
Modified Files:
linux.c
Log Message:
- Add PCI information (device/vendor id, bus location) to KdCardAttr
to help with ati, and future DRM drivers.
- Add new "ati" kdrive driver. It has ancestry in the r128 driver
from andersca, but took a detour through being the WIP SiS 300
driver on the way. It supports Radeons (tested on QD VIVO and 7500)
and Rage 128. Current limitations include that it requires depth 16
and that the other Rage 128 PCI IDs aren't included yet.
Index: linux.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/linux/linux.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- linux.c 7 Nov 2003 23:29:29 -0000 1.16
+++ linux.c 19 Nov 2003 08:32:36 -0000 1.17
@@ -138,6 +138,8 @@
Bool ret = FALSE;
int i;
+ attr->vendorID = vendor;
+ attr->deviceID = device;
ven_dev = (((CARD32) vendor) << 16) | ((CARD32) device);
f = fopen ("/proc/bus/pci/devices", "r");
if (!f)
@@ -159,7 +161,7 @@
continue;
if (count--)
continue;
- (void) strtoul (l, &end, 16);
+ (void) strtoul (l, &end, 16); /* IRQ */
if (end == l)
continue;
l = end;
@@ -186,7 +188,10 @@
n--;
}
attr->naddr = n;
- attr->bus = bus;
+ attr->domain = 0; /* XXX */
+ attr->bus = (bus >> 8) & 0xff;
+ attr->slot = (bus >> 3) & 0x1f;
+ attr->func = bus & 0x07;
ret = TRUE;
break;
}
- Previous message: [xserver-commit] xserver/hw/kdrive/ati .cvsignore,NONE,1.1 Makefile.am,NONE,1.1 ati.c,NONE,1.1 ati.h,NONE,1.1 ati_draw.c,NONE,1.1 ati_reg.h,NONE,1.1 ati_stub.c,NONE,1.1
- Next message: [xserver-commit] xserver/hw/kdrive/src kdrive.h,1.43,1.44
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]