diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2016-02-09 11:43:08 +0100 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-03-01 08:33:41 +0100 |
commit | 411b0336cf9fc988ff11de3f1e66587fe88fb980 (patch) | |
tree | 30ab65d1a4c51675ef05dbd524bdb47ff85605f6 | |
parent | 17a8d08df107a903ccdd5e7733ab9f0a796fac5c (diff) | |
download | linux-imx-drm-next-20160301.tar.gz linux-imx-drm-next-20160301.tar.xz |
drm/imx: only enable vblank IRQs when neededimx-drm-next-20160301
The vblank IRQ is only needed to trigger page flip work, so we
might as well disable it when there is no work to do.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-rw-r--r-- | drivers/gpu/drm/imx/ipuv3-crtc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c index e6ae0176b7c3..4bea0ddb3f3e 100644 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c @@ -379,11 +379,18 @@ static const struct drm_crtc_helper_funcs ipu_helper_funcs = { static int ipu_enable_vblank(struct drm_crtc *crtc) { + struct ipu_crtc *ipu_crtc = to_ipu_crtc(crtc); + + enable_irq(ipu_crtc->irq); + return 0; } static void ipu_disable_vblank(struct drm_crtc *crtc) { + struct ipu_crtc *ipu_crtc = to_ipu_crtc(crtc); + + disable_irq_nosync(ipu_crtc->irq); } static int ipu_set_interface_pix_fmt(struct drm_crtc *crtc, @@ -494,6 +501,8 @@ static int ipu_crtc_init(struct ipu_crtc *ipu_crtc, dev_err(ipu_crtc->dev, "irq request failed with %d.\n", ret); goto err_put_plane_res; } + /* Only enable IRQ when we actually need it to trigger work. */ + disable_irq(ipu_crtc->irq); ipu_crtc->flip_queue = create_singlethread_workqueue("ipu-crtc-flip"); |