Radeon 9000 Pro corruption problem on PPC when DRI is enabled
Ari Entlich
lmage11 at twcny.rr.com
Thu Aug 24 17:24:29 PDT 2006
On Thu, 2006-08-24 at 13:48 +0200, Roland Scheidegger wrote:
> Ian Romanick wrote:
> >> That said, I don't understand why it would get identified as a x86 bios
> >> if it isn't, as xf86ReadPciBIOS checks that itself, so in fact there
> >> shouldn't be any need to put in the same verification again in the
> >> radeon driver.
> >
> > I don't see any test for that in linuxPciHandleBIOS. If
> > linuxPciHandleBIOS returns success, none of the rest of the code in
> > HandlePciBIOS gets executed.
> Argh missed that one. Is that a bug or a feature? I find it strange that
> the sanity checks are vastly different for both methods.
> And it still doesn't explain why mapping the bios failed with 6.8.2 but
> "succeeds" with 7.1.
>
> Anyway, here's a new patch which should hopefully be more correct. If
> that still doesn't rule out the bios as not being x86 video bios I don't
> know what could be done (it should be the same test as radeonfb uses,
> which does figure out it's OF after all).
>
> Roland
>
> plain text document attachment (radeon_bios.c.diff)
> --- radeon_bios.c~ 2006-05-03 19:21:45.000000000 +0200
> +++ radeon_bios.c 2006-08-24 13:38:26.000000000 +0200
> @@ -46,6 +46,7 @@
> {
> RADEONInfoPtr info = RADEONPTR(pScrn);
> int tmp;
> + unsigned short dptr;
>
> if (!(info->VBIOS = xalloc(RADEON_VBIOS_SIZE))) {
> xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
> @@ -77,7 +78,22 @@
> xfree (info->VBIOS);
> info->VBIOS = NULL;
> return FALSE;
> - }
> + }
> +
> + /* verify it's x86 bios not OF firmware, copied from radeonfb */
> + dptr = RADEON_BIOS16(0x18);
> + /* if pci data signature is wrong assume x86 video bios anyway */
> + if (RADEON_BIOS32(dptr) != (('R' << 24) | ('I' << 16) | ('C' << 8) | 'P')) {
> + xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
> + "ROM pci data signature incorrect, ignoring\n");
> + }
> + else if (info->VBIOS[dptr + 0x14] != 0x0) {
> + xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
> + "Not a x86 BIOS ROM Image, BIOS data will not be used\n");
> + xfree (info->VBIOS);
> + info->VBIOS = NULL;
> + return FALSE;
> + }
>
> if (info->VBIOS) info->ROMHeaderStart = RADEON_BIOS16(0x48);
>
Yup, this patch fixed it! Thanks a bunch :).
Thanks,
Ari
More information about the xorg
mailing list