From 2abe07e015cc86e71418e15062b6cf0e3724c3de Mon Sep 17 00:00:00 2001 From: Shaofeng Tang Date: Tue, 12 Mar 2024 15:54:16 +0800 Subject: [PATCH] Enable bugmgr with i915_production Replace i915 bufmgr with i915_production for fixing the crash with agama kernel when ENABLE_PRODUCTION_KMD is ON otherwise include i915 Tracked-On: OAM-116563 Signed-off-by: Shaofeng Tang Signed-off-by: zhangyichix --- media_driver/Android.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/media_driver/Android.mk b/media_driver/Android.mk index cca350b6d..f82cd2386 100644 --- a/media_driver/Android.mk +++ b/media_driver/Android.mk @@ -572,7 +572,6 @@ LOCAL_SRC_FILES := \ ../media_softlet/linux/common/ddi/media_libva_util_next.cpp \ ../media_softlet/linux/common/media_interfaces/media_interfaces_next.cpp \ ../media_softlet/linux/common/os/hwinfo_linux.cpp \ - ../media_softlet/linux/common/os/i915/mos_bufmgr.c \ ../media_softlet/linux/common/os/i915/mos_bufmgr_api.c \ ../media_softlet/linux/common/os/i915/xf86drm.c \ ../media_softlet/linux/common/os/i915/xf86drmHash.c \ @@ -1396,6 +1395,16 @@ LOCAL_SRC_FILES := \ media_softlet/agnostic/m12/m12_0/shared/mediacopy/media_copy_m12_0.cpp \ media_softlet/agnostic/m12/m12_0/vp/hal/feature_manager/vp_feature_manager_m12_0.cpp \ + +ENABLE_PRODUCTION_KMD=ON + +ifneq ($(ENABLE_PRODUCTION_KMD), ON) + LOCAL_SRC_FILES += ../media_softlet/linux/common/os/i915/mos_bufmgr.c +else + LOCAL_SRC_FILES += ../media_softlet/linux/common/os/i915_production/mos_bufmgr_prelim.cpp \ + ../media_softlet/linux/common/os/i915_production/mos_bufmgr.c +endif + LOCAL_SHARED_LIBRARIES := \ libsync \ libcutils \ @@ -1495,6 +1504,7 @@ LOCAL_CPPFLAGS = \ -DiHD_drv_video_EXPORTS \ -DGMM_LIB_DLL + LOCAL_CONLYFLAGS = -x c++ LOCAL_CFLAGS = $(LOCAL_CPPFLAGS)