From nobody Wed Jan 12 21:53:39 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 07FD5194B12A; Wed, 12 Jan 2022 21:53:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JZ1Xg4vGcz51qg; Wed, 12 Jan 2022 21:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85A4C14ACB; Wed, 12 Jan 2022 21:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20CLrdaw046172; Wed, 12 Jan 2022 21:53:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20CLrd59046171; Wed, 12 Jan 2022 21:53:39 GMT (envelope-from git) Date: Wed, 12 Jan 2022 21:53:39 GMT Message-Id: <202201122153.20CLrd59046171@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: 759f1671edde - main - multimedia/libva-intel-media-driver: update to 22.1.1 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 759f1671eddeaba4e10c09bbe329adaf8eddb4ff Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642024419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IcTBPaJ6xuG2gr91dh7uK+A5ZViM8pZz6SkrJOkiQ6o=; b=D8pQXicRGYHy8tJ/y4malUAQ/fHUpeo+HEZfCWwIQnNno34O6f9x5EvFZykJFHR+fz/B+V 2+T8ukFC1IntWaoTIcKDcV5xrhqLBTObX8plXb5S4ik6W5Z4VAhtPAE9fHkCFi7H6LnNA6 FhG6uSx2eZz+crVRfKb0ppAigOpN1/sGxYT890tgvVre/wjuYvRlunBt2ZGe/5mbQ5Yv7N 9VCRY6IWtyClpJNa0YFv8ZkSzkHtQF9aPLy2TiggUJNk+EaWJUwaUQaMAX3OTAVZI5Z4MF Ydtl92P7Gdtg1v5jP/t+siEH++0x5DxN7co1c3MarqhckImG9UhPvidmvgFomg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642024419; a=rsa-sha256; cv=none; b=Jq8rX9q3Ry66XL0Z31LSqRZdahNCZ6lXI1I0EBKXShZXpdm5T7cNsKPYTiwhjZfSf9pMdx jB9l22tEASAKAqfXfoqAT9gb4qhh8jtrFV0EkwqcjHo2civWJj4MMHQ9uTJtAd5gztpT2t 2HC5CYYW7Wy9NwIJdvprcp/7ZkB8ZsRhD1gjAv1GF260dtPPUn9TdExRzMf6349pIXr8as LS2Ss5f3+35DDgPkmYYB5Jiko5IJWB3EkYZ6eNusnAarPkg91/DcjsaPJUOvxx9G4CUlyu gzwWzRliV4O5u+yPmgaX8rwSXEr6ITfn8XHOrEuux4o9auSIDVTUGXjg1V4kfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=759f1671eddeaba4e10c09bbe329adaf8eddb4ff commit 759f1671eddeaba4e10c09bbe329adaf8eddb4ff Author: Jan Beich AuthorDate: 2022-01-12 07:51:21 +0000 Commit: Jan Beich CommitDate: 2022-01-12 21:53:27 +0000 multimedia/libva-intel-media-driver: update to 22.1.1 Changes: https://github.com/intel/media-driver/compare/intel-media-22.1.0...intel-media-22.1.1 --- multimedia/libva-intel-media-driver/Makefile | 2 +- multimedia/libva-intel-media-driver/distinfo | 6 +- .../libva-intel-media-driver/files/patch-revert | 239 +++++++++++++++++++++ 3 files changed, 243 insertions(+), 4 deletions(-) diff --git a/multimedia/libva-intel-media-driver/Makefile b/multimedia/libva-intel-media-driver/Makefile index f2f88749f064..b4581dcf8b7b 100644 --- a/multimedia/libva-intel-media-driver/Makefile +++ b/multimedia/libva-intel-media-driver/Makefile @@ -1,6 +1,6 @@ PORTNAME= media-driver DISTVERSIONPREFIX= intel-media- -DISTVERSION= 22.1.0 +DISTVERSION= 22.1.1 CATEGORIES= multimedia PKGNAMEPREFIX= libva-intel- diff --git a/multimedia/libva-intel-media-driver/distinfo b/multimedia/libva-intel-media-driver/distinfo index 3882179e9ce3..76864c4253e3 100644 --- a/multimedia/libva-intel-media-driver/distinfo +++ b/multimedia/libva-intel-media-driver/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1640189290 -SHA256 (intel-media-driver-intel-media-22.1.0_GH0.tar.gz) = 6c1cd5c4c1b7bd1c7785ed4d553b76b17dd7e673619a39e0c3070246aa671024 -SIZE (intel-media-driver-intel-media-22.1.0_GH0.tar.gz) = 26188730 +TIMESTAMP = 1641973881 +SHA256 (intel-media-driver-intel-media-22.1.1_GH0.tar.gz) = 6eaa4a9caf58faa8934b253adb4b0ece1c7d5de6f084167d5138b4e3ba423683 +SIZE (intel-media-driver-intel-media-22.1.1_GH0.tar.gz) = 26202158 SHA256 (4a6e36a98c0b.patch) = 7d09fc3ba601a782b60638f6c2bda7195dd76cf18ed5570c7ff24778b4884391 SIZE (4a6e36a98c0b.patch) = 1239 SHA256 (533e7ae79ff7.patch) = 4bd5633c8b5b3641c68b15dda2eea8cd60a999908cb08cf122cb87c62ca95955 diff --git a/multimedia/libva-intel-media-driver/files/patch-revert b/multimedia/libva-intel-media-driver/files/patch-revert new file mode 100644 index 000000000000..ded901d4dff5 --- /dev/null +++ b/multimedia/libva-intel-media-driver/files/patch-revert @@ -0,0 +1,239 @@ +Temporarily revert https://github.com/intel/media-driver/commit/53405da4ad2d +until bundled libdrm is ported + +In file included from media_driver/linux/common/os/mos_interface.cpp:37: +cmrtlib/linux/hardware/drm_device.h:268:19: error: use of undeclared identifier 'DRM_MAJOR' + return maj == DRM_MAJOR; + ^ + +--- cmrtlib/linux/hardware/drm_device.h.orig 2022-01-12 07:51:21 UTC ++++ cmrtlib/linux/hardware/drm_device.h +@@ -53,7 +53,6 @@ + #endif + #include + #include +-#include + + #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) + +@@ -125,7 +124,7 @@ typedef void *drmAddress, **drmAddressPtr; /* + #define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C)) + + #define __align_mask(value, mask) (((value) + (mask)) & ~(mask)) +-#define ALIGN_CEIL(value, alignment) __align_mask(value, (__typeof__(value))((alignment) - 1)) ++#define ALIGN(value, alignment) __align_mask(value, (__typeof__(value))((alignment) - 1)) + #define DRM_PLATFORM_DEVICE_NAME_LEN 512 + + typedef struct _drmPciBusInfo { +@@ -231,21 +230,6 @@ drm_device_validate_flags(uint32_t flags) + return (flags & ~DRM_DEVICE_GET_PCI_REVISION); + } + +-static bool +-drm_device_has_rdev(drmDevicePtr device, dev_t find_rdev) +-{ +- struct stat sbuf; +- +- for (int i = 0; i < DRM_NODE_MAX; i++) { +- if (device->available_nodes & 1 << i) { +- if (stat(device->nodes[i], &sbuf) == 0 && +- sbuf.st_rdev == find_rdev) +- return true; +- } +- } +- return false; +-} +- + static int drmGetMaxNodeName(void) + { + return sizeof(DRM_DIR_NAME) + +@@ -305,7 +289,7 @@ static drmDevicePtr drmDeviceAlloc(unsigned int type, + unsigned int i; + char *ptr; + +- max_node_length = ALIGN_CEIL(drmGetMaxNodeName(), sizeof(void *)); ++ max_node_length = ALIGN(drmGetMaxNodeName(), sizeof(void *)); + + extra = DRM_NODE_MAX * (sizeof(void *) + max_node_length); + +@@ -1192,105 +1176,6 @@ int drmGetDevices(drmDevicePtr devices[], int max_devi + return drmGetDevices2(DRM_DEVICE_GET_PCI_REVISION, devices, max_devices); + } + +-/** +- * Get information about the opened drm device +- * +- * \param fd file descriptor of the drm device +- * \param flags feature/behaviour bitmask +- * \param device the address of a drmDevicePtr where the information +- * will be allocated in stored +- * +- * \return zero on success, negative error code otherwise. +- * +- * \note Unlike drmGetDevice it does not retrieve the pci device revision field +- * unless the DRM_DEVICE_GET_PCI_REVISION \p flag is set. +- */ +-int drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device) +-{ +- drmDevicePtr local_devices[MAX_DRM_NODES]; +- drmDevicePtr d; +- DIR *sysdir; +- struct dirent *dent; +- struct stat sbuf; +- int subsystem_type; +- int maj, min; +- int ret, i, node_count; +- dev_t find_rdev; +- +- if (drm_device_validate_flags(flags)) +- return -EINVAL; +- +- if (fd == -1 || device == NULL) +- return -EINVAL; +- +- if (fstat(fd, &sbuf)) +- return -errno; +- +- find_rdev = sbuf.st_rdev; +- maj = major(sbuf.st_rdev); +- min = minor(sbuf.st_rdev); +- +- if (!drmNodeIsDRM(maj, min) || !S_ISCHR(sbuf.st_mode)) +- return -EINVAL; +- +- subsystem_type = drmParseSubsystemType(maj, min); +- if (subsystem_type < 0) +- return subsystem_type; +- +- sysdir = opendir(DRM_DIR_NAME); +- if (!sysdir) +- return -errno; +- +- i = 0; +- while ((dent = readdir(sysdir))) { +- ret = process_device(&d, dent->d_name, subsystem_type, true, flags); +- if (ret) +- continue; +- +- if (i >= MAX_DRM_NODES) { +- fprintf(stderr, "More than %d drm nodes detected. " +- "Please report a bug - that should not happen.\n" +- "Skipping extra nodes\n", MAX_DRM_NODES); +- break; +- } +- local_devices[i] = d; +- i++; +- } +- node_count = i; +- +- drmFoldDuplicatedDevices(local_devices, node_count); +- +- *device = NULL; +- +- for (i = 0; i < node_count; i++) { +- if (!local_devices[i]) +- continue; +- +- if (drm_device_has_rdev(local_devices[i], find_rdev)) +- *device = local_devices[i]; +- else +- drmFreeDevice(&local_devices[i]); +- } +- +- closedir(sysdir); +- if (*device == NULL) +- return -ENODEV; +- return 0; +-} +- +-/** +- * Get information about the opened drm device +- * +- * \param fd file descriptor of the drm device +- * \param device the address of a drmDevicePtr where the information +- * will be allocated in stored +- * +- * \return zero on success, negative error code otherwise. +- */ +-int drmGetDevice(int fd, drmDevicePtr *device) +-{ +- return drmGetDevice2(fd, DRM_DEVICE_GET_PCI_REVISION, device); +-} + + static int32_t GetRendererFileDescriptor(char * drm_node) + { +--- media_driver/linux/common/os/i915/include/xf86drm.h.orig 2022-01-12 07:51:21 UTC ++++ media_driver/linux/common/os/i915/include/xf86drm.h +@@ -713,6 +713,39 @@ extern char *drmGetRenderDeviceNameFromFd(int fd); + + #define DRM_BUS_PCI 0 + ++typedef struct _drmPciBusInfo { ++ uint16_t domain; ++ uint8_t bus; ++ uint8_t dev; ++ uint8_t func; ++} drmPciBusInfo, *drmPciBusInfoPtr; ++ ++typedef struct _drmPciDeviceInfo { ++ uint16_t vendor_id; ++ uint16_t device_id; ++ uint16_t subvendor_id; ++ uint16_t subdevice_id; ++ uint8_t revision_id; ++} drmPciDeviceInfo, *drmPciDeviceInfoPtr; ++ ++typedef struct _drmDevice { ++ char **nodes; /* DRM_NODE_MAX sized array */ ++ int available_nodes; /* DRM_NODE_* bitmask */ ++ int bustype; ++ union { ++ drmPciBusInfoPtr pci; ++ } businfo; ++ union { ++ drmPciDeviceInfoPtr pci; ++ } deviceinfo; ++} drmDevice, *drmDevicePtr; ++ ++extern int drmGetDevice(int fd, drmDevicePtr *device); ++extern void drmFreeDevice(drmDevicePtr *device); ++ ++extern int drmGetDevices(drmDevicePtr devices[], int max_devices); ++extern void drmFreeDevices(drmDevicePtr devices[], int count); ++ + #if defined(__cplusplus) + } + #endif +--- media_driver/linux/common/os/media_srcs.cmake.orig 2022-01-12 07:51:21 UTC ++++ media_driver/linux/common/os/media_srcs.cmake +@@ -24,9 +24,6 @@ if(ENABLE_PRODUCTION_KMD) + media_include_subdirectory(i915_production) + endif() + +-# This is to include drm_device.h in cmrtlib, no cpp file needed. +-include_directories(${BS_DIR_MEDIA}/cmrtlib/linux/hardware) +- + set(TMP_SOURCES_ + ${CMAKE_CURRENT_LIST_DIR}/hwinfo_linux.c + ${CMAKE_CURRENT_LIST_DIR}/mos_context_specific.cpp +--- media_driver/linux/common/os/mos_interface.cpp.orig 2022-01-12 07:51:21 UTC ++++ media_driver/linux/common/os/mos_interface.cpp +@@ -34,7 +34,6 @@ + #include "mos_os_virtualengine_scalability_specific_next.h" + #include "mos_graphicsresource_specific_next.h" + #include "mos_bufmgr_priv.h" +-#include "drm_device.h" + + #if (_DEBUG || _RELEASE_INTERNAL) + #include //for simulate random OS API failure +--- media_driver/media_top_cmake.cmake.orig 2022-01-12 07:51:21 UTC ++++ media_driver/media_top_cmake.cmake +@@ -145,7 +145,7 @@ if (NOT DEFINED INCLUDED_LIBS OR "${INCLUDED_LIBS}" ST + endif() + + target_compile_options( ${LIB_NAME} PUBLIC ${LIBGMM_CFLAGS_OTHER}) +- target_link_libraries ( ${LIB_NAME} ${LIBGMM_LIBRARIES}) ++ target_link_libraries ( ${LIB_NAME} ${LIBGMM_LIBRARIES} drm) + + include(${MEDIA_EXT_CMAKE}/ext/media_feature_include_ext.cmake OPTIONAL) +