Commit 967dd484 authored by Shawn Guo's avatar Shawn Guo Committed by Daniel Vetter

drm: remove drm_vblank_no_hw_counter assignment from driver code

Core code already makes drm_driver.get_vblank_counter hook optional by
letting drm_vblank_no_hw_counter be the default implementation for the
function hook.  So the drm_vblank_no_hw_counter assignment in the driver
code becomes redundant and can be removed now.
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mark Yao <mark.yao@rock-chips.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jyri Sarha <jsarha@ti.com>
Cc: Eric Anholt <eric@anholt.net>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
Acked-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-3-git-send-email-shawnguo@kernel.org
parent 84e35483
...@@ -175,7 +175,6 @@ static struct drm_driver arcpgu_drm_driver = { ...@@ -175,7 +175,6 @@ static struct drm_driver arcpgu_drm_driver = {
.dumb_create = drm_gem_cma_dumb_create, .dumb_create = drm_gem_cma_dumb_create,
.dumb_map_offset = drm_gem_cma_dumb_map_offset, .dumb_map_offset = drm_gem_cma_dumb_map_offset,
.dumb_destroy = drm_gem_dumb_destroy, .dumb_destroy = drm_gem_dumb_destroy,
.get_vblank_counter = drm_vblank_no_hw_counter,
.prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle, .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_free_object_unlocked = drm_gem_cma_free_object, .gem_free_object_unlocked = drm_gem_cma_free_object,
......
...@@ -278,7 +278,6 @@ static struct drm_driver hdlcd_driver = { ...@@ -278,7 +278,6 @@ static struct drm_driver hdlcd_driver = {
.irq_preinstall = hdlcd_irq_preinstall, .irq_preinstall = hdlcd_irq_preinstall,
.irq_postinstall = hdlcd_irq_postinstall, .irq_postinstall = hdlcd_irq_postinstall,
.irq_uninstall = hdlcd_irq_uninstall, .irq_uninstall = hdlcd_irq_uninstall,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = hdlcd_enable_vblank, .enable_vblank = hdlcd_enable_vblank,
.disable_vblank = hdlcd_disable_vblank, .disable_vblank = hdlcd_disable_vblank,
.gem_free_object_unlocked = drm_gem_cma_free_object, .gem_free_object_unlocked = drm_gem_cma_free_object,
......
...@@ -213,7 +213,6 @@ static struct drm_driver malidp_driver = { ...@@ -213,7 +213,6 @@ static struct drm_driver malidp_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC | .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC |
DRIVER_PRIME, DRIVER_PRIME,
.lastclose = malidp_lastclose, .lastclose = malidp_lastclose,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = malidp_enable_vblank, .enable_vblank = malidp_enable_vblank,
.disable_vblank = malidp_disable_vblank, .disable_vblank = malidp_disable_vblank,
.gem_free_object_unlocked = drm_gem_cma_free_object, .gem_free_object_unlocked = drm_gem_cma_free_object,
......
...@@ -87,7 +87,6 @@ static const struct file_operations armada_drm_fops = { ...@@ -87,7 +87,6 @@ static const struct file_operations armada_drm_fops = {
static struct drm_driver armada_drm_driver = { static struct drm_driver armada_drm_driver = {
.lastclose = armada_drm_lastclose, .lastclose = armada_drm_lastclose,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = armada_drm_enable_vblank, .enable_vblank = armada_drm_enable_vblank,
.disable_vblank = armada_drm_disable_vblank, .disable_vblank = armada_drm_disable_vblank,
.gem_free_object_unlocked = armada_gem_free_object, .gem_free_object_unlocked = armada_gem_free_object,
......
...@@ -760,7 +760,6 @@ static struct drm_driver atmel_hlcdc_dc_driver = { ...@@ -760,7 +760,6 @@ static struct drm_driver atmel_hlcdc_dc_driver = {
.irq_preinstall = atmel_hlcdc_dc_irq_uninstall, .irq_preinstall = atmel_hlcdc_dc_irq_uninstall,
.irq_postinstall = atmel_hlcdc_dc_irq_postinstall, .irq_postinstall = atmel_hlcdc_dc_irq_postinstall,
.irq_uninstall = atmel_hlcdc_dc_irq_uninstall, .irq_uninstall = atmel_hlcdc_dc_irq_uninstall,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = atmel_hlcdc_dc_enable_vblank, .enable_vblank = atmel_hlcdc_dc_enable_vblank,
.disable_vblank = atmel_hlcdc_dc_disable_vblank, .disable_vblank = atmel_hlcdc_dc_disable_vblank,
.gem_free_object_unlocked = drm_gem_cma_free_object, .gem_free_object_unlocked = drm_gem_cma_free_object,
......
...@@ -263,7 +263,6 @@ static struct drm_driver exynos_drm_driver = { ...@@ -263,7 +263,6 @@ static struct drm_driver exynos_drm_driver = {
.preclose = exynos_drm_preclose, .preclose = exynos_drm_preclose,
.lastclose = exynos_drm_lastclose, .lastclose = exynos_drm_lastclose,
.postclose = exynos_drm_postclose, .postclose = exynos_drm_postclose,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = exynos_drm_crtc_enable_vblank, .enable_vblank = exynos_drm_crtc_enable_vblank,
.disable_vblank = exynos_drm_crtc_disable_vblank, .disable_vblank = exynos_drm_crtc_disable_vblank,
.gem_free_object_unlocked = exynos_drm_gem_free_object, .gem_free_object_unlocked = exynos_drm_gem_free_object,
......
...@@ -203,7 +203,6 @@ static struct drm_driver fsl_dcu_drm_driver = { ...@@ -203,7 +203,6 @@ static struct drm_driver fsl_dcu_drm_driver = {
.load = fsl_dcu_load, .load = fsl_dcu_load,
.unload = fsl_dcu_unload, .unload = fsl_dcu_unload,
.irq_handler = fsl_dcu_drm_irq, .irq_handler = fsl_dcu_drm_irq,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = fsl_dcu_drm_enable_vblank, .enable_vblank = fsl_dcu_drm_enable_vblank,
.disable_vblank = fsl_dcu_drm_disable_vblank, .disable_vblank = fsl_dcu_drm_disable_vblank,
.gem_free_object_unlocked = drm_gem_cma_free_object, .gem_free_object_unlocked = drm_gem_cma_free_object,
......
...@@ -84,7 +84,6 @@ static struct drm_driver hibmc_driver = { ...@@ -84,7 +84,6 @@ static struct drm_driver hibmc_driver = {
.desc = "hibmc drm driver", .desc = "hibmc drm driver",
.major = 1, .major = 1,
.minor = 0, .minor = 0,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = hibmc_enable_vblank, .enable_vblank = hibmc_enable_vblank,
.disable_vblank = hibmc_disable_vblank, .disable_vblank = hibmc_disable_vblank,
.gem_free_object_unlocked = hibmc_gem_free_object, .gem_free_object_unlocked = hibmc_gem_free_object,
......
...@@ -1025,7 +1025,6 @@ static int ade_drm_init(struct platform_device *pdev) ...@@ -1025,7 +1025,6 @@ static int ade_drm_init(struct platform_device *pdev)
IRQF_SHARED, dev->driver->name, acrtc); IRQF_SHARED, dev->driver->name, acrtc);
if (ret) if (ret)
return ret; return ret;
dev->driver->get_vblank_counter = drm_vblank_no_hw_counter;
dev->driver->enable_vblank = ade_enable_vblank; dev->driver->enable_vblank = ade_enable_vblank;
dev->driver->disable_vblank = ade_disable_vblank; dev->driver->disable_vblank = ade_disable_vblank;
......
...@@ -4202,7 +4202,6 @@ void intel_irq_init(struct drm_i915_private *dev_priv) ...@@ -4202,7 +4202,6 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
if (IS_GEN2(dev_priv)) { if (IS_GEN2(dev_priv)) {
/* Gen2 doesn't have a hardware frame counter */ /* Gen2 doesn't have a hardware frame counter */
dev->max_vblank_count = 0; dev->max_vblank_count = 0;
dev->driver->get_vblank_counter = drm_vblank_no_hw_counter;
} else if (IS_G4X(dev_priv) || INTEL_INFO(dev_priv)->gen >= 5) { } else if (IS_G4X(dev_priv) || INTEL_INFO(dev_priv)->gen >= 5) {
dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */ dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */
dev->driver->get_vblank_counter = g4x_get_vblank_counter; dev->driver->get_vblank_counter = g4x_get_vblank_counter;
......
...@@ -288,7 +288,6 @@ static struct drm_driver imx_drm_driver = { ...@@ -288,7 +288,6 @@ static struct drm_driver imx_drm_driver = {
.gem_prime_vmap = drm_gem_cma_prime_vmap, .gem_prime_vmap = drm_gem_cma_prime_vmap,
.gem_prime_vunmap = drm_gem_cma_prime_vunmap, .gem_prime_vunmap = drm_gem_cma_prime_vunmap,
.gem_prime_mmap = drm_gem_cma_prime_mmap, .gem_prime_mmap = drm_gem_cma_prime_mmap,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = imx_drm_enable_vblank, .enable_vblank = imx_drm_enable_vblank,
.disable_vblank = imx_drm_disable_vblank, .disable_vblank = imx_drm_disable_vblank,
.ioctls = imx_drm_ioctls, .ioctls = imx_drm_ioctls,
......
...@@ -256,7 +256,6 @@ static struct drm_driver mtk_drm_driver = { ...@@ -256,7 +256,6 @@ static struct drm_driver mtk_drm_driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME |
DRIVER_ATOMIC, DRIVER_ATOMIC,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = mtk_drm_crtc_enable_vblank, .enable_vblank = mtk_drm_crtc_enable_vblank,
.disable_vblank = mtk_drm_crtc_disable_vblank, .disable_vblank = mtk_drm_crtc_disable_vblank,
......
...@@ -129,7 +129,6 @@ static struct drm_driver meson_driver = { ...@@ -129,7 +129,6 @@ static struct drm_driver meson_driver = {
/* Vblank */ /* Vblank */
.enable_vblank = meson_enable_vblank, .enable_vblank = meson_enable_vblank,
.disable_vblank = meson_disable_vblank, .disable_vblank = meson_disable_vblank,
.get_vblank_counter = drm_vblank_no_hw_counter,
/* IRQ */ /* IRQ */
.irq_handler = meson_irq, .irq_handler = meson_irq,
......
...@@ -797,7 +797,6 @@ static struct drm_driver msm_driver = { ...@@ -797,7 +797,6 @@ static struct drm_driver msm_driver = {
.irq_preinstall = msm_irq_preinstall, .irq_preinstall = msm_irq_preinstall,
.irq_postinstall = msm_irq_postinstall, .irq_postinstall = msm_irq_postinstall,
.irq_uninstall = msm_irq_uninstall, .irq_uninstall = msm_irq_uninstall,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = msm_enable_vblank, .enable_vblank = msm_enable_vblank,
.disable_vblank = msm_disable_vblank, .disable_vblank = msm_disable_vblank,
.gem_free_object = msm_gem_free_object, .gem_free_object = msm_gem_free_object,
......
...@@ -341,7 +341,6 @@ static struct drm_driver mxsfb_driver = { ...@@ -341,7 +341,6 @@ static struct drm_driver mxsfb_driver = {
.irq_handler = mxsfb_irq_handler, .irq_handler = mxsfb_irq_handler,
.irq_preinstall = mxsfb_irq_preinstall, .irq_preinstall = mxsfb_irq_preinstall,
.irq_uninstall = mxsfb_irq_preinstall, .irq_uninstall = mxsfb_irq_preinstall,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = mxsfb_enable_vblank, .enable_vblank = mxsfb_enable_vblank,
.disable_vblank = mxsfb_disable_vblank, .disable_vblank = mxsfb_disable_vblank,
.gem_free_object = drm_gem_cma_free_object, .gem_free_object = drm_gem_cma_free_object,
......
...@@ -974,7 +974,6 @@ driver_stub = { ...@@ -974,7 +974,6 @@ driver_stub = {
.debugfs_cleanup = nouveau_drm_debugfs_cleanup, .debugfs_cleanup = nouveau_drm_debugfs_cleanup,
#endif #endif
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = nouveau_display_vblank_enable, .enable_vblank = nouveau_display_vblank_enable,
.disable_vblank = nouveau_display_vblank_disable, .disable_vblank = nouveau_display_vblank_disable,
.get_scanout_position = nouveau_display_scanoutpos, .get_scanout_position = nouveau_display_scanoutpos,
......
...@@ -714,7 +714,6 @@ static struct drm_driver omap_drm_driver = { ...@@ -714,7 +714,6 @@ static struct drm_driver omap_drm_driver = {
DRIVER_ATOMIC, DRIVER_ATOMIC,
.open = dev_open, .open = dev_open,
.lastclose = dev_lastclose, .lastclose = dev_lastclose,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = omap_irq_enable_vblank, .enable_vblank = omap_irq_enable_vblank,
.disable_vblank = omap_irq_disable_vblank, .disable_vblank = omap_irq_disable_vblank,
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
......
...@@ -259,7 +259,6 @@ static struct drm_driver rcar_du_driver = { ...@@ -259,7 +259,6 @@ static struct drm_driver rcar_du_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME
| DRIVER_ATOMIC, | DRIVER_ATOMIC,
.lastclose = rcar_du_lastclose, .lastclose = rcar_du_lastclose,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = rcar_du_enable_vblank, .enable_vblank = rcar_du_enable_vblank,
.disable_vblank = rcar_du_disable_vblank, .disable_vblank = rcar_du_disable_vblank,
.gem_free_object_unlocked = drm_gem_cma_free_object, .gem_free_object_unlocked = drm_gem_cma_free_object,
......
...@@ -270,7 +270,6 @@ static struct drm_driver rockchip_drm_driver = { ...@@ -270,7 +270,6 @@ static struct drm_driver rockchip_drm_driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM | .driver_features = DRIVER_MODESET | DRIVER_GEM |
DRIVER_PRIME | DRIVER_ATOMIC, DRIVER_PRIME | DRIVER_ATOMIC,
.lastclose = rockchip_drm_lastclose, .lastclose = rockchip_drm_lastclose,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = rockchip_drm_crtc_enable_vblank, .enable_vblank = rockchip_drm_crtc_enable_vblank,
.disable_vblank = rockchip_drm_crtc_disable_vblank, .disable_vblank = rockchip_drm_crtc_disable_vblank,
.gem_vm_ops = &drm_gem_cma_vm_ops, .gem_vm_ops = &drm_gem_cma_vm_ops,
......
...@@ -256,7 +256,6 @@ static struct drm_driver shmob_drm_driver = { ...@@ -256,7 +256,6 @@ static struct drm_driver shmob_drm_driver = {
.load = shmob_drm_load, .load = shmob_drm_load,
.unload = shmob_drm_unload, .unload = shmob_drm_unload,
.irq_handler = shmob_drm_irq, .irq_handler = shmob_drm_irq,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = shmob_drm_enable_vblank, .enable_vblank = shmob_drm_enable_vblank,
.disable_vblank = shmob_drm_disable_vblank, .disable_vblank = shmob_drm_disable_vblank,
.gem_free_object_unlocked = drm_gem_cma_free_object, .gem_free_object_unlocked = drm_gem_cma_free_object,
......
...@@ -264,7 +264,6 @@ static struct drm_driver sti_driver = { ...@@ -264,7 +264,6 @@ static struct drm_driver sti_driver = {
.dumb_destroy = drm_gem_dumb_destroy, .dumb_destroy = drm_gem_dumb_destroy,
.fops = &sti_driver_fops, .fops = &sti_driver_fops,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = sti_crtc_enable_vblank, .enable_vblank = sti_crtc_enable_vblank,
.disable_vblank = sti_crtc_disable_vblank, .disable_vblank = sti_crtc_disable_vblank,
......
...@@ -92,7 +92,6 @@ static struct drm_driver sun4i_drv_driver = { ...@@ -92,7 +92,6 @@ static struct drm_driver sun4i_drv_driver = {
/* Frame Buffer Operations */ /* Frame Buffer Operations */
/* VBlank Operations */ /* VBlank Operations */
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = sun4i_drv_enable_vblank, .enable_vblank = sun4i_drv_enable_vblank,
.disable_vblank = sun4i_drv_disable_vblank, .disable_vblank = sun4i_drv_disable_vblank,
}; };
......
...@@ -557,7 +557,6 @@ static struct drm_driver tilcdc_driver = { ...@@ -557,7 +557,6 @@ static struct drm_driver tilcdc_driver = {
DRIVER_PRIME | DRIVER_ATOMIC), DRIVER_PRIME | DRIVER_ATOMIC),
.lastclose = tilcdc_lastclose, .lastclose = tilcdc_lastclose,
.irq_handler = tilcdc_irq, .irq_handler = tilcdc_irq,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = tilcdc_enable_vblank, .enable_vblank = tilcdc_enable_vblank,
.disable_vblank = tilcdc_disable_vblank, .disable_vblank = tilcdc_disable_vblank,
.gem_free_object_unlocked = drm_gem_cma_free_object, .gem_free_object_unlocked = drm_gem_cma_free_object,
......
...@@ -139,7 +139,6 @@ static struct drm_driver vc4_drm_driver = { ...@@ -139,7 +139,6 @@ static struct drm_driver vc4_drm_driver = {
.enable_vblank = vc4_enable_vblank, .enable_vblank = vc4_enable_vblank,
.disable_vblank = vc4_disable_vblank, .disable_vblank = vc4_disable_vblank,
.get_vblank_counter = drm_vblank_no_hw_counter,
.get_scanout_position = vc4_crtc_get_scanoutpos, .get_scanout_position = vc4_crtc_get_scanoutpos,
.get_vblank_timestamp = vc4_crtc_get_vblank_timestamp, .get_vblank_timestamp = vc4_crtc_get_vblank_timestamp,
......
...@@ -71,7 +71,6 @@ static struct drm_driver zx_drm_driver = { ...@@ -71,7 +71,6 @@ static struct drm_driver zx_drm_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME |
DRIVER_ATOMIC, DRIVER_ATOMIC,
.lastclose = zx_drm_lastclose, .lastclose = zx_drm_lastclose,
.get_vblank_counter = drm_vblank_no_hw_counter,
.enable_vblank = zx_vou_enable_vblank, .enable_vblank = zx_vou_enable_vblank,
.disable_vblank = zx_vou_disable_vblank, .disable_vblank = zx_vou_disable_vblank,
.gem_free_object = drm_gem_cma_free_object, .gem_free_object = drm_gem_cma_free_object,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment