~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/gpu/drm/radeon/radeon_bios.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
static bool radeon_atrm_get_bios(struct radeon_device *rdev)
105
105
{
106
106
        int ret;
107
 
        int size = 64 * 1024;
 
107
        int size = 256 * 1024;
108
108
        int i;
109
109
 
110
110
        if (!radeon_atrm_supported(rdev->pdev))
331
331
 
332
332
        seprom_cntl1 = RREG32(RADEON_SEPROM_CNTL1);
333
333
        viph_control = RREG32(RADEON_VIPH_CONTROL);
334
 
        bus_cntl = RREG32(RADEON_BUS_CNTL);
 
334
        bus_cntl = RREG32(RV370_BUS_CNTL);
335
335
        d1vga_control = RREG32(AVIVO_D1VGA_CONTROL);
336
336
        d2vga_control = RREG32(AVIVO_D2VGA_CONTROL);
337
337
        vga_render_control = RREG32(AVIVO_VGA_RENDER_CONTROL);
350
350
        WREG32(RADEON_VIPH_CONTROL, (viph_control & ~RADEON_VIPH_EN));
351
351
 
352
352
        /* enable the rom */
353
 
        WREG32(RADEON_BUS_CNTL, (bus_cntl & ~RADEON_BUS_BIOS_DIS_ROM));
 
353
        WREG32(RV370_BUS_CNTL, (bus_cntl & ~RV370_BUS_BIOS_DIS_ROM));
354
354
 
355
355
        /* Disable VGA mode */
356
356
        WREG32(AVIVO_D1VGA_CONTROL,
367
367
        /* restore regs */
368
368
        WREG32(RADEON_SEPROM_CNTL1, seprom_cntl1);
369
369
        WREG32(RADEON_VIPH_CONTROL, viph_control);
370
 
        WREG32(RADEON_BUS_CNTL, bus_cntl);
 
370
        WREG32(RV370_BUS_CNTL, bus_cntl);
371
371
        WREG32(AVIVO_D1VGA_CONTROL, d1vga_control);
372
372
        WREG32(AVIVO_D2VGA_CONTROL, d2vga_control);
373
373
        WREG32(AVIVO_VGA_RENDER_CONTROL, vga_render_control);
390
390
 
391
391
        seprom_cntl1 = RREG32(RADEON_SEPROM_CNTL1);
392
392
        viph_control = RREG32(RADEON_VIPH_CONTROL);
393
 
        bus_cntl = RREG32(RADEON_BUS_CNTL);
 
393
        if (rdev->flags & RADEON_IS_PCIE)
 
394
                bus_cntl = RREG32(RV370_BUS_CNTL);
 
395
        else
 
396
                bus_cntl = RREG32(RADEON_BUS_CNTL);
394
397
        crtc_gen_cntl = RREG32(RADEON_CRTC_GEN_CNTL);
395
398
        crtc2_gen_cntl = 0;
396
399
        crtc_ext_cntl = RREG32(RADEON_CRTC_EXT_CNTL);
412
415
        WREG32(RADEON_VIPH_CONTROL, (viph_control & ~RADEON_VIPH_EN));
413
416
 
414
417
        /* enable the rom */
415
 
        WREG32(RADEON_BUS_CNTL, (bus_cntl & ~RADEON_BUS_BIOS_DIS_ROM));
 
418
        if (rdev->flags & RADEON_IS_PCIE)
 
419
                WREG32(RV370_BUS_CNTL, (bus_cntl & ~RV370_BUS_BIOS_DIS_ROM));
 
420
        else
 
421
                WREG32(RADEON_BUS_CNTL, (bus_cntl & ~RADEON_BUS_BIOS_DIS_ROM));
416
422
 
417
423
        /* Turn off mem requests and CRTC for both controllers */
418
424
        WREG32(RADEON_CRTC_GEN_CNTL,
439
445
        /* restore regs */
440
446
        WREG32(RADEON_SEPROM_CNTL1, seprom_cntl1);
441
447
        WREG32(RADEON_VIPH_CONTROL, viph_control);
442
 
        WREG32(RADEON_BUS_CNTL, bus_cntl);
 
448
        if (rdev->flags & RADEON_IS_PCIE)
 
449
                WREG32(RV370_BUS_CNTL, bus_cntl);
 
450
        else
 
451
                WREG32(RADEON_BUS_CNTL, bus_cntl);
443
452
        WREG32(RADEON_CRTC_GEN_CNTL, crtc_gen_cntl);
444
453
        if (!(rdev->flags & RADEON_SINGLE_CRTC)) {
445
454
                WREG32(RADEON_CRTC2_GEN_CNTL, crtc2_gen_cntl);