diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2015-09-30 14:47:37 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-10-02 15:30:41 +1000 |
commit | 03f9abb28c3e10a1d0e08df8bca69e0606b23ea6 (patch) | |
tree | 9a4c60a30b1d58e55c74e53fad29dd01decaaddd /drivers/gpu | |
parent | ec403b89e3152f93199b7b1813148bcdf6829311 (diff) | |
download | linux-03f9abb28c3e10a1d0e08df8bca69e0606b23ea6.tar.gz linux-03f9abb28c3e10a1d0e08df8bca69e0606b23ea6.tar.bz2 linux-03f9abb28c3e10a1d0e08df8bca69e0606b23ea6.zip |
drm: handle cursor_set2 in restore_fbdev_mode
If a driver uses the cursor_set2 crtc callback rather than
cursor_set, use that. This fixes the fbdev helper for drivers
that use cursor_set2.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 418d299f3b12..ca08c472311b 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -345,7 +345,11 @@ static bool restore_fbdev_mode(struct drm_fb_helper *fb_helper) struct drm_crtc *crtc = mode_set->crtc; int ret; - if (crtc->funcs->cursor_set) { + if (crtc->funcs->cursor_set2) { + ret = crtc->funcs->cursor_set2(crtc, NULL, 0, 0, 0, 0, 0); + if (ret) + error = true; + } else if (crtc->funcs->cursor_set) { ret = crtc->funcs->cursor_set(crtc, NULL, 0, 0, 0); if (ret) error = true; |