diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-08-08 16:23:03 +0900 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-10 14:27:51 -0400 |
commit | c229bfbbd04ac112bd15331d3a06d12e4e86a45c (patch) | |
tree | 8ef5a3166d786dfe6df0a08f4087817279532fba /include/drm/drm_crtc.h | |
parent | 88afb9e6cd3c3266abe9632dd99c60ca0581d8dc (diff) | |
download | linux-stable-c229bfbbd04ac112bd15331d3a06d12e4e86a45c.tar.gz linux-stable-c229bfbbd04ac112bd15331d3a06d12e4e86a45c.tar.bz2 linux-stable-c229bfbbd04ac112bd15331d3a06d12e4e86a45c.zip |
drm: Add page_flip_target CRTC hook v2
Mostly the same as the existing page_flip hook, but takes an additional
parameter specifying the target vertical blank period when the flip
should take effect.
v2:
* Add curly braces around else statement corresponding to an if block
with curly braces (Alex Deucher)
* Call drm_crtc_vblank_put in the error case (Daniel Vetter)
* Clarify entry point documentation comment (Daniel Vetter)
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r-- | include/drm/drm_crtc.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 44e070800b6d..3c90563e1a54 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -581,6 +581,24 @@ struct drm_crtc_funcs { uint32_t flags); /** + * @page_flip_target: + * + * Same as @page_flip but with an additional parameter specifying the + * absolute target vertical blank period (as reported by + * drm_crtc_vblank_count()) when the flip should take effect. + * + * Note that the core code calls drm_crtc_vblank_get before this entry + * point, and will call drm_crtc_vblank_put if this entry point returns + * any non-0 error code. It's the driver's responsibility to call + * drm_crtc_vblank_put after this entry point returns 0, typically when + * the flip completes. + */ + int (*page_flip_target)(struct drm_crtc *crtc, + struct drm_framebuffer *fb, + struct drm_pending_vblank_event *event, + uint32_t flags, uint32_t target); + + /** * @set_property: * * This is the legacy entry point to update a property attached to the |