diff mbox

[3/6] drm: restore crtc origin if mode_set_base fails

Message ID 1383059386-20917-4-git-send-email-ihadzic@research.bell-labs.com (mailing list archive)
State Accepted
Headers show

Commit Message

Ilija Hadzic Oct. 29, 2013, 3:09 p.m. UTC
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
---
 drivers/gpu/drm/drm_crtc_helper.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index b06a6c4..65f3658 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -814,6 +814,8 @@  int drm_crtc_helper_set_config(struct drm_mode_set *set)
 		ret = crtc_funcs->mode_set_base(set->crtc,
 						set->x, set->y, save_set.fb);
 		if (ret != 0) {
+			set->crtc->x = save_set.x;
+			set->crtc->y = save_set.y;
 			set->crtc->fb = save_set.fb;
 			goto fail;
 		}