[PATCH 0/4] Add vblank hooks to struct drm_crtc_funcs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Shawn Guo <shawn.guo@xxxxxxxxxx>

Although it can help to clean up driver code quite a bit, I'm not sure
it's been done in the right way.  So the series can be treated as RFC.

When I was going through DRM drivers for candidates of using
drm_crtc_from_index() helper, I found vblank handling is mostly a CRTC
specific thing.  A few drivers (imx and rockchip) even have defined
their own hooks and registration functions to handle per-CRTC vblank
callbacks.  The series is trying to demonstrate how these driver code
can be cleaned up by simply adding a couple of vblank hooks to
struct drm_crtc_funcs.

The ZTE DRM driver doesn't have per-CRTC vblank callbacks.  It uses the
same pair of vblank functions for both CRTCs.  But it's being included
here to show the benefit of saving vblank function exporting.

Rockchip is compile-tested, while ZTE and IMX drivers are tested on
hardware.

Shawn Guo (4):
  drm: add vblank hooks to struct drm_crtc_funcs
  drm: zte: zx_vou_enable[disable]_vblank can be static
  drm: rockchip: remove struct rockchip_crtc_funcs
  drm: imx: remove struct imx_drm_crtc and imx_drm_crtc_helper_funcs

 drivers/gpu/drm/drm_crtc.c                  |  36 ++++++++++
 drivers/gpu/drm/imx/imx-drm-core.c          | 103 +---------------------------
 drivers/gpu/drm/imx/imx-drm.h               |  13 ----
 drivers/gpu/drm/imx/ipuv3-crtc.c            |  58 ++++++----------
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c |  53 +-------------
 drivers/gpu/drm/rockchip/rockchip_drm_drv.h |  14 ----
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c |   9 +--
 drivers/gpu/drm/zte/zx_drm_drv.c            |   4 +-
 drivers/gpu/drm/zte/zx_vou.c                |  61 +++++++---------
 drivers/gpu/drm/zte/zx_vou.h                |   3 -
 include/drm/drm_crtc.h                      |  21 ++++++
 11 files changed, 110 insertions(+), 265 deletions(-)

-- 
1.9.1

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux