From: Lepton Wu Date: Wed, 4 Sep 2019 18:53:37 +0000 (-0700) Subject: virgl: Remove wrong EAGAIN handling for drmIoctl X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=417d602fdad22042ff1f90176f10c486a3bb0e9a;p=mesa.git virgl: Remove wrong EAGAIN handling for drmIoctl drmIoctl handles EAGAIN itself and actually it always return -1 on errors. Remove the wrong handling of its return value. Also, print a warning when it fails. v2: - use _debug_printf instead of fprintf (Gurchetan Singh) Signed-off-by: Lepton Wu Reviewed-by: Eric Anholt (v1) --- diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index 8f557bd06c1..cc4371fb5fd 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -467,10 +467,10 @@ static void virgl_drm_resource_wait(struct virgl_winsys *qws, memset(&waitcmd, 0, sizeof(waitcmd)); waitcmd.handle = res->bo_handle; - again: + ret = drmIoctl(qdws->fd, DRM_IOCTL_VIRTGPU_WAIT, &waitcmd); - if (ret == -EAGAIN) - goto again; + if (ret) + _debug_printf("waiting got error - %d, slow gpu or hang?\n", errno); p_atomic_set(&res->maybe_busy, false); }