[xserver-commit] xserver/hw/kdrive/ati ati.c,1.1,1.2 ati_draw.c,1.1,1.2
Eric Anholt
xserver-commit@pdx.freedesktop.org
Wed, 19 Nov 2003 16:05:58 -0800
Committed by: anholt
Update of /cvs/xserver/xserver/hw/kdrive/ati
In directory pdx:/home/anholt/xserver/hw/kdrive/ati
Modified Files:
ati.c ati_draw.c
Log Message:
- Fix confusion of depth/bitsPerPixel in ati_draw.c
- Disable acceleration with 24bpp due to apparent broken acceleration.
Accel at 24bpp was the cause of the crashes when people tried to use
any depth over 16. XFree86 doesn't support 24 either.
- Disable at < 8bpp, too.
- Add the other Rage 128 PCI IDs.
- Remove unnecessary setting of scissor registers (only default
scissor gets used).
Index: ati.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ati.c 19 Nov 2003 08:32:35 -0000 1.1
+++ ati.c 20 Nov 2003 00:05:56 -0000 1.2
@@ -88,8 +88,53 @@
};
struct pci_id_list r128_id_list[] = {
- {0x1002, 0x4c46, "ATI Rage 128"},
- {0x1002, 0x5046, "ATI Rage 128"},
+ {0x1002, 0x4c45, "ATI Rage 128 LE"},
+ {0x1002, 0x4c46, "ATI Rage 128 LF"},
+ {0x1002, 0x4d46, "ATI Rage 128 MF"},
+ {0x1002, 0x4d46, "ATI Rage 128 ML"},
+ {0x1002, 0x5041, "ATI Rage 128 PA"},
+ {0x1002, 0x5042, "ATI Rage 128 PB"},
+ {0x1002, 0x5043, "ATI Rage 128 PC"},
+ {0x1002, 0x5044, "ATI Rage 128 PD"},
+ {0x1002, 0x5045, "ATI Rage 128 PE"},
+ {0x1002, 0x5046, "ATI Rage 128 PF"},
+ {0x1002, 0x5047, "ATI Rage 128 PG"},
+ {0x1002, 0x5048, "ATI Rage 128 PH"},
+ {0x1002, 0x5049, "ATI Rage 128 PI"},
+ {0x1002, 0x504a, "ATI Rage 128 PJ"},
+ {0x1002, 0x504b, "ATI Rage 128 PK"},
+ {0x1002, 0x504c, "ATI Rage 128 PL"},
+ {0x1002, 0x504d, "ATI Rage 128 PM"},
+ {0x1002, 0x504e, "ATI Rage 128 PN"},
+ {0x1002, 0x504f, "ATI Rage 128 PO"},
+ {0x1002, 0x5050, "ATI Rage 128 PP"},
+ {0x1002, 0x5051, "ATI Rage 128 PQ"},
+ {0x1002, 0x5052, "ATI Rage 128 PR"},
+ {0x1002, 0x5053, "ATI Rage 128 PS"},
+ {0x1002, 0x5054, "ATI Rage 128 PT"},
+ {0x1002, 0x5055, "ATI Rage 128 PU"},
+ {0x1002, 0x5056, "ATI Rage 128 PV"},
+ {0x1002, 0x5057, "ATI Rage 128 PW"},
+ {0x1002, 0x5058, "ATI Rage 128 PX"},
+ {0x1002, 0x5245, "ATI Rage 128 RE"},
+ {0x1002, 0x5246, "ATI Rage 128 RF"},
+ {0x1002, 0x5247, "ATI Rage 128 RG"},
+ {0x1002, 0x524b, "ATI Rage 128 RK"},
+ {0x1002, 0x524c, "ATI Rage 128 RL"},
+ {0x1002, 0x5345, "ATI Rage 128 SE"},
+ {0x1002, 0x5346, "ATI Rage 128 SF"},
+ {0x1002, 0x5347, "ATI Rage 128 SG"},
+ {0x1002, 0x5348, "ATI Rage 128 SH"},
+ {0x1002, 0x534b, "ATI Rage 128 SK"},
+ {0x1002, 0x534c, "ATI Rage 128 SL"},
+ {0x1002, 0x534d, "ATI Rage 128 SM"},
+ {0x1002, 0x534e, "ATI Rage 128 SN"},
+ {0x1002, 0x5446, "ATI Rage 128 TF"},
+ {0x1002, 0x544c, "ATI Rage 128 TL"},
+ {0x1002, 0x5452, "ATI Rage 128 TR"},
+ {0x1002, 0x5453, "ATI Rage 128 TS"},
+ {0x1002, 0x5454, "ATI Rage 128 TT"},
+ {0x1002, 0x5455, "ATI Rage 128 TU"},
{0, 0, NULL}
};
Index: ati_draw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati_draw.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ati_draw.c 19 Nov 2003 08:32:35 -0000 1.1
+++ ati_draw.c 20 Nov 2003 00:05:56 -0000 1.2
@@ -173,9 +173,6 @@
}
MMIO_OUT32(mmio, RADEON_REG_DEFAULT_SC_BOTTOM_RIGHT,
(RADEON_DEFAULT_SC_RIGHT_MAX | RADEON_DEFAULT_SC_BOTTOM_MAX));
- MMIO_OUT32(mmio, RADEON_REG_SC_TOP_LEFT, 0);
- MMIO_OUT32(mmio, RADEON_REG_SC_BOTTOM_RIGHT,
- RADEON_DEFAULT_SC_RIGHT_MAX | RADEON_DEFAULT_SC_BOTTOM_MAX);
}
static Bool
@@ -271,25 +268,9 @@
Bool
ATIDrawInit(ScreenPtr pScreen)
{
- if (!kaaDrawInit(pScreen, &ATIKaa))
- return FALSE;
-
- return TRUE;
-}
-
-void
-ATIDrawEnable(ScreenPtr pScreen)
-{
KdScreenPriv(pScreen);
ATIScreenInfo(pScreenPriv);
- ATICardInfo(pScreenPriv);
- is_radeon = atic->is_radeon;
- atis->pitch = pScreenPriv->screen->width *
- pScreenPriv->screen->fb[0].bitsPerPixel/8;
-
- /*ErrorF("depth=%d pitch=%d radeon=%d\n",
- pScreenPriv->screen->fb[0].depth, atis->pitch, is_radeon);*/
switch (pScreenPriv->screen->fb[0].depth)
{
case 8:
@@ -302,14 +283,46 @@
atis->datatype = 4;
break;
case 24:
- atis->datatype = 5;
+ if (pScreenPriv->screen->fb[0].bitsPerPixel == 24) {
+ atis->datatype = 5;
+ ErrorF("[ati]: framebuffers at 24bpp not supported, "
+ "disabling acceleration\n");
+ return FALSE;
+ } else {
+ atis->datatype = 6;
+ }
break;
case 32:
atis->datatype = 6;
break;
default:
- ErrorF("Bad depth %d\n", pScreenPriv->screen->fb[0].depth);
+ ErrorF("[ati]: acceleration unsupported at depth %d\n",
+ pScreenPriv->screen->fb[0].depth);
+ return FALSE;
+ }
+
+
+ if (pScreenPriv->screen->fb[0].bitsPerPixel == 24) {
+
}
+
+ if (!kaaDrawInit(pScreen, &ATIKaa))
+ return FALSE;
+
+ return TRUE;
+}
+
+void
+ATIDrawEnable(ScreenPtr pScreen)
+{
+ KdScreenPriv(pScreen);
+ ATIScreenInfo(pScreenPriv);
+ ATICardInfo(pScreenPriv);
+
+ is_radeon = atic->is_radeon;
+
+ atis->pitch = (pScreenPriv->screen->fb[0].byteStride + 0x3f) & ~0x3f;
+
atis->dp_gui_master_cntl = (atis->datatype << 8) |
RADEON_GMC_CLR_CMP_CNTL_DIS | RADEON_GMC_AUX_CLIP_DIS;
KdMarkSync(pScreen);