[PATCH v2 06/10] drm/hisilicon: Add vblank feature
From: xinliang.liu@linaro.org (Xinliang Liu)
Date: 2015-12-01 10:34:43
Also in:
dri-devel, linux-devicetree
On 1 December 2015 at 15:13, Daniel Vetter [off-list ref] wrote:
On Tue, Dec 01, 2015 at 11:16:19AM +0800, Xinliang Liu wrote:quoted
On 30 November 2015 at 15:54, Daniel Vetter [off-list ref] wrote:quoted
On Sat, Nov 28, 2015 at 06:39:01PM +0800, Xinliang Liu wrote:quoted
Add vblank handle for ADE. Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org> Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com> Signed-off-by: Andy Green <redacted> --- drivers/gpu/drm/hisilicon/hisi_drm_ade.c | 78 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/hisilicon/hisi_drm_ade.h | 16 +++++++ drivers/gpu/drm/hisilicon/hisi_drm_drv.c | 19 +++++++- 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/hisilicon/hisi_drm_ade.hdiff --git a/drivers/gpu/drm/hisilicon/hisi_drm_ade.c b/drivers/gpu/drm/hisilicon/hisi_drm_ade.c index b0976c3..acb11e7 100644 --- a/drivers/gpu/drm/hisilicon/hisi_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/hisi_drm_ade.c@@ -267,7 +267,79 @@ static void ade_power_down(struct ade_hw_ctx *ctx) ctx->power_on = false; } +static struct drm_crtc *hisi_get_crtc_from_index(struct drm_device *dev, + unsigned int index)Ugly that you had to add this, but unfortunately necessary :( Fixing up the drm vblank hooks so that they deal with struct drm_crtc directly is somewhere on my todo. But drm_irq.c is still a bit a mess, so this is some ways off still. What might be possible as a follow-up cleanup though is to add vblank_enable and vblank_disable functions to struct drm_crtc_helper_funcs. And then provide this code here to map from int index to struct drm_crtc * as helpers in a new drm_vblank_helper.c file. That might be a good intermediate step.I would like to have a try to make this intermediate step patch and send out for review soon.Awesome, looking forward to reviewing it. If you have questions about details fastest to ping me on irc (nick: danvet, #dri-devel on freenode.net).
Great! What't your time zone. So that I can ping you in right time. Thanks, -xinliang
Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch