]> git.baikalelectronics.ru Git - kernel.git/commit
DRM/KMS: Add Bail-Out Conditions for Loop.
authorEgbert Eich <eich@suse.de>
Sat, 13 Oct 2012 11:36:14 +0000 (11:36 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Nov 2012 06:07:49 +0000 (16:07 +1000)
commitc0be93a22f48efa0fd74eb480fbf47da3dd00140
treee0693690f5c6633c7be9a967914e0d5dd83fe743
parentc9ce241408a90330762a96f3832376fa3133d21f
DRM/KMS: Add Bail-Out Conditions for Loop.

When trying to obtain an accurate timestamp for the last vsync interrupt
in vblank_disable_and_save() we loop until the vsync counter after reading
the time stamp is identical to the one before.
In the case where no hardware timestamp can be obtained there is probably
no point in trying to make sure we remain within the same vsync during
the time we obtain the counter.
Furthermore we should make sure there's an 'emergency exit' so that we
don't end up in an endless loop when the driver get_vblank_timestamp()
function doesn't manage to return within the same vsync.
This may happen when this function prints out debugging information over
a slow (ie serial) line.

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_irq.c