blob: bc06d9a811f1e38acafe840611b00cab56fad3d3 [file] [log] [blame]
From 34be0a21c9d273258826c56c729583bf7ca4c18e Mon Sep 17 00:00:00 2001
From: Dylan-debug <jianxing.cai@intel.com>
Date: Tue, 27 Dec 2022 11:56:32 +0800
Subject: [PATCH] [Media Common] [VP] fix object capture ffmpeg
fix object capture ffmpeg regression!
---
media_softlet/linux/common/os/mos_context_specific_next.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp
index 3d377bb334dc..0443e396e515 100644
--- a/media_softlet/linux/common/os/mos_context_specific_next.cpp
+++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp
@@ -153,7 +153,16 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext)
}
uint64_t isRecoverableContextEnabled = 0;
- mos_get_context_param(osDriverContext->intel_context, 0, I915_CONTEXT_PARAM_RECOVERABLE, &isRecoverableContextEnabled);
+ MOS_LINUX_CONTEXT *intel_context = mos_gem_context_create_ext(m_bufmgr, 0, false);
+ int ret = mos_get_context_param(intel_context, 0, I915_CONTEXT_PARAM_RECOVERABLE, &isRecoverableContextEnabled);
+ if (ret == -EINVAL)
+ {
+ isRecoverableContextEnabled = 1;
+ }
+ if (intel_context)
+ {
+ mos_gem_context_destroy(intel_context);
+ }
// set recoverablecontext disabled if want disable object capture
if (MEDIA_IS_WA(&m_waTable, WaDisableSetObjectCapture) && isRecoverableContextEnabled)
{
--
2.7.4