sna/overlay: Handle return from GETPARAM query correctly

drmIoctl() returns 0 on success, not a positive value.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-05-29 22:21:05 +01:00
parent 68874e2d69
commit e986b06162
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ static Bool sna_has_overlay(struct sna *sna)
gp.param = I915_PARAM_HAS_OVERLAY;
gp.value = &has_overlay;
ret = drmIoctl(sna->kgem.fd, DRM_IOCTL_I915_GETPARAM, &gp);
return ret > 0 && has_overlay;
return ret == 0 && has_overlay;
}
static Bool sna_video_overlay_update_attrs(struct sna *sna,