uterm: dumb: clear buffer on allocation

DRM buffers are not guaranteed to be cleared after allocation. This is to
boost performance for small buffers that are allocated and freed often.
However, for render-buffers we can clear them without loosing any
performance as they are allocated once and then only freed on shutdown.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-10-22 14:00:39 +02:00
parent ebce60a86a
commit 338e1ee063

View File

@ -110,6 +110,7 @@ static int init_rb(struct uterm_display *disp, struct dumb_rb *rb)
ret = -EFAULT;
goto err_fb;
}
memset(rb->map, 0, rb->size);
return 0;