summaryrefslogtreecommitdiff
path: root/include/drm/drm_drv.h
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2017-02-07 12:16:13 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-02-07 23:43:19 +0300
commit84e354839b158d87318eb7fa9828d52baceb23c3 (patch)
tree62060e4e2547b60aee8a7a2dfca0022696d91424 /include/drm/drm_drv.h
parentda7bdda2afdf1ae58546218b50771c2c646bb079 (diff)
downloadlinux-84e354839b158d87318eb7fa9828d52baceb23c3.tar.xz
drm: add vblank hooks to struct drm_crtc_funcs
The vblank is mostly CRTC specific and implemented as part of CRTC driver. Let's keep the vblank hooks struct drm_driver for legacy drivers, and add corresponding hooks in struct drm_crtc_funcs. These hooks take struct drm_crtc pointer as argument, and will be called by core vblank handling code for DRIVER_MODESET drivers. The new hooks get plugged into core by adding wrapper functions for vblank handling code. The .get_vblank_counter hook is effectively optional, as we provide drm_vblank_no_hw_counter() as the default fallback in the wrapper function. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Acked-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-2-git-send-email-shawnguo@kernel.org
Diffstat (limited to 'include/drm/drm_drv.h')
-rw-r--r--include/drm/drm_drv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 5699f42195fe..8f8b9a1e55e6 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -130,6 +130,9 @@ struct drm_driver {
* drm_crtc_vblank_off() and drm_crtc_vblank_on() when disabling or
* enabling a CRTC.
*
+ * This is deprecated and should not be used by new drivers.
+ * Use &drm_crtc_funcs.get_vblank_counter instead.
+ *
* Returns:
*
* Raw vblank counter value.
@@ -142,6 +145,9 @@ struct drm_driver {
* Enable vblank interrupts for the CRTC specified with the pipe
* argument.
*
+ * This is deprecated and should not be used by new drivers.
+ * Use &drm_crtc_funcs.enable_vblank instead.
+ *
* Returns:
*
* Zero on success, appropriate errno if the given @crtc's vblank
@@ -154,6 +160,9 @@ struct drm_driver {
*
* Disable vblank interrupts for the CRTC specified with the pipe
* argument.
+ *
+ * This is deprecated and should not be used by new drivers.
+ * Use &drm_crtc_funcs.disable_vblank instead.
*/
void (*disable_vblank) (struct drm_device *dev, unsigned int pipe);