Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
Shawn Guowrites: > From: Shawn Guo > > 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. Thanks. Missing this hook was actually a problem in vc4 for a while, so it's nice to have sensible defaults. For vc4: Acked-by: Eric Anholt signature.asc Description: PGP signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
Hi Shawn, On Tue, 2017-02-07 at 17:16 +0800, Shawn Guo wrote: > From: Shawn Guo> > 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 > Cc: Alexey Brodkin For ARC PGU part Acked-by: Alexey Brodkin ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
On Tue, Feb 07, 2017 at 12:42:15PM +0200, Laurent Pinchart wrote: > 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. ITYM "const" not "static". "static" doesn't get you anything from a security point of view. "const" gets you write protection, so code can't modify the function pointers. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
On Tue, Feb 07, 2017 at 05:16:14PM +0800, Shawn Guo wrote: For: > drivers/gpu/drm/armada/armada_drv.c | 1 - Acked-by: Russell King-- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
On Tue, Feb 07, 2017 at 05:16:14PM +0800, Shawn Guo wrote: > From: Shawn Guo> > 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 > Cc: Alexey Brodkin > Cc: Liviu Dudau > Cc: Mali DP Maintainers > Cc: Russell King > Cc: Boris Brezillon > Cc: Inki Dae > Cc: Stefan Agner > Cc: Xinliang Liu > Cc: Daniel Vetter > Cc: Philipp Zabel > Cc: CK Hu > Cc: Neil Armstrong > Cc: Rob Clark > Cc: Marek Vasut > Cc: Ben Skeggs > Cc: Tomi Valkeinen > Cc: Laurent Pinchart > Cc: Mark Yao > Cc: Benjamin Gaignard > Cc: Maxime Ripard > Cc: Jyri Sarha > Cc: Eric Anholt > --- > drivers/gpu/drm/arc/arcpgu_drv.c| 1 - > drivers/gpu/drm/arm/hdlcd_drv.c | 1 - > drivers/gpu/drm/arm/malidp_drv.c| 1 - For the HDLCD and Mali DP drivers: Acked-by: Liviu Dudau Thanks for doing this! Liviu > 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(-) > > diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c > b/drivers/gpu/drm/arc/arcpgu_drv.c > index 8d8344ed655e..1926b200e4cb 100644 > --- a/drivers/gpu/drm/arc/arcpgu_drv.c > +++ b/drivers/gpu/drm/arc/arcpgu_drv.c > @@ -175,7 +175,6 @@ static int arcpgu_unload(struct drm_device *drm) > .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, > diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c > index 4ce4f970920b..5d79e87f7421 100644 > --- a/drivers/gpu/drm/arm/hdlcd_drv.c > +++ b/drivers/gpu/drm/arm/hdlcd_drv.c > @@ -278,7 +278,6 @@ static int hdlcd_debugfs_init(struct drm_minor *minor) > .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, > diff --git a/drivers/gpu/drm/arm/malidp_drv.c > b/drivers/gpu/drm/arm/malidp_drv.c > index 8b0672d4aee9..ca6ccd172de3 100644 > --- a/drivers/gpu/drm/arm/malidp_drv.c > +++ b/drivers/gpu/drm/arm/malidp_drv.c > @@ -213,7 +213,6 @@ static void malidp_lastclose(struct drm_device *drm) > .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, > diff --git a/drivers/gpu/drm/armada/armada_drv.c >
Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
On Tue, Feb 07, 2017 at 10:44:49AM +, Russell King - ARM Linux wrote: > On Tue, Feb 07, 2017 at 12:42:15PM +0200, Laurent Pinchart wrote: > > 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. > > ITYM "const" not "static". > > "static" doesn't get you anything from a security point of view. "const" > gets you write protection, so code can't modify the function pointers. We can't easily do that for struct drm_driver at the moment because some fields end up being modified at runtime. I suppose we could move some of those fields over to struct drm_device, which, in many cases, would make more sense anyway. What i915 is currently doing is probably fine for all existing cases, but it sets a bad example for other drivers that may end up having to drive multiple devices with one driver, so modifying the global driver is likely going to break things. Thierry signature.asc Description: PGP signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
Hi Russell, On Tuesday 07 Feb 2017 10:44:49 Russell King - ARM Linux wrote: > On Tue, Feb 07, 2017 at 12:42:15PM +0200, Laurent Pinchart wrote: > > 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. > > ITYM "const" not "static". > > "static" doesn't get you anything from a security point of view. "const" > gets you write protection, so code can't modify the function pointers. That's what I meant, sorry. My brain-fingers link seems to be have a high noise level this week. -- Regards, Laurent Pinchart ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
Hi Shawn, Thank you for the patch. On Tuesday 07 Feb 2017 17:16:14 Shawn Guo wrote: > From: Shawn Guo> > 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 > Cc: Alexey Brodkin > Cc: Liviu Dudau > Cc: Mali DP Maintainers > Cc: Russell King > Cc: Boris Brezillon > Cc: Inki Dae > Cc: Stefan Agner > Cc: Xinliang Liu > Cc: Daniel Vetter > Cc: Philipp Zabel > Cc: CK Hu > Cc: Neil Armstrong > Cc: Rob Clark > Cc: Marek Vasut > Cc: Ben Skeggs > Cc: Tomi Valkeinen > Cc: Laurent Pinchart > Cc: Mark Yao > Cc: Benjamin Gaignard > Cc: Maxime Ripard > Cc: Jyri Sarha > Cc: Eric Anholt > --- > 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 = 0x; /* 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 -- Regards, Laurent Pinchart ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
On 02/07/2017 10:16 AM, Shawn Guo wrote: > From: Shawn Guo> > 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 > Cc: Alexey Brodkin > Cc: Liviu Dudau > Cc: Mali DP Maintainers > Cc: Russell King > Cc: Boris Brezillon > Cc: Inki Dae > Cc: Stefan Agner > Cc: Xinliang Liu > Cc: Daniel Vetter > Cc: Philipp Zabel > Cc: CK Hu > Cc: Neil Armstrong For the meson drm driver : Acked-by: Neil Armstrong > Cc: Rob Clark > Cc: Marek Vasut > Cc: Ben Skeggs > Cc: Tomi Valkeinen > Cc: Laurent Pinchart > Cc: Mark Yao > Cc: Benjamin Gaignard > Cc: Maxime Ripard > Cc: Jyri Sarha > Cc: Eric Anholt > --- > 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(-) > > diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c > b/drivers/gpu/drm/arc/arcpgu_drv.c > index 8d8344ed655e..1926b200e4cb 100644 > --- a/drivers/gpu/drm/arc/arcpgu_drv.c > +++ b/drivers/gpu/drm/arc/arcpgu_drv.c > @@ -175,7 +175,6 @@ static int arcpgu_unload(struct drm_device *drm) > .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, > diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c > index 4ce4f970920b..5d79e87f7421 100644 > --- a/drivers/gpu/drm/arm/hdlcd_drv.c > +++ b/drivers/gpu/drm/arm/hdlcd_drv.c > @@ -278,7 +278,6 @@ static int hdlcd_debugfs_init(struct drm_minor *minor) > .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, > diff --git a/drivers/gpu/drm/arm/malidp_drv.c > b/drivers/gpu/drm/arm/malidp_drv.c > index 8b0672d4aee9..ca6ccd172de3 100644 > --- a/drivers/gpu/drm/arm/malidp_drv.c > +++ b/drivers/gpu/drm/arm/malidp_drv.c > @@ -213,7 +213,6 @@ static void malidp_lastclose(struct drm_device *drm) > .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, > diff --git a/drivers/gpu/drm/armada/armada_drv.c > b/drivers/gpu/drm/armada/armada_drv.c > index
Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
On Tue, 7 Feb 2017 17:16:14 +0800 Shawn Guowrote: > From: Shawn Guo > > 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 > Cc: Alexey Brodkin > Cc: Liviu Dudau > Cc: Mali DP Maintainers > Cc: Russell King > Cc: Boris Brezillon Acked-by: Boris Brezillon > Cc: Inki Dae > Cc: Stefan Agner > Cc: Xinliang Liu > Cc: Daniel Vetter > Cc: Philipp Zabel > Cc: CK Hu > Cc: Neil Armstrong > Cc: Rob Clark > Cc: Marek Vasut > Cc: Ben Skeggs > Cc: Tomi Valkeinen > Cc: Laurent Pinchart > Cc: Mark Yao > Cc: Benjamin Gaignard > Cc: Maxime Ripard > Cc: Jyri Sarha > Cc: Eric Anholt > --- > 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(-) > > diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c > b/drivers/gpu/drm/arc/arcpgu_drv.c > index 8d8344ed655e..1926b200e4cb 100644 > --- a/drivers/gpu/drm/arc/arcpgu_drv.c > +++ b/drivers/gpu/drm/arc/arcpgu_drv.c > @@ -175,7 +175,6 @@ static int arcpgu_unload(struct drm_device *drm) > .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, > diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c > index 4ce4f970920b..5d79e87f7421 100644 > --- a/drivers/gpu/drm/arm/hdlcd_drv.c > +++ b/drivers/gpu/drm/arm/hdlcd_drv.c > @@ -278,7 +278,6 @@ static int hdlcd_debugfs_init(struct drm_minor *minor) > .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, > diff --git a/drivers/gpu/drm/arm/malidp_drv.c > b/drivers/gpu/drm/arm/malidp_drv.c > index 8b0672d4aee9..ca6ccd172de3 100644 > --- a/drivers/gpu/drm/arm/malidp_drv.c > +++ b/drivers/gpu/drm/arm/malidp_drv.c > @@ -213,7 +213,6 @@ static void malidp_lastclose(struct drm_device *drm) > .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, > diff --git a/drivers/gpu/drm/armada/armada_drv.c > b/drivers/gpu/drm/armada/armada_drv.c > index
Re: [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
On Tue, Feb 07, 2017 at 05:16:14PM +0800, Shawn Guo wrote: > From: Shawn Guo> > 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 > Cc: Alexey Brodkin > Cc: Liviu Dudau > Cc: Mali DP Maintainers > Cc: Russell King > Cc: Boris Brezillon > Cc: Inki Dae > Cc: Stefan Agner > Cc: Xinliang Liu > Cc: Daniel Vetter > Cc: Philipp Zabel > Cc: CK Hu > Cc: Neil Armstrong > Cc: Rob Clark > Cc: Marek Vasut > Cc: Ben Skeggs > Cc: Tomi Valkeinen > Cc: Laurent Pinchart > Cc: Mark Yao > Cc: Benjamin Gaignard > Cc: Maxime Ripard > Cc: Jyri Sarha > Cc: Eric Anholt > --- > 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 - For sun4i, Acked-by: Maxime Ripard Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com signature.asc Description: PGP signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code
From: Shawn GuoCore 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 Cc: Alexey Brodkin Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Russell King Cc: Boris Brezillon Cc: Inki Dae Cc: Stefan Agner Cc: Xinliang Liu Cc: Daniel Vetter Cc: Philipp Zabel Cc: CK Hu Cc: Neil Armstrong Cc: Rob Clark Cc: Marek Vasut Cc: Ben Skeggs Cc: Tomi Valkeinen Cc: Laurent Pinchart Cc: Mark Yao Cc: Benjamin Gaignard Cc: Maxime Ripard Cc: Jyri Sarha Cc: Eric Anholt --- 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(-) diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index 8d8344ed655e..1926b200e4cb 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -175,7 +175,6 @@ static int arcpgu_unload(struct drm_device *drm) .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, diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 4ce4f970920b..5d79e87f7421 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -278,7 +278,6 @@ static int hdlcd_debugfs_init(struct drm_minor *minor) .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, diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 8b0672d4aee9..ca6ccd172de3 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -213,7 +213,6 @@ static void malidp_lastclose(struct drm_device *drm) .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, diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c index 63f42d001f33..bb27892012de 100644 --- a/drivers/gpu/drm/armada/armada_drv.c +++ b/drivers/gpu/drm/armada/armada_drv.c @@ -87,7 +87,6 @@ static void armada_drm_lastclose(struct drm_device *dev) static struct drm_driver armada_drm_driver = { .lastclose = armada_drm_lastclose, -