loader: allocate VRAM in display GPU in case of prime

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

v2: add comments to make code more readable (Pierre-Eric)
    removed if check limiting p2p only for matching driver name
v3: keep old path for non mesa driver (Michel Dänzer)
v4: destroy linear_buffer_display_gpu after import (Michel Dänzer)
    fall back if linear_buffer_display_gpu alloc fail (Michel Dänzer)

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
129 jobs for !10595 with prime_memory_move in 22 minutes and 20 seconds (queued for 14 seconds)
detached
Status Job ID Name Coverage
  Sanity
passed #9757791
sanity

00:00:16

 
  Container
passed #9757794
aarch64 manual
arm_build

00:00:28

passed #9757795
windows shell 1809 mesa manual
windows_build_vs2019

00:00:14

passed #9757792
manual
x86_build-base

00:00:23

passed #9757793
manual
x86_test-base

00:00:23

 
  Container 2
passed #9757800
android_build

00:00:24

passed #9757797
i386_build

00:00:25

passed #9757803
kernel+rootfs_amd64

00:00:24

passed #9757804
aarch64
kernel+rootfs_arm64

00:00:56

passed #9757805
aarch64
kernel+rootfs_armhf

00:00:13

passed #9757798
ppc64el_build

00:00:25

passed #9757799
s390x_build

00:00:24

passed #9757796
x86_build

00:00:29

passed #9757801
x86_test-gl

00:00:30

passed #9757802
x86_test-vk

00:00:27

 
  Meson X86 64
passed #9757811
meson-clang

00:04:46

passed #9757812
meson-clover

00:05:00

passed #9757808
meson-clover-testing

00:04:12

passed #9757809
meson-gallium

00:10:21

passed #9757810
meson-release

00:08:38

passed #9757806
meson-testing

00:03:31

passed #9757807
meson-testing-asan

00:12:58

passed #9757813
meson-vulkan

00:02:53

 
  Build Misc
passed #9757814
arm_test

00:00:30

passed #9757815
meson-android

00:01:29

passed #9757817
aarch64
meson-arm64

00:04:26

passed #9757818
aarch64
meson-arm64-asan

00:09:06

passed #9757819
aarch64
meson-arm64-build-test

00:04:15

passed #9757816
aarch64
meson-armhf

00:05:09

passed #9757821
meson-i386

00:04:23

passed #9757824
meson-mingw32-x86_64

00:05:16

passed #9757823
meson-ppc64el

00:03:41

passed #9757822
kvm
meson-s390x

00:04:46

passed #9757820
windows docker 1809 mesa
meson-windows-vs2019

00:05:51

 
  Amd
passed #9757826
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles2:amd64

00:06:59

passed #9757829
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles31:amd64 1/2

00:13:43

passed #9757830
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles31:amd64 2/2

00:12:48

passed #9757827
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles3:amd64 1/2

00:09:04

passed #9757828
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles3:amd64 2/2

00:08:09

passed #9757832
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-piglit-gl:amd64

00:09:02

passed #9757831
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-traces:amd64

00:08:24

passed #9757825
radv-fossils

00:08:23

 
  Intel
manual #9757835
mesa-ci-aarch64-lava-collabora manual
iris-amly-traces:amd64
manual #9757833
mesa-ci-aarch64-lava-collabora manual
iris-apl-traces:amd64
manual #9757834
mesa-ci-aarch64-lava-collabora manual
iris-glk-traces:amd64
 
  Arm
passed #9757844
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles2:arm64

00:06:07

passed #9757846
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles31:arm64

00:12:06

passed #9757845
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles3:arm64

00:10:11

passed #9757836
mesa-ci-aarch64-lava-collabora
panfrost-t720-gles2:arm64

00:10:19

passed #9757837
mesa-ci-aarch64-lava-collabora
panfrost-t760-gles2:armhf

00:08:20

passed #9757838
mesa-ci-aarch64-lava-collabora
panfrost-t760-traces:armhf

00:11:01

passed #9757839
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles2:arm64

00:07:08

passed #9757842
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles31:arm64

00:07:45

passed #9757840
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 1/2

00:10:08

passed #9757841
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 2/2

00:09:12

passed #9757843
mesa-ci-aarch64-lava-collabora
panfrost-t860-traces:arm64

00:10:07

 
  Broadcom
passed #9757857
igalia-rpi4
v3d-rpi4-gles2:armhf

00:13:54

passed #9757851
igalia-rpi4
v3d-rpi4-gles31:armhf 1/2

00:11:37

passed #9757852
igalia-rpi4
v3d-rpi4-gles31:armhf 2/2

00:11:54

passed #9757853
igalia-rpi4
v3d-rpi4-gles3:armhf 1/4

00:11:09

passed #9757854
igalia-rpi4
v3d-rpi4-gles3:armhf 2/4

00:11:42

passed #9757855
igalia-rpi4
v3d-rpi4-gles3:armhf 3/4

00:09:54

passed #9757856
igalia-rpi4
v3d-rpi4-gles3:armhf 4/4

00:10:35

passed #9757858
igalia-rpi4
v3dv-rpi4-vk:armhf 1/6

