From: Shawn Guo <shawnguo@kernel.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: [PATCH 0/4] Add vblank hooks to struct drm_crtc_funcs
Date: Mon, 9 Jan 2017 19:56:23 +0800 [thread overview]
Message-ID: <1483962987-19011-1-git-send-email-shawnguo@kernel.org> (raw)
From: Shawn Guo <shawn.guo@linaro.org>
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2017-01-09 11:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 11:56 Shawn Guo [this message]
2017-01-09 11:56 ` [PATCH 1/4] drm: add vblank hooks to struct drm_crtc_funcs Shawn Guo
2017-01-10 10:39 ` Daniel Vetter
2017-01-10 20:21 ` Laurent Pinchart
2017-01-09 11:56 ` [PATCH 2/4] drm: zte: zx_vou_enable[disable]_vblank can be static Shawn Guo
2017-01-09 11:56 ` [PATCH 3/4] drm: rockchip: remove struct rockchip_crtc_funcs Shawn Guo
2017-01-09 11:56 ` [PATCH 4/4] drm: imx: remove struct imx_drm_crtc and imx_drm_crtc_helper_funcs Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1483962987-19011-1-git-send-email-shawnguo@kernel.org \
--to=shawnguo@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox