diff options
author | Dave Airlie <airlied@redhat.com> | 2016-07-02 15:56:01 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-07-02 15:56:01 +1000 |
commit | 542d972221e024681b502033154f917c1455469f (patch) | |
tree | 1c7c1be768f6e1b496a3edad6b105804a8d05c57 /drivers/gpu/drm/vc4/vc4_kms.c | |
parent | 583fa4e02775b26d76771d4e1ddc6f10ba005ef2 (diff) | |
parent | 4c2e07c6a29e0129e975727b9f57eede813eea85 (diff) |
Back-merge tag 'v4.7-rc5' into drm-next
Linux 4.7-rc5
The fsl-dcu pull needs -rc3 so go to -rc5 for now.
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_kms.c')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_kms.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index 8f4d5ffc32be..9a217fd025f3 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -119,10 +119,18 @@ static int vc4_atomic_commit(struct drm_device *dev, return -ENOMEM; /* Make sure that any outstanding modesets have finished. */ - ret = down_interruptible(&vc4->async_modeset); - if (ret) { - kfree(c); - return ret; + if (nonblock) { + ret = down_trylock(&vc4->async_modeset); + if (ret) { + kfree(c); + return -EBUSY; + } + } else { + ret = down_interruptible(&vc4->async_modeset); + if (ret) { + kfree(c); + return ret; + } } ret = drm_atomic_helper_prepare_planes(dev, state); |