summaryrefslogtreecommitdiff
path: root/linux-core/drm_crtc.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@localhost.(none)>2008-03-04 17:51:56 +0000
committerAlan Hourihane <alanh@localhost.(none)>2008-03-05 10:35:46 +0000
commit3ea1902be993e88c068ce67355e2b3d253d1c9f2 (patch)
treea7c3054817e7ca347b9274de6b54843b324ac019 /linux-core/drm_crtc.c
parent5662934ee467c3a29f9551a40fc7b2f6ee16280a (diff)
propogate failed fixups back up
Diffstat (limited to 'linux-core/drm_crtc.c')
-rw-r--r--linux-core/drm_crtc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index 345569b6..5f93275a 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -458,12 +458,12 @@ bool drm_crtc_set_mode(struct drm_crtc *crtc, struct drm_display_mode *mode,
if (output->crtc != crtc)
continue;
- if (!output->funcs->mode_fixup(output, mode, adjusted_mode)) {
+ if (!(ret = output->funcs->mode_fixup(output, mode, adjusted_mode))) {
goto done;
}
}
- if (!crtc->funcs->mode_fixup(crtc, mode, adjusted_mode)) {
+ if (!(ret = crtc->funcs->mode_fixup(crtc, mode, adjusted_mode))) {
goto done;
}
@@ -517,10 +517,16 @@ bool drm_crtc_set_mode(struct drm_crtc *crtc, struct drm_display_mode *mode,
// drm_crtc_set_screen_sub_pixel_order(dev);
done:
+ if (!ret) {
+ crtc->mode = saved_mode;
+ crtc->x = saved_x;
+ crtc->y = saved_y;
+ }
+
if (didLock)
crtc->funcs->unlock (crtc);
- return true;
+ return ret;
}
EXPORT_SYMBOL(drm_crtc_set_mode);