Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03f9abb2 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie
Browse files

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: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent ec403b89
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -345,7 +345,11 @@ static bool restore_fbdev_mode(struct drm_fb_helper *fb_helper)
		struct drm_crtc *crtc = mode_set->crtc;
		struct drm_crtc *crtc = mode_set->crtc;
		int ret;
		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);
			ret = crtc->funcs->cursor_set(crtc, NULL, 0, 0, 0);
			if (ret)
			if (ret)
				error = true;
				error = true;