Skip to content

Commit 2a7d3d6

Browse files
thierryredingdanvet
authored andcommitted
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 <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent b54a093 commit 2a7d3d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ void drm_send_vblank_event(struct drm_device *dev, int crtc,
971971
struct timeval now;
972972
unsigned int seq;
973973

974-
if (crtc >= 0) {
974+
if (dev->num_crtcs > 0) {
975975
seq = drm_vblank_count_and_time(dev, crtc, &now);
976976
} else {
977977
seq = 0;

0 commit comments

Comments
 (0)