sna: Allow the throttling to be woken by SIGINT
Rather than completely starve X from handling input events and raising the spectre of miEQ overflow, stop throttling upon SIGINT. We will have waited a small period of time (~100ms) for the GPU to catch up, and will do so again in the near future. This also preserves the hang detection. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
15b92c9875
commit
dc8f2def54
|
|
@ -757,7 +757,11 @@ static bool test_has_semaphores_enabled(struct kgem *kgem)
|
|||
|
||||
static bool __kgem_throttle(struct kgem *kgem)
|
||||
{
|
||||
if (drmIoctl(kgem->fd, DRM_IOCTL_I915_GEM_THROTTLE, NULL) == 0)
|
||||
/* Let this be woken up by sigtimer so that we don't block here
|
||||
* too much and completely starve X. We will sleep again shortly,
|
||||
* and so catch up or detect the hang.
|
||||
*/
|
||||
if (ioctl(kgem->fd, DRM_IOCTL_I915_GEM_THROTTLE) == 0)
|
||||
return false;
|
||||
|
||||
return errno == EIO;
|
||||
|
|
|
|||
Loading…
Reference in New Issue