When multiple requests are pushed into the video backends at once, we
should ignore NULL buffers. Otherwise, users might have to re-order
buffers just so we don't segfault. Instead, we now ignore them and the
application can set requests to NULL to signal us that it is unused.
This fixes some bugs with multi-monitor setups and kmscon.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
return -EINVAL;
for (i = 0; i < num; ++i, ++req) {
+ if (!req->buf)
+ continue;
+
ret = display_blend(disp, req->buf, req->x, req->y,
req->fr, req->fg, req->fb,
req->br, req->bg, req->bb);
sh = disp->current_mode->dumb.info.vdisplay;
for (j = 0; j < num; ++j, ++req) {
+ if (!req->buf)
+ continue;
+
if (req->buf->format != UTERM_FORMAT_GREY)
return -EOPNOTSUPP;
return -EINVAL;
for (j = 0; j < num; ++j, ++req) {
+ if (!req->buf)
+ continue;
+
if (req->buf->format != UTERM_FORMAT_GREY)
return -EOPNOTSUPP;