uterm: fbdev: map FBs for read access
We want to provide read-access to users of get_buffers() so map memory with PROT_READ. However, read is almost always horribly slow so this should only be used as fallback. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
3eb9cc6f50
commit
2fd3afc10b
@ -298,7 +298,7 @@ static int display_activate_force(struct uterm_display *disp,
|
|||||||
if (disp->flags & DISPLAY_DBUF)
|
if (disp->flags & DISPLAY_DBUF)
|
||||||
len *= 2;
|
len *= 2;
|
||||||
|
|
||||||
dfb->map = mmap(0, len, PROT_WRITE, MAP_SHARED, dfb->fd, 0);
|
dfb->map = mmap(0, len, PROT_READ | PROT_WRITE, MAP_SHARED, dfb->fd, 0);
|
||||||
if (dfb->map == MAP_FAILED) {
|
if (dfb->map == MAP_FAILED) {
|
||||||
log_error("cannot mmap device %s (%d): %m", dfb->node,
|
log_error("cannot mmap device %s (%d): %m", dfb->node,
|
||||||
errno);
|
errno);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user