drm: add vblank hooks to struct drm_crtc_funcs
authorShawn Guo <shawn.guo@linaro.org>
Tue, 7 Feb 2017 09:16:13 +0000 (17:16 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 7 Feb 2017 20:43:19 +0000 (21:43 +0100)
commit84e354839b158d87318eb7fa9828d52baceb23c3
tree62060e4e2547b60aee8a7a2dfca0022696d91424
parentda7bdda2afdf1ae58546218b50771c2c646bb079
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
drivers/gpu/drm/drm_irq.c
include/drm/drm_crtc.h
include/drm/drm_drv.h