All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/23] Add vblank hooks to struct drm_crtc_funcs
@ 2017-02-07  9:16 Shawn Guo
  2017-02-07  9:16 ` [PATCH v3 01/23] drm: add " Shawn Guo
                   ` (24 more replies)
  0 siblings, 25 replies; 68+ messages in thread
From: Shawn Guo @ 2017-02-07  9:16 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Neil Armstrong, Liviu Dudau, Laurent Pinchart, Daniel Vetter,
	Marek Vasut, Alexey Brodkin, Russell King, Xinliang Liu,
	Tomi Valkeinen, Mali DP Maintainers, Ben Skeggs, Jyri Sarha,
	dri-devel, Maxime Ripard

From: Shawn Guo <shawn.guo@linaro.org>

The vblank is mostly CRTC specific and implemented as part of CRTC
driver.  The first patch adds 3 vblank core<->driver hooks into struct
drm_crtc_funcs, and plug them into core by adding wrapper functions for
vblank handling code.  We effectively make the .get_vblank_counter hook
optional by providing drm_vblank_no_hw_counter() as the default fallback
in the wrapper function.

Patch #2 and #3 unexport function drm_vblank_no_hw_counter() by cleaning
up its use, since it's already the default implememention for
.get_vblank_counter hook anyway.

The rest of the series is trying to do a massive conversion to the new
hooks for DRIVER_MODESET drivers.  But it only handles low-hanging
fruit, and leaves out the ones that need a bit surgery, like gma500,
i915, msm etc.  Most of conversion get done by simply moving code and
making functions static, but imx and rockchip are great examples showing
how driver code can be cleaned up with these new hooks.

The series is generated against branch drm-next.

Changes for v3:
 - Let drm_vblank_no_hw_counter() be the last fallback for
   .get_vblank_counter() hook.
 - Improve the kernel-doc for .get_vblank_counter() hook.
 - Convert more DRIVER_MODESET drivers to new hooks.

Changes for v2:
 - Wrap around core vblank handling code to save
   drm_crtc_enable[disable]_vblank() helpers
 - Add .get_vblank_counter to struct drm_crtc_funcs
 - Add some comments to link between two sets of hooks
 - Add one hdlcd driver patch for example

