egl/wayland: for prime, allocate linear_copy from display GPU VRAM
authorYogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Wed, 20 Oct 2021 14:48:05 +0000 (20:18 +0530)
committerMarge Bot <emma+marge@anholt.net>
Tue, 24 Jan 2023 12:51:35 +0000 (12:51 +0000)
commit967b9ad084ecf28f639aeb21b5bdf76813e65a8a
treef3ed8e2e43dbe02a7dbda02f92089b1b1159e061
parent42a46f2c5f169c4f06db3a7d1e944fcf34b36e82
egl/wayland: for prime, allocate linear_copy from display GPU VRAM

Allocates VRAM in display GPU in case of prime. Then the dma_buf is imported
into prime GPU.

v4: add image tag to __DRIimage (Marek Olšák)
v3: move display fd opening to separate commit (Pierre-Eric)
    image_format_to_fourcc() non-static to seperate commit (Pierre-Eric)
v2: close query fds after linear_copy buffer import (Marek Olšák)
    use image_format_to_fourcc() from loader_dri3_helper.c (Marek Olšák)

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
src/egl/drivers/dri2/platform_wayland.c