aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600.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/r600.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/r600.c')
-rw-r--r--drivers/gpu/drm/radeon/r600.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 65699e9f2025..af430d719e7f 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1573,6 +1573,7 @@ int r600_init(struct radeon_device *rdev)
1573 if (r) 1573 if (r)
1574 return r; 1574 return r;
1575 1575
1576 rdev->accel_working = true;
1576 r = r600_resume(rdev); 1577 r = r600_resume(rdev);
1577 if (r) { 1578 if (r) {
1578 if (rdev->flags & RADEON_IS_AGP) { 1579 if (rdev->flags & RADEON_IS_AGP) {
@@ -1581,22 +1582,24 @@ int r600_init(struct radeon_device *rdev)
1581 rdev->flags &= ~RADEON_IS_AGP; 1582 rdev->flags &= ~RADEON_IS_AGP;
1582 return r600_init(rdev); 1583 return r600_init(rdev);
1583 } 1584 }
1584 return r; 1585 rdev->accel_working = false;
1585 }
1586 r = radeon_ib_pool_init(rdev);
1587 if (r) {
1588 DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r);
1589 return r;
1590 } 1586 }
1591 r = r600_blit_init(rdev); 1587 if (rdev->accel_working) {
1592 if (r) { 1588 r = radeon_ib_pool_init(rdev);
1593 DRM_ERROR("radeon: failled blitter (%d).\n", r); 1589 if (r) {
1594 return r; 1590 DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r);
1595 } 1591 rdev->accel_working = false;
1596 r = radeon_ib_test(rdev); 1592 }
1597 if (r) { 1593 r = r600_blit_init(rdev);
1598 DRM_ERROR("radeon: failled testing IB (%d).\n", r); 1594 if (r) {
1599 return r; 1595 DRM_ERROR("radeon: failled blitter (%d).\n", r);
1596 rdev->accel_working = false;
1597 }
1598 r = radeon_ib_test(rdev);
1599 if (r) {
1600 DRM_ERROR("radeon: failled testing IB (%d).\n", r);
1601 rdev->accel_working = false;
1602 }
1600 } 1603 }
1601 return 0; 1604 return 0;
1602} 1605}