diff options
author | Maarten Lankhorst <[email protected]> | 2017-07-11 16:33:12 +0200 |
---|---|---|
committer | Daniel Vetter <[email protected]> | 2017-07-26 13:22:43 +0200 |
commit | d68bc0e75a7194a3d7e738705a7d54e66a06d75f (patch) | |
tree | 61add19a79f330c01d1d9e691066c663c82b07a2 | |
parent | fad9e43a331c46d5e011c415117ee7b949454a86 (diff) |
drm/vc4: Handle drm_atomic_helper_swap_state failure
drm_atomic_helper_swap_state() will be changed to interruptible waiting
in the next few commits, so all drivers have to be changed to handling
failure.
VC4 has its own nonblocking modeset tracking through the vc4->async_modeset
semaphore, so it doesn't need to stall in swap_state. Pass stall = false
and BUG_ON when it returns an error. This should never happen for !stall.
Signed-off-by: Maarten Lankhorst <[email protected]>
Cc: Eric Anholt <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Daniel Vetter <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_kms.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index 27edae427025..aeec6e8703d2 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -126,7 +126,7 @@ static int vc4_atomic_commit(struct drm_device *dev, * the software side now. */ - drm_atomic_helper_swap_state(state, true); + BUG_ON(drm_atomic_helper_swap_state(state, false) < 0); /* * Everything below can be run asynchronously without the need to grab |