lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1454060626-21428-1-git-send-email-p.zabel@pengutronix.de>
Date:	Fri, 29 Jan 2016 10:43:46 +0100
From:	Philipp Zabel <p.zabel@...gutronix.de>
To:	dri-devel@...ts.freedesktop.org
Cc:	David Airlie <airlied@...ux.ie>, linux-kernel@...r.kernel.org,
	Lucas Stach <l.stach@...gutronix.de>,
	Philipp Zabel <p.zabel@...gutronix.de>
Subject: [PATCH] drm/imx: notify DRM core about CRTC vblank state

From: Lucas Stach <l.stach@...gutronix.de>

Make sure the DRM core is aware that there will be no vblank interrupts
incoming if the CRTC is disabled. That way the core will reject any
attempts from userspace to wait on a vblank event on a disabled CRTC.

Signed-off-by: Lucas Stach <l.stach@...gutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@...gutronix.de>
---
 drivers/gpu/drm/imx/ipuv3-crtc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c
index 4ab841e..73537c8 100644
--- a/drivers/gpu/drm/imx/ipuv3-crtc.c
+++ b/drivers/gpu/drm/imx/ipuv3-crtc.c
@@ -64,6 +64,7 @@ static void ipu_fb_enable(struct ipu_crtc *ipu_crtc)
 	/* Start DC channel and DI after IDMAC */
 	ipu_dc_enable_channel(ipu_crtc->dc);
 	ipu_di_enable(ipu_crtc->di);
+	drm_crtc_vblank_on(&ipu_crtc->base);
 
 	ipu_crtc->enabled = 1;
 }
@@ -80,6 +81,7 @@ static void ipu_fb_disable(struct ipu_crtc *ipu_crtc)
 	ipu_di_disable(ipu_crtc->di);
 	ipu_plane_disable(ipu_crtc->plane[0]);
 	ipu_dc_disable(ipu);
+	drm_crtc_vblank_off(&ipu_crtc->base);
 
 	ipu_crtc->enabled = 0;
 }
-- 
2.7.0.rc3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