drm/vc4: Return -EBUSY if there's already a pending flip event.
Subsystems (3)
PATCH v2 1/1 drm/vc4: Return -EBUSY if there's already a pending flip event.
From: Robert Foss <[email protected]>
As per the documentation in drm_crtc.h, atomic_commit should return -EBUSY if an asycnhronous update is requested and there is an earlier update pending.
Note: docs cited here are drm_crtc.h, and the whole quote is:
* - -EBUSY, if an asynchronous updated is requested and there is
* an earlier updated pending. Drivers are allowed to support a queue
* of outstanding updates, but currently no driver supports that.
* Note that drivers must wait for preceding updates to complete if a
* synchronous update is requested, they are not allowed to fail the
* commit in that case.
---
Changes since v1:
- Corrected and simplified patch to piggyback on a previously existing check.
drivers/gpu/drm/vc4/vc4_kms.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/gpu/drm/vc4/vc4_kms.c +12 -4
@@ -117,10 +117,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 (async) { + 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);
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · [email protected] writes:
From: Robert Foss <[email protected]>
As per the documentation in
drm_crtc.h,atomic_commitshould return-EBUSYif an asycnhronous update is requested and there is an earlier update pending.Note: docs cited here are
drm_crtc.h, and the whole quote is:
Quoted 8 lines
* -
-EBUSY, if an asynchronous updated is requested and there is
* an earlier updated pending. Drivers are allowed to support a queue
* of outstanding updates, but currently no driver supports that.
* Note that drivers must wait for preceding updates to complete if a
* synchronous update is requested, they are not allowed to fail the
* commit in that case.Signed-off-by Robert Foss <[email protected]>
This looks good to me. Let's give it a few days on the list for any other KMS folks to catch anything.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 17 lines · Eric Anholt
Quoted 15 lines · [email protected] writes:
From: Robert Foss <[email protected]>
As per the documentation in
drm_crtc.h,atomic_commitshould return-EBUSYif an asycnhronous update is requested and there is an earlier update pending.Note: docs cited here are
drm_crtc.h, and the whole quote is:* -
-EBUSY, if an asynchronous updated is requested and there is
* an earlier updated pending. Drivers are allowed to support a queue
* of outstanding updates, but currently no driver supports that.
* Note that drivers must wait for preceding updates to complete if a
* synchronous update is requested, they are not allowed to fail the
* commit in that case.
Quoted 5 lines
Quoted 1 line
Signed-off-by Robert Foss <[email protected]>This looks good to me. Let's give it a few days on the list for any other KMS folks to catch anything.
I haven't seen any further feedback regarding this patch. Does anyone have objections to it being merged?
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 18 lines · Robert Foss
Quoted 17 lines · Eric Anholt
Quoted 15 lines · [email protected] writes:
From: Robert Foss <[email protected]>
As per the documentation in
drm_crtc.h,atomic_commitshould return-EBUSYif an asycnhronous update is requested and there is an earlier update pending.Note: docs cited here are
drm_crtc.h, and the whole quote is:* -
-EBUSY, if an asynchronous updated is requested and there is
* an earlier updated pending. Drivers are allowed to support a queue
* of outstanding updates, but currently no driver supports that.
* Note that drivers must wait for preceding updates to complete if a
* synchronous update is requested, they are not allowed to fail the
* commit in that case.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Robert Foss <[email protected]>This looks good to me. Let's give it a few days on the list for any other KMS folks to catch anything.
I haven't seen any further feedback regarding this patch. Does anyone have objections to it being merged?
I merged it to drm-vc4-next last night, actually :)
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thanks Eric!
Quoted 22 lines · Eric Anholt
Quoted 20 lines · Robert Foss
Quoted 19 lines · Eric Anholt
Quoted 16 lines · [email protected] writes:
From: Robert Foss <[email protected]>
As per the documentation in
drm_crtc.h,atomic_commitshould return-EBUSYif an asycnhronous update is requested and there is an earlier update pending.Note: docs cited here are
drm_crtc.h, and the whole quote is:* -
-EBUSY, if an asynchronous updated is requested and there is
* an earlier updated pending. Drivers are allowed to support a queue
* of outstanding updates, but currently no driver supports that.
* Note that drivers must wait for preceding updates to complete if a
* synchronous update is requested, they are not allowed to fail the
* commit in that case.Signed-off-by Robert Foss <[email protected]>
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
This looks good to me. Let's give it a few days on the list for any other KMS folks to catch anything.
I haven't seen any further feedback regarding this patch. Does anyone have objections to it being merged?
I merged it to drm-vc4-next last night, actually :)
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel