aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/drm/drm_modeset_helper_vtables.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2020-01-23 14:59:24 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2020-02-13 13:08:13 +0100
commit7fe3f0d15aac6c98a97e6d7086f5a6b7bc4ccae4 (patch)
treeff005fcab13165c3859c8c4cdce19b181f666e26 /include/drm/drm_modeset_helper_vtables.h
parentdrm: Add get_scanout_position() to struct drm_crtc_helper_funcs (diff)
downloadwireguard-linux-7fe3f0d15aac6c98a97e6d7086f5a6b7bc4ccae4.tar.xz
wireguard-linux-7fe3f0d15aac6c98a97e6d7086f5a6b7bc4ccae4.zip
drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
The callback get_vblank_timestamp() is currently located in struct drm_driver, but really belongs into struct drm_crtc_funcs. Add an equivalent there. Driver will be converted in separate patches. The default implementation is drm_calc_vbltimestamp_from_scanoutpos(). The patch adds drm_crtc_vblank_helper_get_vblank_timestamp(), which is an implementation for the CRTC callback. v4: * more readable code for setting high_prec (Ville, Jani) v3: * use refactored timestamp calculation to minimize duplicated code * do more checks for crtc != NULL to support legacy drivers v2: * rename helper to drm_crtc_vblank_helper_get_vblank_timestamp() * replace drm_calc_vbltimestamp_from_scanoutpos() with drm_crtc_vblank_helper_get_vblank_timestamp() in docs Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200123135943.24140-4-tzimmermann@suse.de
Diffstat (limited to 'include/drm/drm_modeset_helper_vtables.h')
-rw-r--r--include/drm/drm_modeset_helper_vtables.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
index e398512bfd5f..0afaf58da40d 100644
--- a/include/drm/drm_modeset_helper_vtables.h
+++ b/include/drm/drm_modeset_helper_vtables.h
@@ -459,8 +459,8 @@ struct drm_crtc_helper_funcs {
* Returns the current display scanout position from a CRTC and an
* optional accurate ktime_get() timestamp of when the position was
* measured. Note that this is a helper callback which is only used
- * if a driver uses drm_calc_vbltimestamp_from_scanoutpos() for the
- * @drm_driver.get_vblank_timestamp callback.
+ * if a driver uses drm_crtc_vblank_helper_get_vblank_timestamp()
+ * for the @drm_crtc_funcs.get_vblank_timestamp callback.
*
* Parameters:
*