mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-14 22:00:28 +01:00
radv/winsys: use drmGetDevice2 API
Analogous to previous commit v2: Add explicit require_libdrm check. Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (v1) Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (v1) Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1) Tested-by: Mike Lothian <mike@fireburn.co.uk>
This commit is contained in:
parent
858170e8a4
commit
8ff2937dfa
2 changed files with 3 additions and 2 deletions
|
|
@ -1792,6 +1792,7 @@ if test -n "$with_vulkan_drivers"; then
|
|||
|
||||
;;
|
||||
xradeon)
|
||||
require_libdrm "radv"
|
||||
PKG_CHECK_MODULES([AMDGPU], [libdrm >= $LIBDRM_AMDGPU_REQUIRED libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
|
||||
radeon_llvm_check $LLVM_REQUIRED_RADV "radv"
|
||||
HAVE_RADEON_VULKAN=yes
|
||||
|
|
|
|||
|
|
@ -124,9 +124,9 @@ do_winsys_init(struct radv_amdgpu_winsys *ws, int fd)
|
|||
int r;
|
||||
int i, j;
|
||||
/* Get PCI info. */
|
||||
r = drmGetDevice(fd, &devinfo);
|
||||
r = drmGetDevice2(fd, 0, &devinfo);
|
||||
if (r) {
|
||||
fprintf(stderr, "amdgpu: drmGetDevice failed.\n");
|
||||
fprintf(stderr, "amdgpu: drmGetDevice2 failed.\n");
|
||||
goto fail;
|
||||
}
|
||||
ws->info.pci_domain = devinfo->businfo.pci->domain;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue