diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-10-02 22:52:58 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-10-05 15:44:18 +0200 |
commit | 8c70e1cda04b966b50ddfefafbd0ea376ed8edd5 (patch) | |
tree | 0195f9f7dac3b76941432feb2b857a5f9e32e715 /drivers/gpu/drm/radeon/radeon_fb.c | |
parent | drm/radeon: add quirk for ASUS R7 370 (diff) | |
download | linux-8c70e1cda04b966b50ddfefafbd0ea376ed8edd5.tar.xz linux-8c70e1cda04b966b50ddfefafbd0ea376ed8edd5.zip |
drm/radeon: restore the fbdev mode in lastclose
restore the fbdev state if a drm app like X is killed.
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_fb.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_fb.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c index 1aa657fe31cb..26da2f4d7b4f 100644 --- a/drivers/gpu/drm/radeon/radeon_fb.c +++ b/drivers/gpu/drm/radeon/radeon_fb.c @@ -397,3 +397,19 @@ void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector { drm_fb_helper_remove_one_connector(&rdev->mode_info.rfbdev->helper, connector); } + +void radeon_fbdev_restore_mode(struct radeon_device *rdev) +{ + struct radeon_fbdev *rfbdev = rdev->mode_info.rfbdev; + struct drm_fb_helper *fb_helper; + int ret; + + if (!rfbdev) + return; + + fb_helper = &rfbdev->helper; + + ret = drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper); + if (ret) + DRM_DEBUG("failed to restore crtc mode\n"); +} |