diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 8ea3658eee99..8f3454e2056a 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "drmP.h" | 32 | #include "drmP.h" |
33 | #include "radeon_drm.h" | 33 | #include "radeon_drm.h" |
34 | #include "radeon.h" | 34 | #include "radeon.h" |
35 | #include "radeon_asic.h" | ||
35 | #include "radeon_mode.h" | 36 | #include "radeon_mode.h" |
36 | #include "r600d.h" | 37 | #include "r600d.h" |
37 | #include "atom.h" | 38 | #include "atom.h" |
@@ -492,9 +493,9 @@ void r600_pcie_gart_disable(struct radeon_device *rdev) | |||
492 | 493 | ||
493 | void r600_pcie_gart_fini(struct radeon_device *rdev) | 494 | void r600_pcie_gart_fini(struct radeon_device *rdev) |
494 | { | 495 | { |
496 | radeon_gart_fini(rdev); | ||
495 | r600_pcie_gart_disable(rdev); | 497 | r600_pcie_gart_disable(rdev); |
496 | radeon_gart_table_vram_free(rdev); | 498 | radeon_gart_table_vram_free(rdev); |
497 | radeon_gart_fini(rdev); | ||
498 | } | 499 | } |
499 | 500 | ||
500 | void r600_agp_enable(struct radeon_device *rdev) | 501 | void r600_agp_enable(struct radeon_device *rdev) |
@@ -676,7 +677,6 @@ void r600_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) | |||
676 | 677 | ||
677 | int r600_mc_init(struct radeon_device *rdev) | 678 | int r600_mc_init(struct radeon_device *rdev) |
678 | { | 679 | { |
679 | fixed20_12 a; | ||
680 | u32 tmp; | 680 | u32 tmp; |
681 | int chansize, numchan; | 681 | int chansize, numchan; |
682 | 682 | ||
@@ -720,14 +720,10 @@ int r600_mc_init(struct radeon_device *rdev) | |||
720 | rdev->mc.real_vram_size = rdev->mc.aper_size; | 720 | rdev->mc.real_vram_size = rdev->mc.aper_size; |
721 | } | 721 | } |
722 | r600_vram_gtt_location(rdev, &rdev->mc); | 722 | r600_vram_gtt_location(rdev, &rdev->mc); |
723 | /* FIXME: we should enforce default clock in case GPU is not in | 723 | |
724 | * default setup | ||
725 | */ | ||
726 | a.full = rfixed_const(100); | ||
727 | rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); | ||
728 | rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); | ||
729 | if (rdev->flags & RADEON_IS_IGP) | 724 | if (rdev->flags & RADEON_IS_IGP) |
730 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); | 725 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); |
726 | radeon_update_bandwidth_info(rdev); | ||
731 | return 0; | 727 | return 0; |
732 | } | 728 | } |
733 | 729 | ||
@@ -1133,6 +1129,7 @@ void r600_gpu_init(struct radeon_device *rdev) | |||
1133 | /* Setup pipes */ | 1129 | /* Setup pipes */ |
1134 | WREG32(CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); | 1130 | WREG32(CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); |
1135 | WREG32(CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); | 1131 | WREG32(CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); |
1132 | WREG32(GC_USER_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); | ||
1136 | 1133 | ||
1137 | tmp = R6XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES_MASK) >> 8); | 1134 | tmp = R6XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES_MASK) >> 8); |
1138 | WREG32(VGT_OUT_DEALLOC_CNTL, (tmp * 4) & DEALLOC_DIST_MASK); | 1135 | WREG32(VGT_OUT_DEALLOC_CNTL, (tmp * 4) & DEALLOC_DIST_MASK); |
@@ -2120,6 +2117,7 @@ int r600_init(struct radeon_device *rdev) | |||
2120 | 2117 | ||
2121 | void r600_fini(struct radeon_device *rdev) | 2118 | void r600_fini(struct radeon_device *rdev) |
2122 | { | 2119 | { |
2120 | radeon_pm_fini(rdev); | ||
2123 | r600_audio_fini(rdev); | 2121 | r600_audio_fini(rdev); |
2124 | r600_blit_fini(rdev); | 2122 | r600_blit_fini(rdev); |
2125 | r600_cp_fini(rdev); | 2123 | r600_cp_fini(rdev); |
@@ -2399,19 +2397,19 @@ static void r600_disable_interrupt_state(struct radeon_device *rdev) | |||
2399 | WREG32(DC_HPD4_INT_CONTROL, tmp); | 2397 | WREG32(DC_HPD4_INT_CONTROL, tmp); |
2400 | if (ASIC_IS_DCE32(rdev)) { | 2398 | if (ASIC_IS_DCE32(rdev)) { |
2401 | tmp = RREG32(DC_HPD5_INT_CONTROL) & DC_HPDx_INT_POLARITY; | 2399 | tmp = RREG32(DC_HPD5_INT_CONTROL) & DC_HPDx_INT_POLARITY; |
2402 | WREG32(DC_HPD5_INT_CONTROL, 0); | 2400 | WREG32(DC_HPD5_INT_CONTROL, tmp); |
2403 | tmp = RREG32(DC_HPD6_INT_CONTROL) & DC_HPDx_INT_POLARITY; | 2401 | tmp = RREG32(DC_HPD6_INT_CONTROL) & DC_HPDx_INT_POLARITY; |
2404 | WREG32(DC_HPD6_INT_CONTROL, 0); | 2402 | WREG32(DC_HPD6_INT_CONTROL, tmp); |
2405 | } | 2403 | } |
2406 | } else { | 2404 | } else { |
2407 | WREG32(DACA_AUTODETECT_INT_CONTROL, 0); | 2405 | WREG32(DACA_AUTODETECT_INT_CONTROL, 0); |
2408 | WREG32(DACB_AUTODETECT_INT_CONTROL, 0); | 2406 | WREG32(DACB_AUTODETECT_INT_CONTROL, 0); |
2409 | tmp = RREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; | 2407 | tmp = RREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; |
2410 | WREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL, 0); | 2408 | WREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL, tmp); |
2411 | tmp = RREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; | 2409 | tmp = RREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; |
2412 | WREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL, 0); | 2410 | WREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL, tmp); |
2413 | tmp = RREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; | 2411 | tmp = RREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; |
2414 | WREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL, 0); | 2412 | WREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL, tmp); |
2415 | } | 2413 | } |
2416 | } | 2414 | } |
2417 | 2415 | ||
@@ -2766,6 +2764,7 @@ restart_ih: | |||
2766 | case 0: /* D1 vblank */ | 2764 | case 0: /* D1 vblank */ |
2767 | if (disp_int & LB_D1_VBLANK_INTERRUPT) { | 2765 | if (disp_int & LB_D1_VBLANK_INTERRUPT) { |
2768 | drm_handle_vblank(rdev->ddev, 0); | 2766 | drm_handle_vblank(rdev->ddev, 0); |
2767 | rdev->pm.vblank_sync = true; | ||
2769 | wake_up(&rdev->irq.vblank_queue); | 2768 | wake_up(&rdev->irq.vblank_queue); |
2770 | disp_int &= ~LB_D1_VBLANK_INTERRUPT; | 2769 | disp_int &= ~LB_D1_VBLANK_INTERRUPT; |
2771 | DRM_DEBUG("IH: D1 vblank\n"); | 2770 | DRM_DEBUG("IH: D1 vblank\n"); |
@@ -2787,6 +2786,7 @@ restart_ih: | |||
2787 | case 0: /* D2 vblank */ | 2786 | case 0: /* D2 vblank */ |
2788 | if (disp_int & LB_D2_VBLANK_INTERRUPT) { | 2787 | if (disp_int & LB_D2_VBLANK_INTERRUPT) { |
2789 | drm_handle_vblank(rdev->ddev, 1); | 2788 | drm_handle_vblank(rdev->ddev, 1); |
2789 | rdev->pm.vblank_sync = true; | ||
2790 | wake_up(&rdev->irq.vblank_queue); | 2790 | wake_up(&rdev->irq.vblank_queue); |
2791 | disp_int &= ~LB_D2_VBLANK_INTERRUPT; | 2791 | disp_int &= ~LB_D2_VBLANK_INTERRUPT; |
2792 | DRM_DEBUG("IH: D2 vblank\n"); | 2792 | DRM_DEBUG("IH: D2 vblank\n"); |
@@ -2835,14 +2835,14 @@ restart_ih: | |||
2835 | break; | 2835 | break; |
2836 | case 10: | 2836 | case 10: |
2837 | if (disp_int_cont2 & DC_HPD5_INTERRUPT) { | 2837 | if (disp_int_cont2 & DC_HPD5_INTERRUPT) { |
2838 | disp_int_cont &= ~DC_HPD5_INTERRUPT; | 2838 | disp_int_cont2 &= ~DC_HPD5_INTERRUPT; |
2839 | queue_hotplug = true; | 2839 | queue_hotplug = true; |
2840 | DRM_DEBUG("IH: HPD5\n"); | 2840 | DRM_DEBUG("IH: HPD5\n"); |
2841 | } | 2841 | } |
2842 | break; | 2842 | break; |
2843 | case 12: | 2843 | case 12: |
2844 | if (disp_int_cont2 & DC_HPD6_INTERRUPT) { | 2844 | if (disp_int_cont2 & DC_HPD6_INTERRUPT) { |
2845 | disp_int_cont &= ~DC_HPD6_INTERRUPT; | 2845 | disp_int_cont2 &= ~DC_HPD6_INTERRUPT; |
2846 | queue_hotplug = true; | 2846 | queue_hotplug = true; |
2847 | DRM_DEBUG("IH: HPD6\n"); | 2847 | DRM_DEBUG("IH: HPD6\n"); |
2848 | } | 2848 | } |