From 50b3755b7d26edf2c228d0fbf347783edf168a1c Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 31 Jul 2009 15:09:12 -0700 Subject: [PATCH] don't send the GPU master fd across to client processes --- libcopybit/copybit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcopybit/copybit.cpp b/libcopybit/copybit.cpp index 60adc48..6a4993c 100644 --- a/libcopybit/copybit.cpp +++ b/libcopybit/copybit.cpp @@ -122,9 +122,9 @@ static void set_image(struct mdp_img *img, const struct copybit_image_t *rhs) img->height = rhs->h; img->format = get_format(rhs->format); img->offset = hnd->offset; - img->memory_id = hnd->fd; + img->memory_id = (hnd->flags & private_handle_t::PRIV_FLAGS_USES_GPU) + ? hnd->gpu_fd : hnd->fd; } - /** setup rectangles */ static void set_rects(struct copybit_context_t *dev, struct mdp_blit_req *e,