~ubuntu-branches/ubuntu/hardy/xserver-xorg-video-ati/hardy

« back to all changes in this revision

Viewing changes to src/radeon_dri.c

  • Committer: Bazaar Package Importer
  • Author(s): Brice Goglin
  • Date: 2007-12-03 21:26:02 UTC
  • Revision ID: james.westby@ubuntu.com-20071203212602-o108upms09ttwac6
Tags: 1:6.7.196-2
* New upstream snapshot, containing commits up to 5022d006.
  + Fix the washed out color, closes: #440174.
  + Update 01_gen_pci_ids.diff to use the new ati_pciids_gen.h.

Show diffs side-by-side

added added

removed removed

Lines of Context:
559
559
 
560
560
        if (nbox > 1) {
561
561
            /* Keep ordering in each band, reverse order of bands */
562
 
            pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec)*nbox);
 
562
            pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec)*nbox);
563
563
            if (!pboxNew1) return;
564
564
 
565
 
            pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec)*nbox);
 
565
            pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec)*nbox);
566
566
            if (!pptNew1) {
567
 
                DEALLOCATE_LOCAL(pboxNew1);
 
567
                xfree(pboxNew1);
568
568
                return;
569
569
            }
570
570
 
601
601
 
602
602
        if (nbox > 1) {
603
603
            /* reverse order of rects in each band */
604
 
            pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec)*nbox);
605
 
            pptNew2  = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec)*nbox);
 
604
            pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec)*nbox);
 
605
            pptNew2  = (DDXPointPtr)xalloc(sizeof(DDXPointRec)*nbox);
606
606
 
607
607
            if (!pboxNew2 || !pptNew2) {
608
 
                DEALLOCATE_LOCAL(pptNew2);
609
 
                DEALLOCATE_LOCAL(pboxNew2);
610
 
                DEALLOCATE_LOCAL(pptNew1);
611
 
                DEALLOCATE_LOCAL(pboxNew1);
 
608
                xfree(pptNew2);
 
609
                xfree(pboxNew2);
 
610
                xfree(pptNew1);
 
611
                xfree(pboxNew1);
612
612
                return;
613
613
            }
614
614
 
679
679
 
680
680
    info->dst_pitch_offset = info->frontPitchOffset;;
681
681
 
682
 
    DEALLOCATE_LOCAL(pptNew2);
683
 
    DEALLOCATE_LOCAL(pboxNew2);
684
 
    DEALLOCATE_LOCAL(pptNew1);
685
 
    DEALLOCATE_LOCAL(pboxNew1);
 
682
    xfree(pptNew2);
 
683
    xfree(pboxNew2);
 
684
    xfree(pptNew1);
 
685
    xfree(pboxNew1);
686
686
 
687
687
    info->accel->NeedToSync = TRUE;
688
688
#endif /* USE_XAA */
722
722
    unsigned long mode   = drmAgpGetMode(info->drmFD);  /* Default mode */
723
723
    unsigned int  vendor = drmAgpVendorId(info->drmFD);
724
724
    unsigned int  device = drmAgpDeviceId(info->drmFD);
725
 
    CARD32 agp_status = INREG(RADEON_AGP_STATUS) & mode;
 
725
    /* ignore agp 3.0 mode bit from the chip as it's buggy on some cards with
 
726
       pcie-agp rialto bridge chip - use the one from bridge which must match */
 
727
    CARD32 agp_status = (INREG(RADEON_AGP_STATUS) | RADEON_AGPv3_MODE) & mode;
726
728
    Bool is_v3 = (agp_status & RADEON_AGPv3_MODE);
727
729
    unsigned int defaultMode;
728
730
    MessageType from;