Skip to content

Commit

Permalink
drm/irq: Remove negative CRTC index special-case
Browse files Browse the repository at this point in the history
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 <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Thierry Reding authored and Daniel Vetter committed Aug 12, 2015
1 parent b54a093 commit 2a7d3d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2a7d3d6

Please sign in to comment.