diff options
author | Jerome Glisse <jglisse@redhat.com> | 2012-02-20 17:57:20 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-02-22 05:30:02 -0500 |
commit | 6b7746e8768e1c550b320d5af761f73e5aa37f76 (patch) | |
tree | ad04aeca4bbc904418d21717f17689f1c0aa5bf7 /drivers/gpu/drm/radeon/ni.c | |
parent | f0d14daa6906070ca044b86f483fdde7d81f5294 (diff) |
drm/radeon/kms: properly set accel working flag and bailout when false
If accel is not working many subsystem such as the ib pool might not be
initialized properly that can lead to segfault inside kernel when cs
ioctl is call with non working acceleration. To avoid this make sure
the accel working flag is false when an error in GPU startup happen and
return EBUSY from cs ioctl if accel is not working.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/ni.c')
-rw-r--r-- | drivers/gpu/drm/radeon/ni.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index db09065e68fd..2509c505acb8 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -1547,6 +1547,7 @@ int cayman_resume(struct radeon_device *rdev) | |||
1547 | r = cayman_startup(rdev); | 1547 | r = cayman_startup(rdev); |
1548 | if (r) { | 1548 | if (r) { |
1549 | DRM_ERROR("cayman startup failed on resume\n"); | 1549 | DRM_ERROR("cayman startup failed on resume\n"); |
1550 | rdev->accel_working = false; | ||
1550 | return r; | 1551 | return r; |
1551 | } | 1552 | } |
1552 | return r; | 1553 | return r; |