Commit 14467db1 authored by Andrey Orlov's avatar Andrey Orlov Committed by Oleg Nabiullin

Moving m_export_mode flag definition on application level.

In case of we don't need exported frames (pipeline without rendering),
application still set export_mode flag to PRIME
and this led to DEVICE_FAIL run2run issues.
Behavior have been fixed and issue goes away.

Issue: MDP-50654
(cherry picked from commit 98dc339fcd27c3acf837117e46237c25fe799b57)
parent df84a2a1
......@@ -124,10 +124,6 @@ mfxStatus vaapiFrameAllocator::Init(mfxAllocatorParams *pParams)
m_dpy = p_vaapiParams->m_dpy;
m_export_mode = p_vaapiParams->m_export_mode;
m_exporter = p_vaapiParams->m_exporter;
#if defined(LIBVA_WAYLAND_SUPPORT) || defined (ENABLE_V4L2_SUPPORT)|| defined (X11_DRI3_SUPPORT)
// TODO this should be done on application level via allocator parameters!!
m_export_mode = vaapiAllocatorParams::PRIME;
#endif
return MFX_ERR_NONE;
}
......
......@@ -999,6 +999,9 @@ mfxStatus CEncodingPipeline::CreateAllocator()
MSDK_CHECK_POINTER(p_vaapiAllocParams, MFX_ERR_MEMORY_ALLOC);
p_vaapiAllocParams->m_dpy = (VADisplay)hdl;
#ifdef ENABLE_V4L2_SUPPORT
p_vaapiAllocParams->m_export_mode = vaapiAllocatorParams::PRIME;
#endif
m_pmfxAllocatorParams = p_vaapiAllocParams;
/* In case of video memory we must provide MediaSDK with external allocator
......
......@@ -111,7 +111,10 @@ mfxStatus Launcher::Init(int argc, msdk_char *argv[])
CVAAPIDeviceDRM* drmdev = dynamic_cast<CVAAPIDeviceDRM*>(m_hwdev.get());
pVAAPIParams->m_export_mode = vaapiAllocatorParams::CUSTOM_FLINK;
pVAAPIParams->m_exporter = dynamic_cast<vaapiAllocatorParams::Exporter*>(drmdev->getRenderer());
}
else if (params.libvaBackend == MFX_LIBVA_X11)
{
pVAAPIParams->m_export_mode = vaapiAllocatorParams::PRIME;
}
#endif
#if defined(LIBVA_WAYLAND_SUPPORT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment