Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alex Deucher and committed by
Dave Airlie
03f9abb2 ec403b89

+5 -1
+5 -1
drivers/gpu/drm/drm_fb_helper.c
··· 345 345 struct drm_crtc *crtc = mode_set->crtc; 346 346 int ret; 347 347 348 - if (crtc->funcs->cursor_set) { 348 + if (crtc->funcs->cursor_set2) { 349 + ret = crtc->funcs->cursor_set2(crtc, NULL, 0, 0, 0, 0, 0); 350 + if (ret) 351 + error = true; 352 + } else if (crtc->funcs->cursor_set) { 349 353 ret = crtc->funcs->cursor_set(crtc, NULL, 0, 0, 0); 350 354 if (ret) 351 355 error = true;