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