make sure to use the right 32-bit pixelformat on msm7k when using the gpu

This commit is contained in:
Mathias Agopian 2009-08-07 19:09:35 -07:00
parent 5b70faa81d
commit 32a0f80413

View File

@ -123,8 +123,15 @@ static void set_image(struct mdp_img *img, const struct copybit_image_t *rhs)
img->format = get_format(rhs->format);
img->offset = hnd->offset;
#if defined(COPYBIT_MSM7K)
img->memory_id = (hnd->flags & private_handle_t::PRIV_FLAGS_USES_GPU)
? hnd->gpu_fd : hnd->fd;
if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_GPU) {
img->memory_id = hnd->gpu_fd;
if (img->format == MDP_RGBA_8888) {
// msm7201A GPU only supports BGRA_8888 destinations
img->format = MDP_BGRA_8888;
}
} else {
img->memory_id = hnd->fd;
}
#else
img->memory_id = hnd->fd;
#endif