Shawn Guo (23):
  drm: add vblank hooks to struct drm_crtc_funcs
  drm: remove drm_vblank_no_hw_counter assignment from driver code
  drm: unexport function drm_vblank_no_hw_counter()
  drm: hdlcd: use vblank hooks in struct drm_crtc_funcs
  drm: malidp: use vblank hooks in struct drm_crtc_funcs
  drm: armada: use vblank hooks in struct drm_crtc_funcs
  drm: atmel: use vblank hooks in struct drm_crtc_funcs
  drm: exynos: use vblank hooks in struct drm_crtc_funcs
  drm: fsl-dcu: use vblank hooks in struct drm_crtc_funcs
  drm: hibmc: use vblank hooks in struct drm_crtc_funcs
  drm: kirin: use vblank hooks in struct drm_crtc_funcs
  drm: imx: remove struct imx_drm_crtc and imx_drm_crtc_helper_funcs
  drm: mediatek: use vblank hooks in struct drm_crtc_funcs
  drm: meson: use vblank hooks in struct drm_crtc_funcs
  drm: qxl: use vblank hooks in struct drm_crtc_funcs
  drm: rcar-du: use vblank hooks in struct drm_crtc_funcs
  drm: rockchip: remove struct rockchip_crtc_funcs
  drm: shmobile: use vblank hooks in struct drm_crtc_funcs
  drm: sun4i: use vblank hooks in struct drm_crtc_funcs
  drm: tegra: use vblank hooks in struct drm_crtc_funcs
  drm: tilcdc: use vblank hooks in struct drm_crtc_funcs
  drm: vc4: use vblank hooks in struct drm_crtc_funcs
  drm: zte: use vblank hooks in struct drm_crtc_funcs

 drivers/gpu/drm/arc/arcpgu_drv.c                |   1 -
 drivers/gpu/drm/arm/hdlcd_crtc.c                |  20 +++++
 drivers/gpu/drm/arm/hdlcd_drv.c                 |  21 -----
 drivers/gpu/drm/arm/malidp_crtc.c               |  21 +++++
 drivers/gpu/drm/arm/malidp_drv.c                |  22 -----
 drivers/gpu/drm/armada/armada_crtc.c            |  56 ++++++++-----
 drivers/gpu/drm/armada/armada_crtc.h            |   2 -
 drivers/gpu/drm/armada/armada_drv.c             |  17 ----
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c  |  21 +++++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c    |  22 -----
 drivers/gpu/drm/drm_irq.c                       |  81 +++++++++++++------
 drivers/gpu/drm/exynos/exynos_drm_crtc.c        |  40 +++++-----
 drivers/gpu/drm/exynos/exynos_drm_crtc.h        |   2 -
 drivers/gpu/drm/exynos/exynos_drm_drv.c         |   4 -
 drivers/gpu/drm/exynos/exynos_drm_drv.h         |   8 --
 drivers/gpu/drm/exynos/exynos_hdmi.c            |   7 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c      |  26 ++++++
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c       |  26 ------
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c  |  20 +++++
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c |  23 ------
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c |  11 +--
 drivers/gpu/drm/i915/i915_irq.c                 |   1 -
 drivers/gpu/drm/imx/imx-drm-core.c              | 102 ------------------------
 drivers/gpu/drm/imx/imx-drm.h                   |  13 ---
 drivers/gpu/drm/imx/ipuv3-crtc.c                |  58 +++++---------
 drivers/gpu/drm/mediatek/mtk_drm_crtc.c         |   8 +-
 drivers/gpu/drm/mediatek/mtk_drm_crtc.h         |   2 -
 drivers/gpu/drm/mediatek/mtk_drm_drv.c          |   4 -
 drivers/gpu/drm/meson/meson_crtc.c              |  22 +++++
 drivers/gpu/drm/meson/meson_drv.c               |  21 -----
 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/qxl/qxl_display.c               |  16 ++++
 drivers/gpu/drm/qxl/qxl_drv.c                   |  18 -----
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c          |  29 ++++---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.h          |   1 -
 drivers/gpu/drm/rcar-du/rcar_du_drv.c           |  20 -----
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c     |  52 ------------
 drivers/gpu/drm/rockchip/rockchip_drm_drv.h     |  14 ----
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c     |   9 +--
 drivers/gpu/drm/shmobile/shmob_drm_crtc.c       |  51 ++++++++----
 drivers/gpu/drm/shmobile/shmob_drm_crtc.h       |   1 -
 drivers/gpu/drm/shmobile/shmob_drm_drv.c        |  20 -----
 drivers/gpu/drm/sti/sti_drv.c                   |   1 -
 drivers/gpu/drm/sun4i/sun4i_crtc.c              |  24 ++++++
 drivers/gpu/drm/sun4i/sun4i_drv.c               |  28 -------
 drivers/gpu/drm/tegra/dc.c                      |  15 +++-
 drivers/gpu/drm/tegra/drm.c                     |  38 ---------
 drivers/gpu/drm/tegra/drm.h                     |   3 -
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c            |  11 +++
 drivers/gpu/drm/tilcdc/tilcdc_drv.c             |  13 ---
 drivers/gpu/drm/vc4/vc4_crtc.c                  |   8 +-
 drivers/gpu/drm/vc4/vc4_drv.c                   |   3 -
 drivers/gpu/drm/vc4/vc4_drv.h                   |   2 -
 drivers/gpu/drm/zte/zx_drm_drv.c                |   3 -
 drivers/gpu/drm/zte/zx_vou.c                    |  61 ++++++--------
 drivers/gpu/drm/zte/zx_vou.h                    |   3 -
 include/drm/drm_crtc.h                          |  44 ++++++++++
 include/drm/drm_drv.h                           |  16 +++-
 include/drm/drm_irq.h                           |   1 -
 62 files changed, 481 insertions(+), 710 deletions(-)

