Skip to content

Add vblank hooks to struct drm_crtc_funcs

Shawn Guo dri-devel 3 versions – Applied

Status from this message: Applied to -misc

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest23 patches 44 repliesApplied
  2. v2 RFC5 patches 5 repliesSuperseded
  3. v14 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- 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.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/23drm: add vblank hooks to struct drm_crtc_funcsdrivers/gpu/drm/drm_irq.c include/drm/drm_crtc.h include/drm/drm_drv.h+100 -65 replies
2/23drm: remove drm_vblank_no_hw_counter assignment from driver codedrivers/gpu/drm/arc/arcpgu_drv.c drivers/gpu/drm/arm/hdlcd_drv.c drivers/gpu/drm/arm/malidp_drv.c +22 more+0 -2511 replies
3/23drm: unexport function drm_vblank_no_hw_counter()drivers/gpu/drm/drm_irq.c include/drm/drm_drv.h include/drm/drm_irq.h+13 -231 reply
4/23drm: hdlcd: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/arm/hdlcd_crtc.c drivers/gpu/drm/arm/hdlcd_drv.c+20 -200 replies
5/23drm: malidp: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/arm/malidp_crtc.c drivers/gpu/drm/arm/malidp_drv.c+21 -211 reply
6/23drm: armada: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/armada/armada_crtc.c drivers/gpu/drm/armada/armada_crtc.h drivers/gpu/drm/armada/armada_drv.c+37 -371 reply
7/23drm: atmel: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c+21 -211 reply
8/23drm: exynos: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/exynos/exynos_drm_crtc.c drivers/gpu/drm/exynos/exynos_drm_crtc.h drivers/gpu/drm/exynos/exynos_drm_drv.c +2 more+25 -351 reply
9/23drm: fsl-dcu: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c+26 -252 replies
10/23drm: hibmc: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c+20 -222 replies
11/23drm: kirin: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c+4 -62 replies
12/23drm: imx: remove struct imx_drm_crtc and imx_drm_crtc_helper_funcsdrivers/gpu/drm/imx/imx-drm-core.c drivers/gpu/drm/imx/imx-drm.h drivers/gpu/drm/imx/ipuv3-crtc.c+22 -1501 reply
13/23drm: mediatek: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/mediatek/mtk_drm_crtc.c drivers/gpu/drm/mediatek/mtk_drm_crtc.h drivers/gpu/drm/mediatek/mtk_drm_drv.c+4 -91 reply
14/23drm: meson: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/meson/meson_crtc.c drivers/gpu/drm/meson/meson_drv.c+22 -201 reply
15/23drm: qxl: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/qxl/qxl_display.c drivers/gpu/drm/qxl/qxl_drv.c+16 -181 reply
16/23drm: rcar-du: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/rcar-du/rcar_du_crtc.c drivers/gpu/drm/rcar-du/rcar_du_crtc.h drivers/gpu/drm/rcar-du/rcar_du_drv.c+19 -301 reply
17/23drm: rockchip: remove struct rockchip_crtc_funcsdrivers/gpu/drm/rockchip/rockchip_drm_drv.c drivers/gpu/drm/rockchip/rockchip_drm_drv.h drivers/gpu/drm/rockchip/rockchip_drm_vop.c+2 -721 reply
18/23drm: shmobile: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/shmobile/shmob_drm_crtc.c drivers/gpu/drm/shmobile/shmob_drm_crtc.h drivers/gpu/drm/shmobile/shmob_drm_drv.c+35 -361 reply
19/23drm: sun4i: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/sun4i/sun4i_crtc.c drivers/gpu/drm/sun4i/sun4i_drv.c+24 -271 reply
20/23drm: tegra: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.c drivers/gpu/drm/tegra/drm.h+12 -441 reply
21/23drm: tilcdc: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/tilcdc/tilcdc_crtc.c drivers/gpu/drm/tilcdc/tilcdc_drv.c+11 -121 reply
22/23drm: vc4: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/vc4/vc4_crtc.c drivers/gpu/drm/vc4/vc4_drv.c drivers/gpu/drm/vc4/vc4_drv.h+4 -81 reply
23/23drm: zte: use vblank hooks in struct drm_crtc_funcsdrivers/gpu/drm/zte/zx_drm_drv.c drivers/gpu/drm/zte/zx_vou.c drivers/gpu/drm/zte/zx_vou.h+23 -431 reply

Reviews trailers per patch

21 of 23 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLiviu DudauMaxime RipardJyri SarhaBoris BrezillonNeil ArmstrongPhilipp ZabelRussell KingAndrzej HajdaLaurent PinchartThierry RedingAlexey BrodkinSean PaulStefan AgnerEric AnholtXinliang Liu
SeriesR-b
1/23R-b R-b A-b
2/23A-b A-b A-b A-b A-b R-b A-b A-b
3/23R-b
4/23A-b
5/23A-b
6/23A-b
7/23A-b
8/23R-b
9/23A-b
10/23R-b R-b
11/23R-b
12/23A-b
13/23
14/23A-b
15/23
16/23R-b
17/23R-b
18/23R-b
19/23A-b
20/23A-b
21/23A-b
22/23R-b
23/23R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 15 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/23] Add vblank hooks to struct drm_crtc_funcs

From: Shawn Guo <[email protected]>

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(-)
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel