drm: remove drm_vblank_no_hw_counter assignment from driver code
authorShawn Guo <shawn.guo@linaro.org>
Tue, 7 Feb 2017 09:16:14 +0000 (17:16 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 7 Feb 2017 20:43:55 +0000 (21:43 +0100)
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: Shawn 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: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-3-git-send-email-shawnguo@kernel.org
25 files changed:
drivers/gpu/drm/arc/arcpgu_drv.c
drivers/gpu/drm/arm/hdlcd_drv.c
drivers/gpu/drm/arm/malidp_drv.c
drivers/gpu/drm/armada/armada_drv.c
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
drivers/gpu/drm/exynos/exynos_drm_drv.c
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/imx/imx-drm-core.c
drivers/gpu/drm/mediatek/mtk_drm_drv.c
drivers/gpu/drm/meson/meson_drv.c
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/mxsfb/mxsfb_drv.c
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/omapdrm/omap_drv.c
drivers/gpu/drm/rcar-du/rcar_du_drv.c
drivers/gpu/drm/rockchip/rockchip_drm_drv.c
drivers/gpu/drm/shmobile/shmob_drm_drv.c
drivers/gpu/drm/sti/sti_drv.c
drivers/gpu/drm/sun4i/sun4i_drv.c
drivers/gpu/drm/tilcdc/tilcdc_drv.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/zte/zx_drm_drv.c

index 8d8344ed655e21f90c61515a3e3cbf01ab7ac2fc..1926b200e4cb3eade1178ec27fd95fd453f6d8b4 100644 (file)
@@ -175,7 +175,6 @@ static struct drm_driver arcpgu_drm_driver = {
        .dumb_create = drm_gem_cma_dumb_create,
        .dumb_map_offset = drm_gem_cma_dumb_map_offset,
        .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_fd_to_handle = drm_gem_prime_fd_to_handle,
        .gem_free_object_unlocked = drm_gem_cma_free_object,
index 4ce4f970920b24607cefc1539c2b600b0662995b..5d79e87f74215b3dc382e916631d11f32c0554c9 100644 (file)
@@ -278,7 +278,6 @@ static struct drm_driver hdlcd_driver = {
        .irq_preinstall = hdlcd_irq_preinstall,
        .irq_postinstall = hdlcd_irq_postinstall,
        .irq_uninstall = hdlcd_irq_uninstall,
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .enable_vblank = hdlcd_enable_vblank,
        .disable_vblank = hdlcd_disable_vblank,
        .gem_free_object_unlocked = drm_gem_cma_free_object,
index 8b0672d4aee9137d316a454e3f4d219219d99028..ca6ccd172de3af822bc17f4118001305cb9e2fa1 100644 (file)
@@ -213,7 +213,6 @@ static struct drm_driver malidp_driver = {
        .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC |
                           DRIVER_PRIME,
        .lastclose = malidp_lastclose,
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .enable_vblank = malidp_enable_vblank,
        .disable_vblank = malidp_disable_vblank,
        .gem_free_object_unlocked = drm_gem_cma_free_object,
index 63f42d001f33d9ac1737d358c21ccdb4184083ff..bb27892012deb531398807e7eab4c56121036e8a 100644 (file)
@@ -87,7 +87,6 @@ static const struct file_operations armada_drm_fops = {
 
 static struct drm_driver armada_drm_driver = {
        .lastclose              = armada_drm_lastclose,
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
        .enable_vblank          = armada_drm_enable_vblank,
        .disable_vblank         = armada_drm_disable_vblank,
        .gem_free_object_unlocked = armada_gem_free_object,
index 427bdff425c24fc502e8b767eb6dcc26cd367289..5cba65b5ea1677521f79ad73ffa7fabb70059a45 100644 (file)
@@ -760,7 +760,6 @@ static struct drm_driver atmel_hlcdc_dc_driver = {
        .irq_preinstall = atmel_hlcdc_dc_irq_uninstall,
        .irq_postinstall = atmel_hlcdc_dc_irq_postinstall,
        .irq_uninstall = atmel_hlcdc_dc_irq_uninstall,
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .enable_vblank = atmel_hlcdc_dc_enable_vblank,
        .disable_vblank = atmel_hlcdc_dc_disable_vblank,
        .gem_free_object_unlocked = drm_gem_cma_free_object,
index 035d02ecffcdcffee4847f3e1823c2419b4883dd..a1c22eb12f4b908ef745a9ebf740080d1b7a1b00 100644 (file)
@@ -263,7 +263,6 @@ static struct drm_driver exynos_drm_driver = {
        .preclose               = exynos_drm_preclose,
        .lastclose              = exynos_drm_lastclose,
        .postclose              = exynos_drm_postclose,
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
        .enable_vblank          = exynos_drm_crtc_enable_vblank,
        .disable_vblank         = exynos_drm_crtc_disable_vblank,
        .gem_free_object_unlocked = exynos_drm_gem_free_object,
index 04173235f4482adb2a9de172fd420f9e85285654..b59b816a1d7d010f49fefbecdbd78fd8ce21b998 100644 (file)
@@ -203,7 +203,6 @@ static struct drm_driver fsl_dcu_drm_driver = {
        .load                   = fsl_dcu_load,
        .unload                 = fsl_dcu_unload,
        .irq_handler            = fsl_dcu_drm_irq,
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
        .enable_vblank          = fsl_dcu_drm_enable_vblank,
        .disable_vblank         = fsl_dcu_drm_disable_vblank,
        .gem_free_object_unlocked = drm_gem_cma_free_object,
index 7e2043f4348ce5c7aac6e0517fbe200a841a000f..8cac70454b570c4d5a00054c02c634edefceae42 100644 (file)
@@ -84,7 +84,6 @@ static struct drm_driver hibmc_driver = {
        .desc                   = "hibmc drm driver",
        .major                  = 1,
        .minor                  = 0,
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
        .enable_vblank          = hibmc_enable_vblank,
        .disable_vblank         = hibmc_disable_vblank,
        .gem_free_object_unlocked = hibmc_gem_free_object,
index 9a0678a33e0dcd9cafaf95ec377cad354bfbcc01..0624fab8046fb6e768a6dd2d5eeeffa0d9c8f198 100644 (file)
@@ -1025,7 +1025,6 @@ static int ade_drm_init(struct platform_device *pdev)
                               IRQF_SHARED, dev->driver->name, acrtc);
        if (ret)
                return ret;
-       dev->driver->get_vblank_counter = drm_vblank_no_hw_counter;
        dev->driver->enable_vblank = ade_enable_vblank;
        dev->driver->disable_vblank = ade_disable_vblank;
 
index 6fefc34ef602e9ee758c980bb37e2b1d63e6746c..ee313247673b1d8b094bd82017bc748a3b9a9eff 100644 (file)
@@ -4202,7 +4202,6 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
        if (IS_GEN2(dev_priv)) {
                /* Gen2 doesn't have a hardware frame counter */
                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) {
                dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */
                dev->driver->get_vblank_counter = g4x_get_vblank_counter;
index 5ae48836652ebd5a5bea77583c677f5583d9959f..4badbb66d69e56f2f466d8c002778d3e0285c421 100644 (file)
@@ -288,7 +288,6 @@ static struct drm_driver imx_drm_driver = {
        .gem_prime_vmap         = drm_gem_cma_prime_vmap,
        .gem_prime_vunmap       = drm_gem_cma_prime_vunmap,
        .gem_prime_mmap         = drm_gem_cma_prime_mmap,
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
        .enable_vblank          = imx_drm_enable_vblank,
        .disable_vblank         = imx_drm_disable_vblank,
        .ioctls                 = imx_drm_ioctls,
index b5f88e6d078e6992cc99e13743e59671bd36ae4f..ef8675336465c87e951020dcd6c111bc92dce34a 100644 (file)
@@ -256,7 +256,6 @@ static struct drm_driver mtk_drm_driver = {
        .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME |
                           DRIVER_ATOMIC,
 
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .enable_vblank = mtk_drm_crtc_enable_vblank,
        .disable_vblank = mtk_drm_crtc_disable_vblank,
 
index 6f2fd82ed483da291b7d3f4d6de8655f38a0281e..c0a59889c45fd332fc4262d773995fcefa8cc686 100644 (file)
@@ -129,7 +129,6 @@ static struct drm_driver meson_driver = {
        /* Vblank */
        .enable_vblank          = meson_enable_vblank,
        .disable_vblank         = meson_disable_vblank,
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
 
        /* IRQ */
        .irq_handler            = meson_irq,
index e29bb66f55b128a612888e5c11223b3d52e4da5d..54207fe59307f644438a99e356669a81bac613d0 100644 (file)
@@ -797,7 +797,6 @@ static struct drm_driver msm_driver = {
        .irq_preinstall     = msm_irq_preinstall,
        .irq_postinstall    = msm_irq_postinstall,
        .irq_uninstall      = msm_irq_uninstall,
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .enable_vblank      = msm_enable_vblank,
        .disable_vblank     = msm_disable_vblank,
        .gem_free_object    = msm_gem_free_object,
index 8112295a205ba384495ee441b355da86d07d8c57..a4633ada8429d658f4362bbd4f8f18da55454462 100644 (file)
@@ -341,7 +341,6 @@ static struct drm_driver mxsfb_driver = {
        .irq_handler            = mxsfb_irq_handler,
        .irq_preinstall         = mxsfb_irq_preinstall,
        .irq_uninstall          = mxsfb_irq_preinstall,
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
        .enable_vblank          = mxsfb_enable_vblank,
        .disable_vblank         = mxsfb_disable_vblank,
        .gem_free_object        = drm_gem_cma_free_object,
index dd7b52ab505a023f9491ee29bc97d1318726de6d..279497b15e7be45726293647730c9e2178d6056b 100644 (file)
@@ -974,7 +974,6 @@ driver_stub = {
        .debugfs_cleanup = nouveau_drm_debugfs_cleanup,
 #endif
 
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .enable_vblank = nouveau_display_vblank_enable,
        .disable_vblank = nouveau_display_vblank_disable,
        .get_scanout_position = nouveau_display_scanoutpos,
index afe8f05b927b2c43170a58f5564be44c01c0fc60..da049a7636ad41f96ac1b462a928701a935b84fe 100644 (file)
@@ -714,7 +714,6 @@ static struct drm_driver omap_drm_driver = {
                DRIVER_ATOMIC,
        .open = dev_open,
        .lastclose = dev_lastclose,
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .enable_vblank = omap_irq_enable_vblank,
        .disable_vblank = omap_irq_disable_vblank,
 #ifdef CONFIG_DEBUG_FS
index c05e0087277871ffcc6d86db72055966e0ff9eaf..094da3ef49d14f762504f24425f84e8d4cb47397 100644 (file)
@@ -259,7 +259,6 @@ static struct drm_driver rcar_du_driver = {
        .driver_features        = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME
                                | DRIVER_ATOMIC,
        .lastclose              = rcar_du_lastclose,
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
        .enable_vblank          = rcar_du_enable_vblank,
        .disable_vblank         = rcar_du_disable_vblank,
        .gem_free_object_unlocked = drm_gem_cma_free_object,
index c30d649cb147bbbe34cfc362712a1fc6516de9c7..39243480c8345007ee05003e3aaef8a70ea5e323 100644 (file)
@@ -270,7 +270,6 @@ static struct drm_driver rockchip_drm_driver = {
        .driver_features        = DRIVER_MODESET | DRIVER_GEM |
                                  DRIVER_PRIME | DRIVER_ATOMIC,
        .lastclose              = rockchip_drm_lastclose,
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
        .enable_vblank          = rockchip_drm_crtc_enable_vblank,
        .disable_vblank         = rockchip_drm_crtc_disable_vblank,
        .gem_vm_ops             = &drm_gem_cma_vm_ops,
index 33cec3d4238969579cf114f1775d4f94ad82d02b..d6b0545d252d28286fb45fc2055e7ee22f9f419e 100644 (file)
@@ -256,7 +256,6 @@ static struct drm_driver shmob_drm_driver = {
        .load                   = shmob_drm_load,
        .unload                 = shmob_drm_unload,
        .irq_handler            = shmob_drm_irq,
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
        .enable_vblank          = shmob_drm_enable_vblank,
        .disable_vblank         = shmob_drm_disable_vblank,
        .gem_free_object_unlocked = drm_gem_cma_free_object,
index 788feed208d7c1b1c6b03ea3760a06e4b04c3513..d4b771d2d10db7ef6c18585738e8cd6c2ed9cbd3 100644 (file)
@@ -264,7 +264,6 @@ static struct drm_driver sti_driver = {
        .dumb_destroy = drm_gem_dumb_destroy,
        .fops = &sti_driver_fops,
 
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .enable_vblank = sti_crtc_enable_vblank,
        .disable_vblank = sti_crtc_disable_vblank,
 
index 4ce665349f6b6cef51a2e6142708e5ec34ac45a4..0816c635df204d7e4f5a61473658fcf01738a033 100644 (file)
@@ -92,7 +92,6 @@ static struct drm_driver sun4i_drv_driver = {
        /* Frame Buffer Operations */
 
        /* VBlank Operations */
-       .get_vblank_counter     = drm_vblank_no_hw_counter,
        .enable_vblank          = sun4i_drv_enable_vblank,
        .disable_vblank         = sun4i_drv_disable_vblank,
 };
index 372d86fbb093865816845331aea01651a6e6f1c0..d5bc98e283d9d2990203a69331d8394a49c415e4 100644 (file)
@@ -557,7 +557,6 @@ static struct drm_driver tilcdc_driver = {
                               DRIVER_PRIME | DRIVER_ATOMIC),
        .lastclose          = tilcdc_lastclose,
        .irq_handler        = tilcdc_irq,
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .enable_vblank      = tilcdc_enable_vblank,
        .disable_vblank     = tilcdc_disable_vblank,
        .gem_free_object_unlocked = drm_gem_cma_free_object,
index a459745e96f7bb1f81b24077042da4c0c0063525..3a8709d85da1268bf479f406ec05a4ca4dd6a434 100644 (file)
@@ -139,7 +139,6 @@ static struct drm_driver vc4_drm_driver = {
 
        .enable_vblank = vc4_enable_vblank,
        .disable_vblank = vc4_disable_vblank,
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .get_scanout_position = vc4_crtc_get_scanoutpos,
        .get_vblank_timestamp = vc4_crtc_get_vblank_timestamp,
 
index 5c6944a1e72c3fa31340d189abb4be6aac168cb5..afd713a954c64957423a83bce9805a457cb0676b 100644 (file)
@@ -71,7 +71,6 @@ static struct drm_driver zx_drm_driver = {
        .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME |
                           DRIVER_ATOMIC,
        .lastclose = zx_drm_lastclose,
-       .get_vblank_counter = drm_vblank_no_hw_counter,
        .enable_vblank = zx_vou_enable_vblank,
        .disable_vblank = zx_vou_disable_vblank,
        .gem_free_object = drm_gem_cma_free_object,