aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c9
-rw-r--r--drivers/gpu/drm/radeon/r600.c9
-rw-r--r--drivers/gpu/drm/radeon/radeon.h2
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.c18
-rw-r--r--drivers/gpu/drm/radeon/radeon_clocks.c50
-rw-r--r--drivers/gpu/drm/radeon/radeon_mode.h1
-rw-r--r--drivers/gpu/drm/radeon/rv770.c9
7 files changed, 0 insertions, 98 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 957d5067ad9c..fe31b0db1e9c 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -2054,11 +2054,6 @@ int evergreen_resume(struct radeon_device *rdev)
2054 */ 2054 */
2055 /* post card */ 2055 /* post card */
2056 atom_asic_init(rdev->mode_info.atom_context); 2056 atom_asic_init(rdev->mode_info.atom_context);
2057 /* Initialize clocks */
2058 r = radeon_clocks_init(rdev);
2059 if (r) {
2060 return r;
2061 }
2062 2057
2063 r = evergreen_startup(rdev); 2058 r = evergreen_startup(rdev);
2064 if (r) { 2059 if (r) {
@@ -2164,9 +2159,6 @@ int evergreen_init(struct radeon_device *rdev)
2164 radeon_surface_init(rdev); 2159 radeon_surface_init(rdev);
2165 /* Initialize clocks */ 2160 /* Initialize clocks */
2166 radeon_get_clock_info(rdev->ddev); 2161 radeon_get_clock_info(rdev->ddev);
2167 r = radeon_clocks_init(rdev);
2168 if (r)
2169 return r;
2170 /* Fence driver */ 2162 /* Fence driver */
2171 r = radeon_fence_driver_init(rdev); 2163 r = radeon_fence_driver_init(rdev);
2172 if (r) 2164 if (r)
@@ -2236,7 +2228,6 @@ void evergreen_fini(struct radeon_device *rdev)
2236 evergreen_pcie_gart_fini(rdev); 2228 evergreen_pcie_gart_fini(rdev);
2237 radeon_gem_fini(rdev); 2229 radeon_gem_fini(rdev);
2238 radeon_fence_driver_fini(rdev); 2230 radeon_fence_driver_fini(rdev);
2239 radeon_clocks_fini(rdev);
2240 radeon_agp_fini(rdev); 2231 radeon_agp_fini(rdev);
2241 radeon_bo_fini(rdev); 2232 radeon_bo_fini(rdev);
2242 radeon_atombios_fini(rdev); 2233 radeon_atombios_fini(rdev);
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index aee8376216a2..04f134d1aae7 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -2489,11 +2489,6 @@ int r600_resume(struct radeon_device *rdev)
2489 */ 2489 */
2490 /* post card */ 2490 /* post card */
2491 atom_asic_init(rdev->mode_info.atom_context); 2491 atom_asic_init(rdev->mode_info.atom_context);
2492 /* Initialize clocks */
2493 r = radeon_clocks_init(rdev);
2494 if (r) {
2495 return r;
2496 }
2497 2492
2498 r = r600_startup(rdev); 2493 r = r600_startup(rdev);
2499 if (r) { 2494 if (r) {
@@ -2586,9 +2581,6 @@ int r600_init(struct radeon_device *rdev)
2586 radeon_surface_init(rdev); 2581 radeon_surface_init(rdev);
2587 /* Initialize clocks */ 2582 /* Initialize clocks */
2588 radeon_get_clock_info(rdev->ddev); 2583 radeon_get_clock_info(rdev->ddev);
2589 r = radeon_clocks_init(rdev);
2590 if (r)
2591 return r;
2592 /* Fence driver */ 2584 /* Fence driver */
2593 r = radeon_fence_driver_init(rdev); 2585 r = radeon_fence_driver_init(rdev);
2594 if (r) 2586 if (r)
@@ -2663,7 +2655,6 @@ void r600_fini(struct radeon_device *rdev)
2663 radeon_agp_fini(rdev); 2655 radeon_agp_fini(rdev);
2664 radeon_gem_fini(rdev); 2656 radeon_gem_fini(rdev);
2665 radeon_fence_driver_fini(rdev); 2657 radeon_fence_driver_fini(rdev);
2666 radeon_clocks_fini(rdev);
2667 radeon_bo_fini(rdev); 2658 radeon_bo_fini(rdev);
2668 radeon_atombios_fini(rdev); 2659 radeon_atombios_fini(rdev);
2669 kfree(rdev->bios); 2660 kfree(rdev->bios);
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index e90d9e3765b4..a168d644bf9e 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1339,8 +1339,6 @@ extern bool radeon_card_posted(struct radeon_device *rdev);
1339extern void radeon_update_bandwidth_info(struct radeon_device *rdev); 1339extern void radeon_update_bandwidth_info(struct radeon_device *rdev);
1340extern void radeon_update_display_priority(struct radeon_device *rdev); 1340extern void radeon_update_display_priority(struct radeon_device *rdev);
1341extern bool radeon_boot_test_post_card(struct radeon_device *rdev); 1341extern bool radeon_boot_test_post_card(struct radeon_device *rdev);
1342extern int radeon_clocks_init(struct radeon_device *rdev);
1343extern void radeon_clocks_fini(struct radeon_device *rdev);
1344extern void radeon_scratch_init(struct radeon_device *rdev); 1342extern void radeon_scratch_init(struct radeon_device *rdev);
1345extern void radeon_surface_init(struct radeon_device *rdev); 1343extern void radeon_surface_init(struct radeon_device *rdev);
1346extern int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data); 1344extern int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data);
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index a21bf88e8c2d..25e1dd197791 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -858,21 +858,3 @@ int radeon_asic_init(struct radeon_device *rdev)
858 return 0; 858 return 0;
859} 859}
860 860
861/*
862 * Wrapper around modesetting bits. Move to radeon_clocks.c?
863 */
864int radeon_clocks_init(struct radeon_device *rdev)
865{
866 int r;
867
868 r = radeon_static_clocks_init(rdev->ddev);
869 if (r) {
870 return r;
871 }
872 DRM_INFO("Clocks initialized !\n");
873 return 0;
874}
875
876void radeon_clocks_fini(struct radeon_device *rdev)
877{
878}
diff --git a/drivers/gpu/drm/radeon/radeon_clocks.c b/drivers/gpu/drm/radeon/radeon_clocks.c
index 690d8907135a..5249af8931e6 100644
--- a/drivers/gpu/drm/radeon/radeon_clocks.c
+++ b/drivers/gpu/drm/radeon/radeon_clocks.c
@@ -905,53 +905,3 @@ void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable)
905 } 905 }
906} 906}
907 907
908static void radeon_apply_clock_quirks(struct radeon_device *rdev)
909{
910 uint32_t tmp;
911
912 /* XXX make sure engine is idle */
913
914 if (rdev->family < CHIP_RS600) {
915 tmp = RREG32_PLL(RADEON_SCLK_CNTL);
916 if (ASIC_IS_R300(rdev) || ASIC_IS_RV100(rdev))
917 tmp |= RADEON_SCLK_FORCE_CP | RADEON_SCLK_FORCE_VIP;
918 if ((rdev->family == CHIP_RV250)
919 || (rdev->family == CHIP_RV280))
920 tmp |=
921 RADEON_SCLK_FORCE_DISP1 | RADEON_SCLK_FORCE_DISP2;
922 if ((rdev->family == CHIP_RV350)
923 || (rdev->family == CHIP_RV380))
924 tmp |= R300_SCLK_FORCE_VAP;
925 if (rdev->family == CHIP_R420)
926 tmp |= R300_SCLK_FORCE_PX | R300_SCLK_FORCE_TX;
927 WREG32_PLL(RADEON_SCLK_CNTL, tmp);
928 } else if (rdev->family < CHIP_R600) {
929 tmp = RREG32_PLL(AVIVO_CP_DYN_CNTL);
930 tmp |= AVIVO_CP_FORCEON;
931 WREG32_PLL(AVIVO_CP_DYN_CNTL, tmp);
932
933 tmp = RREG32_PLL(AVIVO_E2_DYN_CNTL);
934 tmp |= AVIVO_E2_FORCEON;
935 WREG32_PLL(AVIVO_E2_DYN_CNTL, tmp);
936
937 tmp = RREG32_PLL(AVIVO_IDCT_DYN_CNTL);
938 tmp |= AVIVO_IDCT_FORCEON;
939 WREG32_PLL(AVIVO_IDCT_DYN_CNTL, tmp);
940 }
941}
942
943int radeon_static_clocks_init(struct drm_device *dev)
944{
945 struct radeon_device *rdev = dev->dev_private;
946
947 /* XXX make sure engine is idle */
948
949 if (radeon_dynclks != -1) {
950 if (radeon_dynclks) {
951 if (rdev->asic->set_clock_gating)
952 radeon_set_clock_gating(rdev, 1);
953 }
954 }
955 radeon_apply_clock_quirks(rdev);
956 return 0;
957}
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 8f93e2b4b0c8..efbe975312dc 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -600,7 +600,6 @@ extern bool radeon_get_atom_connector_info_from_supported_devices_table(struct d
600void radeon_enc_destroy(struct drm_encoder *encoder); 600void radeon_enc_destroy(struct drm_encoder *encoder);
601void radeon_copy_fb(struct drm_device *dev, struct drm_gem_object *dst_obj); 601void radeon_copy_fb(struct drm_device *dev, struct drm_gem_object *dst_obj);
602void radeon_combios_asic_init(struct drm_device *dev); 602void radeon_combios_asic_init(struct drm_device *dev);
603extern int radeon_static_clocks_init(struct drm_device *dev);
604bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc, 603bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
605 struct drm_display_mode *mode, 604 struct drm_display_mode *mode,
606 struct drm_display_mode *adjusted_mode); 605 struct drm_display_mode *adjusted_mode);
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index a84e38643788..bfa59db374d2 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -1074,11 +1074,6 @@ int rv770_resume(struct radeon_device *rdev)
1074 */ 1074 */
1075 /* post card */ 1075 /* post card */
1076 atom_asic_init(rdev->mode_info.atom_context); 1076 atom_asic_init(rdev->mode_info.atom_context);
1077 /* Initialize clocks */
1078 r = radeon_clocks_init(rdev);
1079 if (r) {
1080 return r;
1081 }
1082 1077
1083 r = rv770_startup(rdev); 1078 r = rv770_startup(rdev);
1084 if (r) { 1079 if (r) {
@@ -1169,9 +1164,6 @@ int rv770_init(struct radeon_device *rdev)
1169 radeon_surface_init(rdev); 1164 radeon_surface_init(rdev);
1170 /* Initialize clocks */ 1165 /* Initialize clocks */
1171 radeon_get_clock_info(rdev->ddev); 1166 radeon_get_clock_info(rdev->ddev);
1172 r = radeon_clocks_init(rdev);
1173 if (r)
1174 return r;
1175 /* Fence driver */ 1167 /* Fence driver */
1176 r = radeon_fence_driver_init(rdev); 1168 r = radeon_fence_driver_init(rdev);
1177 if (r) 1169 if (r)
@@ -1249,7 +1241,6 @@ void rv770_fini(struct radeon_device *rdev)
1249 rv770_vram_scratch_fini(rdev); 1241 rv770_vram_scratch_fini(rdev);
1250 radeon_gem_fini(rdev); 1242 radeon_gem_fini(rdev);
1251 radeon_fence_driver_fini(rdev); 1243 radeon_fence_driver_fini(rdev);
1252 radeon_clocks_fini(rdev);
1253 radeon_agp_fini(rdev); 1244 radeon_agp_fini(rdev);
1254 radeon_bo_fini(rdev); 1245 radeon_bo_fini(rdev);
1255 radeon_atombios_fini(rdev); 1246 radeon_atombios_fini(rdev);