From: Thierry Reding Date: Wed, 12 Aug 2015 15:00:24 +0000 (+0200) Subject: drm/irq: Remove negative CRTC index special-case X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2a7d3d6d5ddbd202c09f228829cd03609a8efb23;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/irq: Remove negative CRTC index special-case The drm_send_vblank_event() function treats negative CRTC indices as meaning that a driver doesn't have proper VBLANK handling. This is the only place where DRM needs negative CRTC indices, so in order to enable subsequent cleanup, remove this special case and replace it by the more obvious check for whether or not VBLANK support was initialized. Signed-off-by: Thierry Reding Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 9fd784b8966b..120a16fe15c2 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -971,7 +971,7 @@ void drm_send_vblank_event(struct drm_device *dev, int crtc, struct timeval now; unsigned int seq; - if (crtc >= 0) { + if (dev->num_crtcs > 0) { seq = drm_vblank_count_and_time(dev, crtc, &now); } else { seq = 0;