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/r600.c | |
parent | 7cbb355e947b3b426cefd9a3dc0dda3af9f9345a (diff) | |
download | lwn-733289c2656c556d5cf36eafa1c8ec77222c359f.tar.gz lwn-733289c2656c556d5cf36eafa1c8ec77222c359f.zip |
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.c | 33 |
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) if (r) return r; + rdev->accel_working = true; r = r600_resume(rdev); if (r) { if (rdev->flags & RADEON_IS_AGP) { @@ -1581,22 +1582,24 @@ int r600_init(struct radeon_device *rdev) rdev->flags &= ~RADEON_IS_AGP; return r600_init(rdev); } - return r; - } - r = radeon_ib_pool_init(rdev); - if (r) { - DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r); - return r; + rdev->accel_working = false; } - r = r600_blit_init(rdev); - if (r) { - DRM_ERROR("radeon: failled blitter (%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 = radeon_ib_pool_init(rdev); + if (r) { + DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r); + rdev->accel_working = false; + } + r = r600_blit_init(rdev); + if (r) { + DRM_ERROR("radeon: failled blitter (%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; } |