Commit 5222454c authored by Dave Airlie's avatar Dave Airlie

drm/radeon: don't allow device to be opened if powered down

If the switcheroo has switched the device off, don't let X open it.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 1ce1e41c
......@@ -203,6 +203,10 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
*/
int radeon_driver_firstopen_kms(struct drm_device *dev)
{
struct radeon_device *rdev = dev->dev_private;
if (rdev->powered_down)
return -EINVAL;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment