summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-09-03 13:33:50 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-09-03 13:33:50 +0000
commit04cde20e05bb73f54f241b8fe14f5256c20aacd8 (patch)
tree7db1ced5e1e5f9cdf1e1914ad0ba710e11335328 /sys/dev
parent76835b9153a0d5d370b1d2f20f80d6306aa7461c (diff)
drm/atomic: If the atomic check fails, return its value first
From Maarten Lankhorst 3416ee45a8cbeb5bc4b13a754873fbb26a27dccb in linux-4.4.y/4.4.85 a0ffc51e20e90e0c1c2491de2b4b03f48b6caaba in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/drm_atomic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drm_atomic.c b/sys/dev/pci/drm/drm_atomic.c
index 6a8e42ff364..3241672ece0 100644
--- a/sys/dev/pci/drm/drm_atomic.c
+++ b/sys/dev/pci/drm/drm_atomic.c
@@ -1247,6 +1247,9 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
if (config->funcs->atomic_check)
ret = config->funcs->atomic_check(state->dev, state);
+ if (ret)
+ return ret;
+
if (!state->allow_modeset) {
for_each_crtc_in_state(state, crtc, crtc_state, i) {
if (drm_atomic_crtc_needs_modeset(crtc_state)) {
@@ -1257,7 +1260,7 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
}
}
- return ret;
+ return 0;
}
EXPORT_SYMBOL(drm_atomic_check_only);