egl/dri2: implement createImageFromDmaBufs3
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 25 Sep 2020 13:51:06 +0000 (15:51 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 2 Nov 2020 09:15:47 +0000 (10:15 +0100)
commit9b0ffa9ecded84dedb2754f779c9be13e092033c
tree357611c6daecf3003f2d287f6c063261cb367f37
parentd9582ff39e025a620518982bbde888970d67adae
egl/dri2: implement createImageFromDmaBufs3

And refuse to import image with protected_content enabled.

We don't want a compositor to import an encrypted buffer in a image
without the ProtectedContent attribute enabled, because that will
lead to incorrect display.

Similarly, if the compositor thinks the image is encrypted, we fail
the import if the buffer is not.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5096>
src/egl/drivers/dri2/egl_dri2.c
src/gallium/frontends/dri/dri2.c