diff options
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 8de333aeeca3..952b3d4fb2a6 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -661,6 +661,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) | |||
661 | old_fb)) { | 661 | old_fb)) { |
662 | DRM_ERROR("failed to set mode on [CRTC:%d]\n", | 662 | DRM_ERROR("failed to set mode on [CRTC:%d]\n", |
663 | set->crtc->base.id); | 663 | set->crtc->base.id); |
664 | set->crtc->fb = old_fb; | ||
664 | ret = -EINVAL; | 665 | ret = -EINVAL; |
665 | goto fail; | 666 | goto fail; |
666 | } | 667 | } |
@@ -675,8 +676,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) | |||
675 | set->crtc->fb = set->fb; | 676 | set->crtc->fb = set->fb; |
676 | ret = crtc_funcs->mode_set_base(set->crtc, | 677 | ret = crtc_funcs->mode_set_base(set->crtc, |
677 | set->x, set->y, old_fb); | 678 | set->x, set->y, old_fb); |
678 | if (ret != 0) | 679 | if (ret != 0) { |
680 | set->crtc->fb = old_fb; | ||
679 | goto fail; | 681 | goto fail; |
682 | } | ||
680 | } | 683 | } |
681 | DRM_DEBUG_KMS("Setting connector DPMS state to on\n"); | 684 | DRM_DEBUG_KMS("Setting connector DPMS state to on\n"); |
682 | for (i = 0; i < set->num_connectors; i++) { | 685 | for (i = 0; i < set->num_connectors; i++) { |