diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-12-09 19:31:44 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-10 00:19:16 -0500 |
commit | 779720a3209849be202ac36a811e934865c50971 (patch) | |
tree | 8970fc5257045e0e865509922120cb24a56024e5 /drivers/gpu/drm/radeon/r600.c | |
parent | 7cb7d1d7b650c9764c8a1b00e2b43d932acde779 (diff) |
drm/radeon/kms/r600/r700: fallback gracefully on ucode failure
Sent the wrong patch earlier.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 24 |
1 files changed, 12 insertions, 12 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 | } |