diff options
author | Jerome Glisse <jglisse@redhat.com> | 2009-09-16 15:24:21 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-09-18 16:01:57 +1000 |
commit | 733289c2656c556d5cf36eafa1c8ec77222c359f (patch) | |
tree | bb4df1305a867baf63fba27620d6f8c0f68db1a4 /drivers/gpu/drm/radeon/rv770.c | |
parent | 7cbb355e947b3b426cefd9a3dc0dda3af9f9345a (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.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 4f2098bc797..be2f86539eb 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) if (r) return r; + rdev->accel_working = true; r = rv770_resume(rdev); if (r) { if (rdev->flags & RADEON_IS_AGP) { @@ -961,22 +962,24 @@ int rv770_init(struct radeon_device *rdev) rdev->flags &= ~RADEON_IS_AGP; return rv770_init(rdev); } - return r; - } - r = r600_blit_init(rdev); - if (r) { - DRM_ERROR("radeon: failled blitter (%d).\n", r); - return r; + rdev->accel_working = false; } - r = radeon_ib_pool_init(rdev); - if (r) { - DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r); - return r; - } - r = radeon_ib_test(rdev); - if (r) { - DRM_ERROR("radeon: failled testing IB (%d).\n", r); - return r; + if (rdev->accel_working) { + r = r600_blit_init(rdev); + if (r) { + DRM_ERROR("radeon: failled blitter (%d).\n", r); + rdev->accel_working = false; + } + r = radeon_ib_pool_init(rdev); + if (r) { + DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r); + rdev->accel_working = false; + } + r = radeon_ib_test(rdev); + if (r) { + DRM_ERROR("radeon: failled testing IB (%d).\n", r); + rdev->accel_working = false; + } } return 0; } |