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:
parent
68874e2d69
commit
e986b06162
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue