sna: Handle failure to disable old plane when switching CRTCs

If we fail to disable the old plane, abort the PutImage and report the
error.

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
This commit is contained in:
Zdenek Kabelac 2013-11-25 09:57:19 +00:00 committed by Chris Wilson
parent 00dcb4f229
commit af4995d74b
1 changed files with 4 additions and 1 deletions

View File

@ -315,7 +315,10 @@ sna_video_sprite_show(struct sna *sna,
if (video->plane) {
memset(&s, 0, sizeof(s));
s.plane_id = video->plane;
drmIoctl(video->sna->kgem.fd, DRM_IOCTL_MODE_SETPLANE, &s);
if (drmIoctl(video->sna->kgem.fd, DRM_IOCTL_MODE_SETPLANE, &s)) {
DBG(("SET_PLANE failed to turn off existing sprite: ret=%d\n", errno));
return false;
}
}
video->plane = s.plane_id;
}