Revert "[MOS] Dynamic selection of bond and parallel submission interface"

This reverts commit intel-innersource/drivers.gpu.unified#94a3dd410
diff --git a/media_driver/linux/common/os/mos_gpucontext_specific.cpp b/media_driver/linux/common/os/mos_gpucontext_specific.cpp
index fe4b053..cccbd46 100644
--- a/media_driver/linux/common/os/mos_gpucontext_specific.cpp
+++ b/media_driver/linux/common/os/mos_gpucontext_specific.cpp
@@ -277,66 +277,63 @@
 
             if (nengine >= 2)
             {
-                int i;
-                //master queue
-                m_i915Context[1] = mos_gem_context_create_shared(osInterface->pOsContext->bufmgr,
-                                                                    osInterface->pOsContext->intel_context,
-                                                                    I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
-                if (m_i915Context[1] == nullptr)
+                if(!osInterface->bGucSubmission)
                 {
-                    MOS_OS_ASSERTMESSAGE("Failed to create master context.\n");
-                    MOS_SafeFreeMemory(engine_map);
-                    return MOS_STATUS_UNKNOWN;
-                }
-                m_i915Context[1]->pOsContext = osInterface->pOsContext;
-
-                if (mos_set_context_param_load_balance(m_i915Context[1], engine_map, 1))
-                {
-                    MOS_OS_ASSERTMESSAGE("Failed to set master context bond extension.\n");
-                    MOS_SafeFreeMemory(engine_map);
-                    return MOS_STATUS_UNKNOWN;
-                }
-
-                //slave queue
-                for (i=1; i<nengine; i++)
-                {
-                    m_i915Context[i+1] = mos_gem_context_create_shared(osInterface->pOsContext->bufmgr,
-                                                                        osInterface->pOsContext->intel_context,
-                                                                        I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
-                    if (m_i915Context[i+1] == nullptr)
+                    //master queue
+                    m_i915Context[1] = mos_gem_context_create_shared(osInterface->pOsContext->bufmgr,
+                                                                     osInterface->pOsContext->intel_context,
+                                                                     I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
+                    if (m_i915Context[1] == nullptr)
                     {
-                        MOS_OS_ASSERTMESSAGE("Failed to create slave context.\n");
+                        MOS_OS_ASSERTMESSAGE("Failed to create master context.\n");
                         MOS_SafeFreeMemory(engine_map);
                         return MOS_STATUS_UNKNOWN;
                     }
-                    m_i915Context[i+1]->pOsContext = osInterface->pOsContext;
+                    m_i915Context[1]->pOsContext = osInterface->pOsContext;
 
-                    if (mos_set_context_param_bond(m_i915Context[i+1], engine_map[0], &engine_map[i], 1) != S_SUCCESS)
+                    if (mos_set_context_param_load_balance(m_i915Context[1], engine_map, 1))
                     {
-                        int err = errno;
-                        if (err == ENODEV)
+                        MOS_OS_ASSERTMESSAGE("Failed to set master context bond extension.\n");
+                        MOS_SafeFreeMemory(engine_map);
+                        return MOS_STATUS_UNKNOWN;
+                    }
+
+                    //slave queue
+                    for (int i=1; i<nengine; i++)
+                    {
+                        m_i915Context[i+1] = mos_gem_context_create_shared(osInterface->pOsContext->bufmgr,
+                                                                         osInterface->pOsContext->intel_context,
+                                                                         I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
+                        if (m_i915Context[i+1] == nullptr)
                         {
-                            mos_gem_context_destroy(m_i915Context[i+1]);
-                            m_i915Context[i+1] = nullptr;
-                            break;
-                        }
-                        else
-                        {
-                            MOS_OS_ASSERTMESSAGE("Failed to set slave context bond extension. errno=%d\n",err);
+                            MOS_OS_ASSERTMESSAGE("Failed to create slave context.\n");
                             MOS_SafeFreeMemory(engine_map);
                             return MOS_STATUS_UNKNOWN;
                         }
+                        m_i915Context[i+1]->pOsContext = osInterface->pOsContext;
+
+                        if (mos_set_context_param_bond(m_i915Context[i+1], engine_map[0], &engine_map[i], 1) != S_SUCCESS)
+                        {
+                            int err = errno;
+                            if (err == ENODEV)
+                            {
+                                mos_gem_context_destroy(m_i915Context[i+1]);
+                                m_i915Context[i+1] = nullptr;
+                                break;
+                            }
+                            else
+                            {
+                                MOS_OS_ASSERTMESSAGE("Failed to set slave context bond extension. errno=%d\n",err);
+                                MOS_SafeFreeMemory(engine_map);
+                                return MOS_STATUS_UNKNOWN;
+                            }
+                        }
                     }
                 }
-                if (i == nengine)
-                {
-                    osInterface->bGucSubmission = false;
-                }
                 else
                 {
-                    osInterface->bGucSubmission = true;
                     //create context with different width
-                    for(i = 1; i < nengine; i++)
+                    for(int i = 1; i < nengine; i++)
                     {
                         unsigned int ctxWidth = i + 1;
                         m_i915Context[i] = mos_gem_context_create_shared(osInterface->pOsContext->bufmgr,
diff --git a/media_softlet/linux/common/os/mos_gpucontext_specific_next.cpp b/media_softlet/linux/common/os/mos_gpucontext_specific_next.cpp
index 6bad917..6f9cd09 100644
--- a/media_softlet/linux/common/os/mos_gpucontext_specific_next.cpp
+++ b/media_softlet/linux/common/os/mos_gpucontext_specific_next.cpp
@@ -291,66 +291,63 @@
 
             if (nengine >= 2)
             {
-                int i;
-                //master queue
-                m_i915Context[1] = mos_gem_context_create_shared(osParameters->bufmgr,
-                                                                    osParameters->intel_context,
-                                                                    I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
-                if (m_i915Context[1] == nullptr)
+                if(!streamState->bGucSubmission)
                 {
-                    MOS_OS_ASSERTMESSAGE("Failed to create master context.\n");
-                    MOS_SafeFreeMemory(engine_map);
-                    return MOS_STATUS_UNKNOWN;
-                }
-                m_i915Context[1]->pOsContext = osParameters;
-
-                if (mos_set_context_param_load_balance(m_i915Context[1], engine_map, 1))
-                {
-                    MOS_OS_ASSERTMESSAGE("Failed to set master context bond extension.\n");
-                    MOS_SafeFreeMemory(engine_map);
-                    return MOS_STATUS_UNKNOWN;
-                }
-
-                //slave queue
-                for (i=1; i<nengine; i++)
-                {
-                    m_i915Context[i+1] = mos_gem_context_create_shared(osParameters->bufmgr,
-                                                                        osParameters->intel_context,
-                                                                        I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
-                    if (m_i915Context[i+1] == nullptr)
+                    //master queue
+                    m_i915Context[1] = mos_gem_context_create_shared(osParameters->bufmgr,
+                                                                     osParameters->intel_context,
+                                                                     I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
+                    if (m_i915Context[1] == nullptr)
                     {
-                        MOS_OS_ASSERTMESSAGE("Failed to create slave context.\n");
+                        MOS_OS_ASSERTMESSAGE("Failed to create master context.\n");
                         MOS_SafeFreeMemory(engine_map);
                         return MOS_STATUS_UNKNOWN;
                     }
-                    m_i915Context[i+1]->pOsContext = osParameters;
+                    m_i915Context[1]->pOsContext = osParameters;
 
-                    if (mos_set_context_param_bond(m_i915Context[i+1], engine_map[0], &engine_map[i], 1) != S_SUCCESS)
+                    if (mos_set_context_param_load_balance(m_i915Context[1], engine_map, 1))
                     {
-                        int err = errno;
-                        if (err == ENODEV)
+                        MOS_OS_ASSERTMESSAGE("Failed to set master context bond extension.\n");
+                        MOS_SafeFreeMemory(engine_map);
+                        return MOS_STATUS_UNKNOWN;
+                    }
+
+                    //slave queue
+                    for (int i=1; i<nengine; i++)
+                    {
+                        m_i915Context[i+1] = mos_gem_context_create_shared(osParameters->bufmgr,
+                                                                         osParameters->intel_context,
+                                                                         I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
+                        if (m_i915Context[i+1] == nullptr)
                         {
-                            mos_gem_context_destroy(m_i915Context[i+1]);
-                            m_i915Context[i+1] = nullptr;
-                            break;
-                        }
-                        else
-                        {
-                            MOS_OS_ASSERTMESSAGE("Failed to set slave context bond extension. errno=%d\n",err);
+                            MOS_OS_ASSERTMESSAGE("Failed to create slave context.\n");
                             MOS_SafeFreeMemory(engine_map);
                             return MOS_STATUS_UNKNOWN;
                         }
+                        m_i915Context[i+1]->pOsContext = osParameters;
+
+                        if (mos_set_context_param_bond(m_i915Context[i+1], engine_map[0], &engine_map[i], 1) != S_SUCCESS)
+                        {
+                            int err = errno;
+                            if (err == ENODEV)
+                            {
+                                mos_gem_context_destroy(m_i915Context[i+1]);
+                                m_i915Context[i+1] = nullptr;
+                                break;
+                            }
+                            else
+                            {
+                                MOS_OS_ASSERTMESSAGE("Failed to set slave context bond extension. errno=%d\n",err);
+                                MOS_SafeFreeMemory(engine_map);
+                                return MOS_STATUS_UNKNOWN;
+                            }
+                        }
                     }
                 }
-                if (i == nengine)
-                {
-                    streamState->bGucSubmission = false;
-                }
                 else
                 {
-                    streamState->bGucSubmission = true;
                     //create context with different width
-                    for(i = 1; i < nengine; i++)
+                    for(int i = 1; i < nengine; i++)
                     {
                         unsigned int ctxWidth = i + 1;
                         m_i915Context[i] = mos_gem_context_create_shared(osParameters->bufmgr,