-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2017-02-21 16:21 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07  9:16 [PATCH v3 00/23] Add vblank hooks to struct drm_crtc_funcs Shawn Guo
2017-02-07  9:16 ` [PATCH v3 01/23] drm: add " Shawn Guo
2017-02-07 10:38   ` Andrzej Hajda
2017-02-07 10:52     ` Daniel Vetter
2017-02-07 11:50       ` Thierry Reding
2017-02-07 11:04   ` Thierry Reding
2017-02-07 14:01   ` Laurent Pinchart
2017-02-07  9:16 ` [PATCH v3 02/23] drm: remove drm_vblank_no_hw_counter assignment from driver code Shawn Guo
2017-02-07  9:27   ` Maxime Ripard
2017-02-07  9:46   ` Boris Brezillon
2017-02-07 10:09   ` Neil Armstrong
2017-02-07 10:22   ` Russell King - ARM Linux
2017-02-07 10:42   ` Laurent Pinchart
2017-02-07 10:44     ` Russell King - ARM Linux
2017-02-07 10:58       ` Laurent Pinchart
2017-02-07 11:01       ` Thierry Reding
2017-02-07 11:54   ` Alexey Brodkin
2017-02-07 15:21   ` Liviu Dudau
2017-02-08 19:58   ` Eric Anholt
2017-02-07  9:16 ` [PATCH v3 03/23] drm: unexport function drm_vblank_no_hw_counter() Shawn Guo
2017-02-07 10:56   ` Laurent Pinchart
2017-02-07  9:16 ` [PATCH v3 04/23] drm: hdlcd: use vblank hooks in struct drm_crtc_funcs Shawn Guo
2017-02-07  9:16 ` [PATCH v3 05/23] drm: malidp: " Shawn Guo
2017-02-07 15:22   ` Liviu Dudau
2017-02-07  9:16 ` [PATCH v3 06/23] drm: armada: " Shawn Guo
2017-02-07 10:23   ` Russell King - ARM Linux
2017-02-07  9:16 ` [PATCH v3 07/23] drm: atmel: " Shawn Guo
2017-02-07  9:46   ` Boris Brezillon
2017-02-07  9:16 ` [PATCH v3 08/23] drm: exynos: " Shawn Guo
2017-02-07 10:47   ` Andrzej Hajda
2017-02-07  9:16 ` [PATCH v3 09/23] drm: fsl-dcu: " Shawn Guo
2017-02-08  5:01   ` Stefan Agner
2017-02-08 12:04     ` Daniel Vetter
2017-02-07  9:16 ` [PATCH v3 10/23] drm: hibmc: " Shawn Guo
2017-02-08 15:39   ` Sean Paul
2017-02-16  3:28   ` Xinliang Liu
2017-02-07  9:16 ` [PATCH v3 11/23] drm: kirin: " Shawn Guo
2017-02-16  3:23   ` Xinliang Liu
2017-02-21 16:20     ` Sean Paul
2017-02-07  9:16 ` [PATCH v3 12/23] drm: imx: remove struct imx_drm_crtc and imx_drm_crtc_helper_funcs Shawn Guo
2017-02-07 10:10   ` Philipp Zabel
2017-02-07  9:16 ` [PATCH v3 13/23] drm: mediatek: use vblank hooks in struct drm_crtc_funcs Shawn Guo
2017-02-21 16:21   ` Sean Paul
2017-02-07  9:16 ` [PATCH v3 14/23] drm: meson: " Shawn Guo
2017-02-07 10:09   ` Neil Armstrong
2017-02-07  9:16 ` [PATCH v3 15/23] drm: qxl: " Shawn Guo
2017-02-21 16:21   ` Sean Paul
2017-02-07  9:16 ` [PATCH v3 16/23] drm: rcar-du: " Shawn Guo
2017-02-07 14:03   ` Laurent Pinchart
2017-02-07  9:16 ` [PATCH v3 17/23] drm: rockchip: remove struct rockchip_crtc_funcs Shawn Guo
2017-02-07 15:35   ` Sean Paul
2017-02-07  9:16 ` [PATCH v3 18/23] drm: shmobile: use vblank hooks in struct drm_crtc_funcs Shawn Guo
2017-02-07 14:05   ` Laurent Pinchart
2017-02-07  9:16 ` [PATCH v3 19/23] drm: sun4i: " Shawn Guo
2017-02-07  9:28   ` Maxime Ripard
2017-02-07  9:16 ` [PATCH v3 20/23] drm: tegra: " Shawn Guo
2017-02-07 11:02   ` Thierry Reding
2017-02-07  9:16 ` [PATCH v3 21/23] drm: tilcdc: " Shawn Guo
2017-02-07  9:38   ` Jyri Sarha
2017-02-07  9:16 ` [PATCH v3 22/23] drm: vc4: " Shawn Guo
2017-02-08 19:56   ` Eric Anholt
2017-02-07  9:16 ` [PATCH v3 23/23] drm: zte: " Shawn Guo
2017-02-07 15:34   ` Sean Paul
2017-02-08 11:30 ` [PATCH v3 00/23] Add vblank hooks to " Tomi Valkeinen
2017-02-08 18:10   ` Laurent Pinchart
2017-02-08 18:24     ` Daniel Vetter
2017-02-08 15:49 ` Sean Paul
2017-02-09  8:36   ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.