aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/rv770.c
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2009-09-16 09:24:21 -0400
committerDave Airlie <airlied@redhat.com>2009-09-18 02:01:57 -0400
commit733289c2656c556d5cf36eafa1c8ec77222c359f (patch)
treebb4df1305a867baf63fba27620d6f8c0f68db1a4 /drivers/gpu/drm/radeon/rv770.c
parent7cbb355e947b3b426cefd9a3dc0dda3af9f9345a (diff)
drm/radeon/kms: don't fail if we fail to init GPU acceleration
Userspace can query if acceleration is working or not true get info ioctl and could fallback to software if for some reason kernel failed to initialize KMS. This should allow to give a working KMS setup in all case (even with non functionning accel). Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rv770.c')
-rw-r--r--drivers/gpu/drm/radeon/rv770.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 4f2098bc7974..be2f86539ebc 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -953,6 +953,7 @@ int rv770_init(struct radeon_device *rdev)
953 if (r) 953 if (r)
954 return r; 954 return r;
955 955
956 rdev->accel_working = true;
956 r = rv770_resume(rdev); 957 r = rv770_resume(rdev);
957 if (r) { 958 if (r) {
958 if (rdev->flags & RADEON_IS_AGP) { 959 if (rdev->flags & RADEON_IS_AGP) {
@@ -961,22 +962,24 @@ int rv770_init(struct radeon_device *rdev)
961 rdev->flags &= ~RADEON_IS_AGP; 962 rdev->flags &= ~RADEON_IS_AGP;
962 return rv770_init(rdev); 963 return rv770_init(rdev);
963 } 964 }
964 return r; 965 rdev->accel_working = false;
965 }
966 r = r600_blit_init(rdev);
967 if (r) {
968 DRM_ERROR("radeon: failled blitter (%d).\n", r);
969 return r;
970 } 966 }
971 r = radeon_ib_pool_init(rdev); 967 if (rdev->accel_working) {
972 if (r) { 968 r = r600_blit_init(rdev);
973 DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r); 969 if (r) {
974 return r; 970 DRM_ERROR("radeon: failled blitter (%d).\n", r);
975 } 971 rdev->accel_working = false;
976 r = radeon_ib_test(rdev); 972 }
977 if (r) { 973 r = radeon_ib_pool_init(rdev);
978 DRM_ERROR("radeon: failled testing IB (%d).\n", r); 974 if (r) {
979 return r; 975 DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r);
976 rdev->accel_working = false;
977 }
978 r = radeon_ib_test(rdev);
979 if (r) {
980 DRM_ERROR("radeon: failled testing IB (%d).\n", r);
981 rdev->accel_working = false;
982 }
980 } 983 }
981 return 0; 984 return 0;
982} 985}