From 338e1ee0633b29245daf0ac1a82aabcad812876c Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Mon, 22 Oct 2012 14:00:39 +0200 Subject: [PATCH] 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 --- src/uterm_video_dumb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uterm_video_dumb.c b/src/uterm_video_dumb.c index 8df6202..c95d5aa 100644 --- a/src/uterm_video_dumb.c +++ b/src/uterm_video_dumb.c @@ -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; -- 2.7.4