From 2f61ff531a0f6ab1a0728138a7af3211eb74ff19 Mon Sep 17 00:00:00 2001 From: "Xu, Zhengguo" Date: Mon, 25 Dec 2023 13:25:03 +0800 Subject: [PATCH] [Decode] Add xe drm init entry Query the drm device firstly and init specific drm implement dynamically Note: this is still need to add build option '-DENABLE_NEW_KMD=ON' to enable xe drm. Signed-off-by: Xu, Zhengguo --- media_softlet/linux/common/os/i915/mos_bufmgr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/media_softlet/linux/common/os/i915/mos_bufmgr.c b/media_softlet/linux/common/os/i915/mos_bufmgr.c index c0b3ba02745..8b5c7c92305 100644 --- a/media_softlet/linux/common/os/i915/mos_bufmgr.c +++ b/media_softlet/linux/common/os/i915/mos_bufmgr.c @@ -60,6 +60,7 @@ #include "libdrm_lists.h" #include "mos_bufmgr.h" #include "mos_bufmgr_priv.h" +#include "mos_bufmgr_xe.h" #include "string.h" #include "i915_drm.h" @@ -5381,6 +5382,12 @@ mos_bufmgr_gem_init(int fd, int batch_size, int *device_type) { return mos_bufmgr_gem_init_i915(fd, batch_size); } +#ifdef ENABLE_NEW_KMD + else if (DEVICE_TYPE_XE == type) + { + return mos_bufmgr_gem_init_xe(fd, batch_size); + } +#endif return nullptr; }