diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-29 22:21:05 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-29 22:21:05 +0100 |
commit | e986b06162abf286b3f8f97b791fd66dcf8f9aec (patch) | |
tree | d624be42a94f1dee784978f748de6e7db7ef3167 /src | |
parent | 68874e2d694cc68f5f051ba5fe4a79a71fdb2dbc (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_video_overlay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c index c39bbfc8..945818a5 100644 --- a/src/sna/sna_video_overlay.c +++ b/src/sna/sna_video_overlay.c @@ -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, |