uterm: video: ignore NULL buffers in vector requests
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>
This commit is contained in:
parent
d8620f05c1
commit
ed969b99a8
@ -766,6 +766,9 @@ static int display_fake_blendv(struct uterm_display *disp,
|
||||
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);
|
||||
|
@ -518,6 +518,9 @@ static int display_fake_blendv(struct uterm_display *disp,
|
||||
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;
|
||||
|
||||
|
@ -651,6 +651,9 @@ static int display_fake_blendv(struct uterm_display *disp,
|
||||
return -EINVAL;
|
||||
|
||||
for (j = 0; j < num; ++j, ++req) {
|
||||
if (!req->buf)
|
||||
continue;
|
||||
|
||||
if (req->buf->format != UTERM_FORMAT_GREY)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user