00:09:32

passed #9757859
igalia-rpi4
v3dv-rpi4-vk:armhf 2/6

00:09:19

passed #9757860
igalia-rpi4
v3dv-rpi4-vk:armhf 3/6

00:09:34

passed #9757861
igalia-rpi4
v3dv-rpi4-vk:armhf 4/6

00:09:23

passed #9757862
igalia-rpi4
v3dv-rpi4-vk:armhf 5/6

00:09:23

passed #9757863
igalia-rpi4
v3dv-rpi4-vk:armhf 6/6

00:09:37

passed #9757847
igalia-rpi3
vc4-rpi3-gles2:armhf 1/4

00:06:07

passed #9757848
igalia-rpi3
vc4-rpi3-gles2:armhf 2/4

00:05:52

passed #9757849
igalia-rpi3
vc4-rpi3-gles2:armhf 3/4

00:06:06

passed #9757850
igalia-rpi3
vc4-rpi3-gles2:armhf 4/4

00:05:51

 
  Freedreno
passed #9757864
google-freedreno-db410c
a306_gles2

00:07:13

passed #9757865
google-freedreno-db410c
a306_gles3 1/3

00:11:31

passed #9757866
google-freedreno-db410c
a306_gles3 2/3

00:11:15

passed #9757867
google-freedreno-db410c
a306_gles3 3/3

00:11:19

passed #9757868
google-freedreno-db410c
a306_gles3_options

00:06:09

passed #9757869
google-freedreno-db410c
a306-traces

00:06:11

passed #9757870
google-freedreno-db820c
a530_gles2

00:07:51

passed #9757873
google-freedreno-db820c
a530_gles31 1/2

00:08:47

passed #9757871
google-freedreno-db820c
a530_gles3 1/2

00:10:50

passed #9757874
google-freedreno-db820c
a530_gles31 2/2

00:08:36

passed #9757872
google-freedreno-db820c
a530_gles3 2/2

00:09:22

passed #9757875
google-freedreno-db820c
a530_piglit_gl

00:11:53

passed #9757876
google-freedreno-db820c
a530_piglit_shader

00:11:13

passed #9757877
google-freedreno-db820c
a530-traces

00:09:11

passed #9757882
google-freedreno-cheza
a630_egl

00:02:26

passed #9757881
google-freedreno-cheza
a630_gl

00:01:51

passed #9757878
google-freedreno-cheza
a630_gles2

00:01:43

passed #9757880
google-freedreno-cheza
a630_gles3

00:04:50

passed #9757879
google-freedreno-cheza
a630_gles31

00:04:06

passed #9757883
google-freedreno-cheza
a630_gles_others

00:02:57

passed #9757887
google-freedreno-cheza
a630_piglit

00:09:59

passed #9757888
google-freedreno-cheza
a630-traces

00:03:55

passed #9757884
google-freedreno-cheza
a630_vk 1/2

00:11:03

passed #9757885
google-freedreno-cheza
a630_vk 2/2

00:10:30

passed #9757886
google-freedreno-cheza
a630_vk_sysmem

00:02:10

 
  Software Renderer
passed #9757906
lavapipe-vk

00:03:12

passed #9757895
llvmpipe-egl

00:01:24

passed #9757893
llvmpipe-gles2

00:02:50

passed #9757894
llvmpipe-khr-gles2

00:00:33

passed #9757890
llvmpipe-piglit-glslparser

00:04:24

passed #9757889
llvmpipe-piglit-quick_gl

00:07:02

passed #9757891
llvmpipe-piglit-quick_shader

00:06:44

passed #9757892
llvmpipe-traces

00:01:37

passed #9757903
softpipe-asan-gles31

00:01:49

passed #9757905
softpipe-gl

00:00:38

passed #9757896
softpipe-gles2

00:01:42

passed #9757897
softpipe-gles3

00:06:07

passed #9757898
softpipe-gles31 1/2

00:04:46

passed #9757899
softpipe-gles31 2/2

00:05:51

passed #9757900
softpipe-khr-gles2

00:00:34

passed #9757901
softpipe-khr-gles3

00:00:45

passed #9757902
softpipe-khr-gles31

00:00:26

passed #9757904
softpipe-piglit-quick

00:04:47

 
  Layered Backends
passed #9757919
windows docker 1809 mesa
test-d3d12-windows

00:03:10

passed #9757911
virgl-gl30-on-gl

00:00:30

passed #9757912
virgl-gl31-on-gl

00:00:46

passed #9757913
virgl-gl32-on-gl

00:00:55

passed #9757907
virgl-gles2-on-gl

00:01:20

passed #9757909
virgl-gles31-on-gl 1/2

00:02:26

passed #9757910
virgl-gles31-on-gl 2/2

00:03:04

passed #9757908
virgl-gles3-on-gl

00:02:33

passed #9757914
virgl-traces

00:00:42

passed #9757918
zink-lvp-gl

00:02:02

passed #9757916
zink-lvp-gles2

00:02:54

passed #9757917
zink-lvp-gles3

00:02:10

passed #9757915
zink-piglit-quick_gl

00:05:54