[PATCH] drm: Make sure drm_vblank_no_hw_counter isn't abused
Daniel Vetter
daniel.vetter at ffwll.ch
Mon Aug 8 16:24:53 UTC 2016
Shouldn't be possible since everyone kzallocs this, but better safe
than sorry. Random drive-by-idea really.
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
drivers/gpu/drm/drm_irq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index f5a9f8cef360..10611a936059 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -1795,6 +1795,7 @@ EXPORT_SYMBOL(drm_crtc_handle_vblank);
*/
u32 drm_vblank_no_hw_counter(struct drm_device *dev, unsigned int pipe)
{
+ WARN_ON_ONCE(dev->max_vblank_count != 0);
return 0;
}
EXPORT_SYMBOL(drm_vblank_no_hw_counter);
--
2.8.1
More information about the dri-devel
mailing list