drm/radeon/kms: r600/r700 don't test ib if ib initialization fails

If ib initialization failed don't try to test ib as it will result
in an oops (accessing NULL ib buffer ptr).

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
Jerome Glisse 2010-01-17 21:21:56 +01:00 коммит произвёл Dave Airlie
Родитель 7e71c9e2e7
Коммит db96380ea2
2 изменённых файлов: 14 добавлений и 12 удалений

Просмотреть файл

@ -2064,15 +2064,16 @@ int r600_init(struct radeon_device *rdev)
if (rdev->accel_working) {
r = radeon_ib_pool_init(rdev);
if (r) {
DRM_ERROR("radeon: failed initializing IB pool (%d).\n", r);
dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
rdev->accel_working = false;
}
} else {
r = r600_ib_test(rdev);
if (r) {
DRM_ERROR("radeon: failed testing IB (%d).\n", r);
dev_err(rdev->dev, "IB test failed (%d).\n", r);
rdev->accel_working = false;
}
}
}
r = r600_audio_init(rdev);
if (r)

Просмотреть файл

@ -1075,15 +1075,16 @@ int rv770_init(struct radeon_device *rdev)
if (rdev->accel_working) {
r = radeon_ib_pool_init(rdev);
if (r) {
DRM_ERROR("radeon: failed initializing IB pool (%d).\n", r);
dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
rdev->accel_working = false;
}
} else {
r = r600_ib_test(rdev);
if (r) {
DRM_ERROR("radeon: failed testing IB (%d).\n", r);
dev_err(rdev->dev, "IB test failed (%d).\n", r);
rdev->accel_working = false;
}
}
}
return 0;
}