drm: restore crtc origin if mode_set_base fails

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Ilija Hadzic 2013-10-29 11:09:43 -04:00 committed by Dave Airlie
parent bec2eac3a4
commit fbce40641b

View 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;
}