drm: Refactor vblank sequence number comparison
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 22 Mar 2017 10:06:50 +0000 (10:06 +0000)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 29 Mar 2017 11:00:36 +0000 (14:00 +0300)
commit9a4d9babceeabb86669ff280e94c560193e66a72
tree18b26545cea53c8f5b53e79538a5cfca81641e9b
parent6c06a59703946d2f133c067629eb911bb58ff3a6
drm: Refactor vblank sequence number comparison

Move the repeated (a - b) <= (1 << 23) to its own function.

v2: Catch the '1<<23' inside drm_handle_vblank() as well

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Michel Dänzer <michel@daenzer.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170322100650.26082-1-chris@chris-wilson.co.uk
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/drm_irq.c