From: Daniel Vetter Date: Mon, 8 Aug 2016 16:24:53 +0000 (+0200) Subject: drm: Make sure drm_vblank_no_hw_counter isn't abused X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cfc5adea1955ee8ddb62cc0d20ee454472033b6a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm: Make sure drm_vblank_no_hw_counter isn't abused Shouldn't be possible since everyone kzallocs this, but better safe than sorry. Random drive-by-idea really. Cc: Rodrigo Vivi Signed-off-by: Daniel Vetter Reviewed-by: Rodrigo Vivi Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470673493-14304-1-git-send-email-daniel.vetter@ffwll.ch --- diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 97c70642dbe1..c0c3f2006203 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -1826,6 +1826,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);