drm/doc: document fallback behaviour for atomic events
Subsystems (2)
PATCH 1/1 drm/doc: document fallback behaviour for atomic events
Worst case if the hw can't support completion signalling in a race-free way we want the event to be too late, not too early.
Text adapted from a proposal from Laurent - the other side of how to make hw work correctly where it's possible is imo already sufficiently documented.
--- include/drm/drm_crtc.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/drm/drm_crtc.h +7 -0
@@ -204,6 +204,13 @@ struct drm_crtc_state {* drm_crtc_arm_vblank_event(). See the documentation of that function * for a detailed discussion of the constraints it needs to be used * safely. +* +* If the device can't notify of flip completion in a race-free way in +* at all, then the event should be armed just after the page flip is +* committed. In the worst case the driver will send the event to +* userspace one frame too late. This doesn't allow for a real atomic +* update, but it should avoid tearing. The R-Car Gen2 hardware falls +* in this category. */ struct drm_pending_vblank_event *event;
Signature · 6 lines
2.11.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Daniel,
Thank you for the patch.
Quoted 18 lines · On Tuesday 07 Mar 2017 01:36:53 Daniel Vetter wrote:
Worst case if the hw can't support completion signalling in a race-free way we want the event to be too late, not too early.
Text adapted from a proposal from Laurent - the other side of how to make hw work correctly where it's possible is imo already sufficiently documented.
Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- include/drm/drm_crtc.h | 7 +++++++ 1 file changed, 7 insertions(+)include/drm/drm_crtc.h +0
-0
include/drm/drm_crtc.h struct drm_crtc_state { · line 208
Quoted 5 lines
include/drm/drm_crtc.h +2
-0@@ -204,6 +204,13 @@ struct drm_crtc_state {* drm_crtc_arm_vblank_event(). See the documentation of that function * for a detailed discussion of the constraints it needs to be used * safely. +* +* If the device can't notify of flip completion in a race-free way in
s/ in$//
include/drm/drm_crtc.h struct drm_crtc_state { · line 213
Quoted 5 lines
include/drm/drm_crtc.h +5
-0+* at all, then the event should be armed just after the page flip is +* committed. In the worst case the driver will send the event to +* userspace one frame too late. This doesn't allow for a real atomic +* update, but it should avoid tearing. The R-Car Gen2 hardware falls +* in this category.
I'm not sure would special-case R-Car Gen2 here :-)
Quoted 2 lines
include/drm/drm_crtc.h +0
-0*/ struct drm_pending_vblank_event *event;
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel