From patchwork Fri Jul 26 01:05:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Fei W" X-Patchwork-Id: 50741 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a830:0:b0:482:c625:d099 with SMTP id z16csp180525vqo; Thu, 25 Jul 2024 18:03:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXj4fA/IyCjRBzrTLtSr+nqonP8UJsTg9cxB69WFoTNDV/9nAL/1GghA7UH0Um8qyF9hzYReGkhEDroGKjjngyycQDq8GWKggF8bQ== X-Google-Smtp-Source: AGHT+IHDn8wvHX3prnWMuQAqrn89iOZGKOFST2QDVcylaFUHfPyaYZtSTMex9013su2yzkbGtwIb X-Received: by 2002:a2e:9e54:0:b0:2ef:2c86:4d49 with SMTP id 38308e7fff4ca-2f03db709aemr29339001fa.22.1721955793608; Thu, 25 Jul 2024 18:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721955793; cv=none; d=google.com; s=arc-20160816; b=z5sMCs6axuV87CRyeLLBoxEFuhags0JKb9hSIfM8AN+h/T0n7euCIjUC2ss7kPXxA3 PAXg0wJcuSSewB5hrUNgsPddqQq6iuTpstehz5F5iTkDnK8qhCYXoB9RU/ipI9flPfal 5qgiffrtZg34GoLc+DnSsjY0E4jOINPq1aX1zHZajPwoRUgkWNfu4he6W5rq3yvdYqdg s9GYEGsfnDQmJo6lPNI/sD3BE/ax83jbLHx4cjTKV+UHRBqDnsGaEiwTBpHcOuw3AXm/ fUAhHZ+3MbSOquXpDwSOLX10zxf/Uz76SAQswLVp72a2q1R7au5WHNUpHQzpQjonKAk/ 9cjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=nIZilzVByVbZWtNEvtaamWQbGZA5RyUMSEifwk15H/A=; fh=i4ESP4ZRFDcfYfwXKWpOXjc2YhmIGuOsCfZUnwNO0gc=; b=P4fyBXdbMy5Ekd2q19fLWXpfrdbYvakkAj2D7mMfHTvkji6vp1JbUzGAa+anC0a6gQ yY4ls/8ZMTu5Nroj/HDP3DJ5fv2yY2+jtHhBRHQ78CvhP8hVGiehcFUQwfXKfWOUDZbb zhFyK4QMRpEx81ABERXEf78vMo5xI43hCJDBMvMWuQzsZd11rnFBT1sRO+OK7WeQL9Ra c5CE/+Kis+4fmQbyxij6XjoQIsXLF7SAJB29pzfoF0wPIXYYO43ipUa69iWcmhN/JSiR pBGHJtuoW0G0tRRlTaff5fzGJNzdJwJD7ms+688Z16gM1EnmqvUIGq0no3nB609ojxG0 Tucg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=K68cLLgF; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f03d13ea1csi6630541fa.199.2024.07.25.18.03.13; Thu, 25 Jul 2024 18:03:13 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=K68cLLgF; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BCBEE68D602; Fri, 26 Jul 2024 04:03:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 39CCC68CDE5 for ; Fri, 26 Jul 2024 04:03:00 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721955787; x=1753491787; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=VP5Etrsvt54Yp+XluaheSakPXTAOoHT48b8C3b2LQXk=; b=K68cLLgFlVdngjca1avlvVRIhDEVK+rbAqbwIA+xkm4MCAp+j3YMhSOw Pd7x8TRCSV/vfXaJvbTC8kVlniZu9jjaoypGn3trCdXr1cdYk/13Nx/fa Rxx4y0AmMKpDDpebnZIyNdt/mNZX3edQBMyz3So5sVGyEtj4JpgOYZysq yIWOuCmajicHuJQdHfRu0SRUxB909zoIM4Dvn31ILJvrRIBjWFLUzQX2W FEyjAj0x5HCfGU3MAEMh4N/eKRq+Ik3vPuVTAswNdeGmghRSf7YLRH5Oj 1VA+9cNMQ75Z8S9hFIXV81kyriOQHAQm01761f2yCLArCNopIxk4yrwGX g==; X-CSE-ConnectionGUID: WE8mJPvpRMSpLg/ED9bAeg== X-CSE-MsgGUID: eEhWzEjzSN2Y4i8xUOf6Sw== X-IronPort-AV: E=McAfee;i="6700,10204,11144"; a="19425082" X-IronPort-AV: E=Sophos;i="6.09,237,1716274800"; d="scan'208";a="19425082" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2024 18:02:59 -0700 X-CSE-ConnectionGUID: Pdc0CRVISkSDDVTqqnhjdw== X-CSE-MsgGUID: WKETmobpT/a6GTmHjwav7w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,237,1716274800"; d="scan'208";a="53177875" Received: from feiwan1-desk3.sh.intel.com ([10.238.208.39]) by fmviesa010.fm.intel.com with ESMTP; 25 Jul 2024 18:02:58 -0700 From: fei.w.wang-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Jul 2024 09:05:20 +0800 Message-Id: <20240726010522.1316432-1-fei.w.wang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] lavu/hwcontext_vaapi: Add option to allow to specify vendor id when init hw device X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: fei.w.wang@intel.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: b3eX/xAbRArE From: Fei Wang Vendor id will help to select desired device in case of kernel driver is unknow or unsupported, for vendor may support different kernel driver on different platforms. Signed-off-by: Fei Wang --- doc/ffmpeg.texi | 8 ++++++++ libavutil/hwcontext_vaapi.c | 29 +++++++++++++++++++++++++++++ libavutil/version.h | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 877edae3b3..842e92ad1a 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1458,6 +1458,11 @@ The following options are recognized: When @var{device} is not specified, use this option to specify the name of the kernel driver associated with the desired device. This option is available only when the hardware acceleration method @emph{drm} and @emph{vaapi} are enabled. +@item vendor_id +When @var{device} and @var{kernel_driver} are not specified, use this option to specify +the vendor id associated with the desired device. This option is available only when the +hardware acceleration method @emph{drm} and @emph{vaapi} are enabled and @emph{kernel_driver} +is not specified. @end table Examples: @@ -1473,6 +1478,9 @@ Create a vaapi device on DirectX adapter 1. @item -init_hw_device vaapi:,kernel_driver=i915 Create a vaapi device on a device associated with kernel driver @samp{i915}. + +@item -init_hw_device vaapi:,vendor_id=0x8086 +Create a vaapi device on a device associated with vendor id @samp{0x8086}. @end table @item vdpau diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 4cb25dd032..014541752a 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -1748,7 +1748,9 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, #if CONFIG_LIBDRM drmVersion *info; const AVDictionaryEntry *kernel_driver; + const AVDictionaryEntry *vendor_id; kernel_driver = av_dict_get(opts, "kernel_driver", NULL, 0); + vendor_id = av_dict_get(opts, "vendor_id", NULL, 0); #endif for (n = 0; n < max_devices; n++) { snprintf(path, sizeof(path), @@ -1803,6 +1805,33 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, close(priv->drm_fd); priv->drm_fd = -1; continue; + } else if (vendor_id) { + drmDevicePtr device; + char drm_vendor[8]; + if (drmGetDevice(priv->drm_fd, &device)) { + av_log(ctx, AV_LOG_VERBOSE, + "Failed to get DRM device info for device %d.\n", n); + close(priv->drm_fd); + priv->drm_fd = -1; + continue; + } + + snprintf(drm_vendor, sizeof(drm_vendor), "0x%x", device->deviceinfo.pci->vendor_id); + if (strcmp(vendor_id->value, drm_vendor)) { + av_log(ctx, AV_LOG_VERBOSE, "Ignoring device %d " + "with non-matching vendor id (%s).\n", + n, vendor_id->value); + drmFreeDevice(&device); + close(priv->drm_fd); + priv->drm_fd = -1; + continue; + } + av_log(ctx, AV_LOG_VERBOSE, "Trying to use " + "DRM render node for device %d, " + "with matching vendor id (%s).\n", + n, vendor_id->value); + drmFreeDevice(&device); + break; } drmFreeVersion(info); #endif diff --git a/libavutil/version.h b/libavutil/version.h index 814892a4d5..852eeef1d6 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 59 -#define LIBAVUTIL_VERSION_MINOR 28 +#define LIBAVUTIL_VERSION_MINOR 29 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ From patchwork Fri Jul 26 01:05:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Fei W" X-Patchwork-Id: 50742 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a830:0:b0:482:c625:d099 with SMTP id z16csp180577vqo; Thu, 25 Jul 2024 18:03:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWoLVO8oBcFRuemjbccfjbZfc1P8K8PY8OIu/sFG5cZyu75XUiIi/MJx0+hW73V+TNA6KQiO1GSdaQKLEAN81mUbE5HeYpGmD6/Rg== X-Google-Smtp-Source: AGHT+IEkfwxFFmylrTcx/EHDZLECrfZjC9B/MFdyKMxtsX42Tn6CFaJt63s7TkOiD95JWRI7FaYL X-Received: by 2002:a17:907:7295:b0:a7a:b1a5:21a5 with SMTP id a640c23a62f3a-a7acb99c97bmr275858466b.61.1721955802796; Thu, 25 Jul 2024 18:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721955802; cv=none; d=google.com; s=arc-20160816; b=JYZP/ey+5CR0ccAwsBJx/TdJscu0kOf4sbWR1hjrbO4c0H3zZPqw1PNL1OkVaDW0fv MTB7Kp8kNWfHJXc//Vv5rhxJwOjTZrMrzrIuovA53DFDTQEBBgGxDHJ233JbdD4qkDx4 SpIT7WjQ7DpnA99dRYpYWYfdQrAG2hipwXZFqykeay6Fjh+oVxJSx1zE+mCsQA5okLRr /RRkmmcS3PT2ZiE51MLTm+dUj1yXlVdHw2iAZsznBkHoWMNHMKQ5gnhpk+VNLmwRBylW inhwJrBBHqM+Lc37B5hhhWQguvEZzqwc5Dku6Sm+jm773LJKAB/raEHKUXvEeCZMhiBr ZVxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=gs3bbISMkhTCGsreCbIkRTJbsOxWFVedQKeYT894ZRM=; fh=i4ESP4ZRFDcfYfwXKWpOXjc2YhmIGuOsCfZUnwNO0gc=; b=MJ3m98vtuKv9naWmVWkyBl7t+Ump56t0IZ7nfCxvxpsBEmpFtWTa9/7F/Cu45LAz20 DkHGst9HZSpz42/o3gKiyE4MqeVeRs5auG6V1K7KsQDlXVBo3sZlilivDqYdVWbmMGm+ xKwxFm19GX03Xnicgu4bffqcBJkytOww7mNyDPhpxw/gePbx9JY4btGbzAcCSZLTMro3 r5kylw5XYC/31DyLyhHLYtYTVFEey9GBxEFTr4Knb8s7+0QAMNChfmrIa61hFK44VyFd pf9b8dNpujNUJmnvR05ik5oAymNC+0srFFXi2Lqttu3JKjQU0+1YV4GY7U0liQTH6udc zcRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=IsTt9QKQ; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a7acab68224si170676366b.555.2024.07.25.18.03.22; Thu, 25 Jul 2024 18:03:22 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=IsTt9QKQ; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E1EF68D6B5; Fri, 26 Jul 2024 04:03:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BBD0868D602 for ; Fri, 26 Jul 2024 04:03:02 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721955788; x=1753491788; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5wNUFNTpbza/KDsGvMAccr1GNAD3n38qyVAwq1nux7c=; b=IsTt9QKQD0TNZl+IskIvlQdrts3i8QeW/gn2adsLNKiLCnn8dmjGkaI/ 6WN+j83Kvt3oCkPLUTNLRiUB9PhrGWKK/FvzRhH1GdptMhKc4Ja7YYiQf WFCRukjthOhjzAFHIlb6oR3Bw6kiY/JgB3Y2zjIA3jZRQrAXZp6gEVeL3 3Xu4LReieD6X/OxlkF/urEfH5BTBpbtA/cUz8rpEhbpLCWbZj1tQMw2+c HelVnXzAZJrJutYWLiB6GJsz53PwlEsw6U3wJVuxaHPUu5kdN3FZQPprU +mjk0WSojqzBvbVA5Ib7T012RHlTPwwJhdcO5TL4jW23OToRzlxMKJCwm g==; X-CSE-ConnectionGUID: DiTGVyarRo+2qqyLIvYRPg== X-CSE-MsgGUID: 5GfV6F+LRcyZwyp6AVUd/g== X-IronPort-AV: E=McAfee;i="6700,10204,11144"; a="19425083" X-IronPort-AV: E=Sophos;i="6.09,237,1716274800"; d="scan'208";a="19425083" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2024 18:03:00 -0700 X-CSE-ConnectionGUID: T5ewHhe8R1eM2XjQviCzQg== X-CSE-MsgGUID: zr+thi1NSrGlY+aaNrwuFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,237,1716274800"; d="scan'208";a="53177878" Received: from feiwan1-desk3.sh.intel.com ([10.238.208.39]) by fmviesa010.fm.intel.com with ESMTP; 25 Jul 2024 18:02:59 -0700 From: fei.w.wang-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Jul 2024 09:05:21 +0800 Message-Id: <20240726010522.1316432-2-fei.w.wang@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240726010522.1316432-1-fei.w.wang@intel.com> References: <20240726010522.1316432-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] lavu/hwcontext_qsv: Use vendor id to create device X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: fei.w.wang@intel.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Svwjigy9yxUA From: Fei Wang New kernel driver "xe" will be supported from Lunar Lake instead of "i915". "xe" kernel driver: https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/xe Signed-off-by: Fei Wang --- libavutil/hwcontext_qsv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 7cec347478..af0a3e1051 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -2569,8 +2569,8 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device, // used on recent Intel hardware. Set options to the VAAPI device // creation so that we should pick a usable setup by default if // possible, even when multiple devices and drivers are available. - av_dict_set(&child_device_opts, "kernel_driver", "i915", 0); - av_dict_set(&child_device_opts, "driver", "iHD", 0); + av_dict_set(&child_device_opts, "vendor_id", "0x8086", 0); + av_dict_set(&child_device_opts, "driver", "iHD", 0); } break; #endif From patchwork Fri Jul 26 01:05:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Fei W" X-Patchwork-Id: 50743 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a830:0:b0:482:c625:d099 with SMTP id z16csp180629vqo; Thu, 25 Jul 2024 18:03:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXLjMhhY6EcdyFbMwvm65jlTtsmmppNKUvKoap8Q97Y04IhVRwZjQLZwYlnecnX6BjMZLFZ/pVD+PZ1OJG2qo5zoBo2bb8EbUT5+A== X-Google-Smtp-Source: AGHT+IH5HbwV7C4Bbr3P+80iWOjvqNRRkazWEGcjXn/NJq1iExyzdu8P+fEimZrwRQVKgIRhuFN+ X-Received: by 2002:a2e:81d7:0:b0:2ec:5fe1:c762 with SMTP id 38308e7fff4ca-2f039db6f4amr31780081fa.46.1721955812035; Thu, 25 Jul 2024 18:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721955812; cv=none; d=google.com; s=arc-20160816; b=l0o1PEgHTt8Tx99EHyQLfZkkTeeOKMZiddyjx6Y+wLDI8/85fdd6d/yYayuhn9YTAO OBA02eLIbImquVXJvbcSVfhL3UvX1s3GYa1WvJiyxM1dYjDz3+Nh8kXd69iJdGFN7u42 MMeK6Elt8+kVpbkRdaklX5vq9eEz13gz99TRxYvpREGGvFLbRzeaJ9JwcnJ/NH4G7Tj8 fv6evfTa0mrpUNvzLpWC6gTtEyUQlSoIF3/HgR6LZm7Z3AOwvmCZ2+K2lbdoqDp6beLe g/yQXDPJq5/FIUKcUknwDhBntqLHrPXdoocQf3+jvk3ArjcXW01TwECtyV3wzYTsKoLe vjtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=gc+2+A00x1NQoJeLoSzAA4lie8I01VM7tZ+MEFv8udM=; fh=i4ESP4ZRFDcfYfwXKWpOXjc2YhmIGuOsCfZUnwNO0gc=; b=z8kJ7x9gEp6w6SRubTSfEYoQnRuakAJEP3H7mPwxwFcGzqlcaF82oKID+UVS86lBr4 MQM+/KqBShWxJP2xQsUDP8KVOSjNzYCmR5TQn5yS3HDsse1kYhecObxzfR74MEL42pF1 lBeq4lp7HobZAwJxHIY+m+2JRVxtg5aimvsDcGYLWLnv3jQQflYoDcA36G/0mJ6rHK8h gB+rhejmFja74RVCxbedQG+Z4RoMCJQCS31sd2IjHyRjxkjnjJXXcSdooRQrjf+0f+fS yyz21zEusoAG5O5dJtFiSQmwcBsL0F64vQdCEpkKudQu+gw1UT3qNIYjdoXr9uPa5Aud HRgw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=A0IEPbnC; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f03d0bbfb5si6792751fa.165.2024.07.25.18.03.31; Thu, 25 Jul 2024 18:03:32 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=A0IEPbnC; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3750C68D795; Fri, 26 Jul 2024 04:03:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2C74B68D623 for ; Fri, 26 Jul 2024 04:03:06 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721955793; x=1753491793; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=H9yDW08P4jxwlHA960OMDGzkBo3Jl2rU5Owqhd7xfoY=; b=A0IEPbnCmbtaQNAevQ2IzVPpRql1AcmQm46ULDk2PXLCLUrvQkzhigJL czkRd9OTdCq06oUcfUqB6M5P4n7FQbUbw9s/ypuCd0VH33QL/2SwnS3j0 16UNheGo2BDAc/HHkpNDc+acBen7jf0J4WcbW+7GE6s1PwQ0OweacrF1Q mWSgyaykfTly1ZfKbqV6mq901Hnjd7h9+FlZdEDXxxN8yQ13ppsoh78VI xo7hjCPn+qijq0c/E/zS/jW4que274AorOilJUipirJQrrxwkTnwvuGQ9 QU/zc/aK2UP0VaH5RRbGyhfjD4ZaXoTxGZXtBwT3P3yXxbJlLZHP3Gu4j g==; X-CSE-ConnectionGUID: p/MB67sXSsWTBPld2F7/VQ== X-CSE-MsgGUID: MAt6qjznSEqJfMoINTkWzA== X-IronPort-AV: E=McAfee;i="6700,10204,11144"; a="19425084" X-IronPort-AV: E=Sophos;i="6.09,237,1716274800"; d="scan'208";a="19425084" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2024 18:03:01 -0700 X-CSE-ConnectionGUID: 0c+gvFl4T/qBZ7tSqzunOw== X-CSE-MsgGUID: XjXnktuKR7+2ZVz94vRGIA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,237,1716274800"; d="scan'208";a="53177881" Received: from feiwan1-desk3.sh.intel.com ([10.238.208.39]) by fmviesa010.fm.intel.com with ESMTP; 25 Jul 2024 18:03:00 -0700 From: fei.w.wang-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Jul 2024 09:05:22 +0800 Message-Id: <20240726010522.1316432-3-fei.w.wang@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240726010522.1316432-1-fei.w.wang@intel.com> References: <20240726010522.1316432-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] lavc/qsv: Use vendor id to create device X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: fei.w.wang@intel.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 1oI+UCf31ewg From: Fei Wang New kernel driver "xe" will be supported from Lunar Lake instead of "i915". "xe" kernel driver: https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/xe Signed-off-by: Fei Wang --- libavcodec/qsv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 0c6fbd0dc0..acf0991757 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -464,8 +464,8 @@ static int ff_qsv_set_display_handle(AVCodecContext *avctx, QSVSession *qs) AVVAAPIDeviceContext *hwctx; int ret; - av_dict_set(&child_device_opts, "kernel_driver", "i915", 0); - av_dict_set(&child_device_opts, "driver", "iHD", 0); + av_dict_set(&child_device_opts, "vendor_id", "0x8086", 0); + av_dict_set(&child_device_opts, "driver", "iHD", 0); ret = av_hwdevice_ctx_create(&qs->va_device_ref, AV_HWDEVICE_TYPE_VAAPI, NULL, child_device_opts, 0); av_dict_free(&child_device_opts);