aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r--drivers/gpu/drm/radeon/r600.c24
-rw-r--r--drivers/gpu/drm/radeon/rv770.c26
2 files changed, 25 insertions, 25 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 250ec3fe1a16..f5cf874dc62a 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1845,6 +1845,14 @@ int r600_startup(struct radeon_device *rdev)
1845{ 1845{
1846 int r; 1846 int r;
1847 1847
1848 if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) {
1849 r = r600_init_microcode(rdev);
1850 if (r) {
1851 DRM_ERROR("Failed to load firmware!\n");
1852 return r;
1853 }
1854 }
1855
1848 r600_mc_program(rdev); 1856 r600_mc_program(rdev);
1849 if (rdev->flags & RADEON_IS_AGP) { 1857 if (rdev->flags & RADEON_IS_AGP) {
1850 r600_agp_enable(rdev); 1858 r600_agp_enable(rdev);
@@ -2026,25 +2034,17 @@ int r600_init(struct radeon_device *rdev)
2026 rdev->ih.ring_obj = NULL; 2034 rdev->ih.ring_obj = NULL;
2027 r600_ih_ring_init(rdev, 64 * 1024); 2035 r600_ih_ring_init(rdev, 64 * 1024);
2028 2036
2029 if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) {
2030 r = r600_init_microcode(rdev);
2031 if (r) {
2032 DRM_ERROR("Failed to load firmware!\n");
2033 return r;
2034 }
2035 }
2036
2037 r = r600_pcie_gart_init(rdev); 2037 r = r600_pcie_gart_init(rdev);
2038 if (r) 2038 if (r)
2039 return r; 2039 return r;
2040 2040
2041 rdev->accel_working = true;
2042 r = r600_blit_init(rdev); 2041 r = r600_blit_init(rdev);
2043 if (r) { 2042 if (r) {
2044 DRM_ERROR("radeon: failled blitter (%d).\n", r); 2043 DRM_ERROR("radeon: failed blitter (%d).\n", r);
2045 return r; 2044 return r;
2046 } 2045 }
2047 2046
2047 rdev->accel_working = true;
2048 r = r600_startup(rdev); 2048 r = r600_startup(rdev);
2049 if (r) { 2049 if (r) {
2050 r600_suspend(rdev); 2050 r600_suspend(rdev);
@@ -2056,12 +2056,12 @@ int r600_init(struct radeon_device *rdev)
2056 if (rdev->accel_working) { 2056 if (rdev->accel_working) {
2057 r = radeon_ib_pool_init(rdev); 2057 r = radeon_ib_pool_init(rdev);
2058 if (r) { 2058 if (r) {
2059 DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r); 2059 DRM_ERROR("radeon: failed initializing IB pool (%d).\n", r);
2060 rdev->accel_working = false; 2060 rdev->accel_working = false;
2061 } 2061 }
2062 r = r600_ib_test(rdev); 2062 r = r600_ib_test(rdev);
2063 if (r) { 2063 if (r) {
2064 DRM_ERROR("radeon: failled testing IB (%d).\n", r); 2064 DRM_ERROR("radeon: failed testing IB (%d).\n", r);
2065 rdev->accel_working = false; 2065 rdev->accel_working = false;
2066 } 2066 }
2067 } 2067 }
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index dd4f02096a80..2d124bb57762 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -874,6 +874,14 @@ static int rv770_startup(struct radeon_device *rdev)
874{ 874{
875 int r; 875 int r;
876 876
877 if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) {
878 r = r600_init_microcode(rdev);
879 if (r) {
880 DRM_ERROR("Failed to load firmware!\n");
881 return r;
882 }
883 }
884
877 rv770_mc_program(rdev); 885 rv770_mc_program(rdev);
878 if (rdev->flags & RADEON_IS_AGP) { 886 if (rdev->flags & RADEON_IS_AGP) {
879 rv770_agp_enable(rdev); 887 rv770_agp_enable(rdev);
@@ -1039,25 +1047,17 @@ int rv770_init(struct radeon_device *rdev)
1039 rdev->ih.ring_obj = NULL; 1047 rdev->ih.ring_obj = NULL;
1040 r600_ih_ring_init(rdev, 64 * 1024); 1048 r600_ih_ring_init(rdev, 64 * 1024);
1041 1049
1042 if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) {
1043 r = r600_init_microcode(rdev);
1044 if (r) {
1045 DRM_ERROR("Failed to load firmware!\n");
1046 return r;
1047 }
1048 }
1049
1050 r = r600_pcie_gart_init(rdev); 1050 r = r600_pcie_gart_init(rdev);
1051 if (r) 1051 if (r)
1052 return r; 1052 return r;
1053 1053
1054 rdev->accel_working = true;
1055 r = r600_blit_init(rdev); 1054 r = r600_blit_init(rdev);
1056 if (r) { 1055 if (r) {
1057 DRM_ERROR("radeon: failled blitter (%d).\n", r); 1056 DRM_ERROR("radeon: failed blitter (%d).\n", r);
1058 rdev->accel_working = false; 1057 return r;
1059 } 1058 }
1060 1059
1060 rdev->accel_working = true;
1061 r = rv770_startup(rdev); 1061 r = rv770_startup(rdev);
1062 if (r) { 1062 if (r) {
1063 rv770_suspend(rdev); 1063 rv770_suspend(rdev);
@@ -1069,12 +1069,12 @@ int rv770_init(struct radeon_device *rdev)
1069 if (rdev->accel_working) { 1069 if (rdev->accel_working) {
1070 r = radeon_ib_pool_init(rdev); 1070 r = radeon_ib_pool_init(rdev);
1071 if (r) { 1071 if (r) {
1072 DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r); 1072 DRM_ERROR("radeon: failed initializing IB pool (%d).\n", r);
1073 rdev->accel_working = false; 1073 rdev->accel_working = false;
1074 } 1074 }
1075 r = r600_ib_test(rdev); 1075 r = r600_ib_test(rdev);
1076 if (r) { 1076 if (r) {
1077 DRM_ERROR("radeon: failled testing IB (%d).\n", r); 1077 DRM_ERROR("radeon: failed testing IB (%d).\n", r);
1078 rdev->accel_working = false; 1078 rdev->accel_working = false;
1079 } 1079 }
1080 } 1080 }