diff --git a/hw/kdrive/ati/ati.c b/hw/kdrive/ati/ati.c index 17e9e5871..6a41d0886 100644 --- a/hw/kdrive/ati/ati.c +++ b/hw/kdrive/ati/ati.c @@ -88,8 +88,53 @@ struct pci_id_list radeon_id_list[] = { }; 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} }; diff --git a/hw/kdrive/ati/ati_draw.c b/hw/kdrive/ati/ati_draw.c index c08390ea5..a8bd8794b 100644 --- a/hw/kdrive/ati/ati_draw.c +++ b/hw/kdrive/ati/ati_draw.c @@ -173,9 +173,6 @@ ATISetup(ScreenPtr pScreen) } 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,6 +268,44 @@ KaaScreenInfoRec ATIKaa = { Bool ATIDrawInit(ScreenPtr pScreen) { + KdScreenPriv(pScreen); + ATIScreenInfo(pScreenPriv); + + switch (pScreenPriv->screen->fb[0].depth) + { + case 8: + atis->datatype = 2; + break; + case 15: + atis->datatype = 3; + break; + case 16: + atis->datatype = 4; + break; + case 24: + 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("[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; @@ -285,31 +320,9 @@ ATIDrawEnable(ScreenPtr pScreen) 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: - atis->datatype = 2; - break; - case 15: - atis->datatype = 3; - break; - case 16: - atis->datatype = 4; - break; - case 24: - atis->datatype = 5; - break; - case 32: - atis->datatype = 6; - break; - default: - ErrorF("Bad depth %d\n", pScreenPriv->screen->fb[0].depth); - } + + 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);