drm: restore crtc origin if mode_set_base fails
authorIlija Hadzic <ihadzic@research.bell-labs.com>
Tue, 29 Oct 2013 15:09:43 +0000 (11:09 -0400)
committerDave Airlie <airlied@redhat.com>
Wed, 6 Nov 2013 04:27:50 +0000 (14:27 +1000)
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc_helper.c

index 11040a5..acc9c36 100644 (file)
@@ -822,6 +822,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;
                }