diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-07-26 23:02:02 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-07-26 23:02:02 +0200 |
commit | f46a8dfce59013ce593c15f7166598d0fff9198f (patch) | |
tree | 2c18dd0ad9c41413b3b1397c872678b8a17d1940 /src | |
parent | 1cb69b9a77b7afbb4358757556065e10a6b15ea8 (diff) |
video: kill do { ... } while (ret != -EINTR) loops
Chris Wilson likes to sprinkle these all over, but in this
case it's just misleading. libdrm already does this for us.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel_video.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/intel_video.c b/src/intel_video.c index a6b26843..a9d49429 100644 --- a/src/intel_video.c +++ b/src/intel_video.c @@ -215,9 +215,7 @@ static Bool drmmode_has_overlay(intel_screen_private *intel) gp.param = I915_PARAM_HAS_OVERLAY; gp.value = &has_overlay; - do { - ret = drmCommandWriteRead(intel->drmSubFD, DRM_I915_GETPARAM, &gp, sizeof(gp)); - } while (ret == -EINTR); + ret = drmCommandWriteRead(intel->drmSubFD, DRM_I915_GETPARAM, &gp, sizeof(gp)); return !! has_overlay; } @@ -240,10 +238,8 @@ static void drmmode_overlay_update_attrs(intel_screen_private *intel) attrs.gamma4 = adaptor_priv->gamma4; attrs.gamma5 = adaptor_priv->gamma5; - do { - ret = drmCommandWriteRead(intel->drmSubFD, DRM_I915_OVERLAY_ATTRS, - &attrs, sizeof(attrs)); - } while (ret == -EINTR); + ret = drmCommandWriteRead(intel->drmSubFD, DRM_I915_OVERLAY_ATTRS, + &attrs, sizeof(attrs)); } static void drmmode_overlay_off(intel_screen_private *intel) @@ -253,10 +249,8 @@ static void drmmode_overlay_off(intel_screen_private *intel) request.flags = 0; - do { - ret = drmCommandWrite(intel->drmSubFD, DRM_I915_OVERLAY_PUT_IMAGE, - &request, sizeof(request)); - } while (ret == -EINTR); + ret = drmCommandWrite(intel->drmSubFD, DRM_I915_OVERLAY_PUT_IMAGE, + &request, sizeof(request)); } static Bool @@ -319,10 +313,8 @@ drmmode_overlay_put_image(intel_screen_private *intel, request.flags |= I915_OVERLAY_Y_SWAP; } - do { - ret = drmCommandWrite(intel->drmSubFD, DRM_I915_OVERLAY_PUT_IMAGE, - &request, sizeof(request)); - } while (ret == -EINTR); + ret = drmCommandWrite(intel->drmSubFD, DRM_I915_OVERLAY_PUT_IMAGE, + &request, sizeof(request)); if (ret) return FALSE; |