[PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Feb 7 10:42:15 UTC 2017
Hi Shawn,
Thank you for the patch.
On Tuesday 07 Feb 2017 17:16:14 Shawn Guo wrote:
> From: Shawn Guo <shawn.guo at linaro.org>
>
> 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 at linaro.org>
> Cc: Alexey Brodkin <abrodkin at synopsys.com>
> Cc: Liviu Dudau <liviu.dudau at arm.com>
> Cc: Mali DP Maintainers <malidp at foss.arm.com>
> Cc: Russell King <linux at armlinux.org.uk>
> Cc: Boris Brezillon <boris.brezillon at free-electrons.com>
> Cc: Inki Dae <inki.dae at samsung.com>
> Cc: Stefan Agner <stefan at agner.ch>
> Cc: Xinliang Liu <z.liuxinliang at hisilicon.com>
> Cc: Daniel Vetter <daniel.vetter at intel.com>
> Cc: Philipp Zabel <p.zabel at pengutronix.de>
> Cc: CK Hu <ck.hu at mediatek.com>
> Cc: Neil Armstrong <narmstrong at baylibre.com>
> Cc: Rob Clark <robdclark at gmail.com>
> Cc: Marek Vasut <marex at denx.de>
> Cc: Ben Skeggs <bskeggs at redhat.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Cc: Mark Yao <mark.yao at rock-chips.com>
> Cc: Benjamin Gaignard <benjamin.gaignard at linaro.org>
> Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
> Cc: Jyri Sarha <jsarha at ti.com>
> Cc: Eric Anholt <eric at anholt.net>
> ---
> drivers/gpu/drm/arc/arcpgu_drv.c | 1 -
> drivers/gpu/drm/arm/hdlcd_drv.c | 1 -
> drivers/gpu/drm/arm/malidp_drv.c | 1 -
> drivers/gpu/drm/armada/armada_drv.c | 1 -
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 1 -
> drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 -
> drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 -
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 1 -
> drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 -
> drivers/gpu/drm/i915/i915_irq.c | 1 -
> drivers/gpu/drm/imx/imx-drm-core.c | 1 -
> drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 -
> drivers/gpu/drm/meson/meson_drv.c | 1 -
> drivers/gpu/drm/msm/msm_drv.c | 1 -
> drivers/gpu/drm/mxsfb/mxsfb_drv.c | 1 -
> drivers/gpu/drm/nouveau/nouveau_drm.c | 1 -
> drivers/gpu/drm/omapdrm/omap_drv.c | 1 -
> drivers/gpu/drm/rcar-du/rcar_du_drv.c | 1 -
> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 -
> drivers/gpu/drm/shmobile/shmob_drm_drv.c | 1 -
> drivers/gpu/drm/sti/sti_drv.c | 1 -
> drivers/gpu/drm/sun4i/sun4i_drv.c | 1 -
> drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 -
> drivers/gpu/drm/vc4/vc4_drv.c | 1 -
> drivers/gpu/drm/zte/zx_drm_drv.c | 1 -
> 25 files changed, 25 deletions(-)
[snip]
> diff --git a/drivers/gpu/drm/i915/i915_irq.c
> b/drivers/gpu/drm/i915/i915_irq.c index 47d6131e977f..5aab08172faf 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -4218,7 +4218,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;
On an unrelated note, for security reasons we should try to make the driver
structure static, or at least move ops to a static structure.
Anyway, for this patch,
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
--
Regards,
Laurent Pinchart
More information about the dri-devel
mailing list