Skip to content

Commit

Permalink
[Media Common] [VP] fix common/vp gen12 off build issue
Browse files Browse the repository at this point in the history
fix common/vp gen12 off build issue!
  • Loading branch information
Dylan-debug authored and intel-mediadev committed Aug 17, 2023
1 parent 97d3c7b commit 3cbddb9
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 19 deletions.
18 changes: 15 additions & 3 deletions media_driver/agnostic/common/cm/cm_command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
#include "cm_mem.h"
#include "cm_kernel_ex.h"
#include "cm_group_space.h"
#include "mhw_render_g12_X.h"
#if IGFX_GEN11_SUPPORTED
#include "mhw_render_g11_X.h"
#endif
#if IGFX_GEN12_SUPPORTED
#include "mhw_render_g12_X.h"
#include "mhw_mi_g12_X.h"
#include "mos_solo_generic.h"
#include "cm_hal_g12.h"
#endif
#include "mos_solo_generic.h"
#include "mos_os_cp_interface_specific.h"

CmCommandBuffer::CmCommandBuffer(CM_HAL_STATE *cmhal):
Expand Down Expand Up @@ -144,6 +146,7 @@ MOS_STATUS CmCommandBuffer::AddL3CacheConfig(L3ConfigRegisterValues *l3Values)
return m_hwRender->SetL3Cache(&m_cmdBuf);
}
#endif
#if IGFX_GEN12_SUPPORTED
else //gen12
{
MHW_RENDER_ENGINE_L3_CACHE_SETTINGS_G12 l3CacheSettting = {};
Expand All @@ -158,6 +161,8 @@ MOS_STATUS CmCommandBuffer::AddL3CacheConfig(L3ConfigRegisterValues *l3Values)
CM_CHK_MOSSTATUS_RETURN(m_hwRender->EnableL3Caching(&l3CacheSettting));
return m_hwRender->SetL3Cache(&m_cmdBuf);
}
#endif
return MOS_STATUS_UNKNOWN;
}

MOS_STATUS CmCommandBuffer::AddPipelineSelect(bool gpgpu)
Expand Down Expand Up @@ -200,17 +205,21 @@ MOS_STATUS CmCommandBuffer::AddStateBaseAddress(CmISH *ish, CmMediaState *mediaS
MOS_STATUS CmCommandBuffer::AddMediaVFE(CmMediaState *mediaState, bool fusedEuDispatch, CMRT_UMD::CmThreadSpaceRT **threadSpaces, uint32_t count)
{
MHW_VFE_PARAMS vfeParams = {};
#if IGFX_GEN12_SUPPORTED
MHW_VFE_PARAMS_G12 vfeParamsG12 = {};
#endif
MHW_VFE_PARAMS *param = nullptr;
if (m_cmhal->platform.eRenderCoreFamily <= IGFX_GEN11_CORE)
{
param = &vfeParams;
}
#if IGFX_GEN12_SUPPORTED
else
{
param = &vfeParamsG12;
vfeParamsG12.bFusedEuDispatch = fusedEuDispatch;
}
#endif
MHW_RENDER_ENGINE_CAPS *hwCaps = m_hwRender->GetHwCaps();

param->dwDebugCounterControl = MEDIASTATE_DEBUG_COUNTER_FREE_RUNNING;
Expand Down Expand Up @@ -623,6 +632,7 @@ MOS_STATUS CmCommandBuffer::AddBatchBufferEnd()

MOS_STATUS CmCommandBuffer::AddMMCProlog()
{
#if IGFX_GEN12_SUPPORTED
uint64_t auxTableBaseAddr = 0;

auxTableBaseAddr = m_cmhal->osInterface->pfnGetAuxTableBaseAddr(m_cmhal->osInterface);
Expand All @@ -640,7 +650,7 @@ MOS_STATUS CmCommandBuffer::AddMMCProlog()
lriParams.dwData = ((auxTableBaseAddr >> 32) & 0xffffffff);
CM_CHK_MOSSTATUS_RETURN(m_miInterface->AddMiLoadRegisterImmCmd(&m_cmdBuf, &lriParams));
}
#endif
return MOS_STATUS_SUCCESS;
}

Expand Down Expand Up @@ -901,6 +911,7 @@ MOS_STATUS CmCommandBuffer::AddGpgpuWalker(CMRT_UMD::CmThreadGroupSpace *threadG
return MOS_STATUS_SUCCESS;
}

#if IGFX_GEN12_SUPPORTED
struct PACKET_SURFACE_STATE
{
SURFACE_STATE_TOKEN_COMMON token;
Expand All @@ -910,6 +921,7 @@ struct PACKET_SURFACE_STATE
mhw_state_heap_g12_X::MEDIA_SURFACE_STATE_CMD cmdSurfaceStateAdv;
};
};
#endif

void CmCommandBuffer::Dump()
{
Expand Down
2 changes: 2 additions & 0 deletions media_driver/agnostic/common/cm/cm_execution_adv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
#if IGFX_GEN11_SUPPORTED
#include "cm_hal_g11.h"
#endif
#if IGFX_GEN12_SUPPORTED
#include "cm_hal_g12.h"
#endif

static bool gGTPinInitialized = false;

Expand Down
6 changes: 3 additions & 3 deletions media_driver/agnostic/media_srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -342,17 +342,17 @@ if(GEN11_JSL)
media_include_subdirectory(gen11_jsl_ehl)
endif()

if(ENABLE_REQUIRED_GEN_CODE OR GEN12)
if(GEN12)
media_include_subdirectory(gen12)
media_include_subdirectory(g12)
media_include_subdirectory(../media_softlet/agnostic/gen12)
endif()

if(ENABLE_REQUIRED_GEN_CODE OR GEN12_TGLLP)
if(GEN12_TGLLP)
media_include_subdirectory(gen12_tgllp)
endif()

if(ENABLE_REQUIRED_GEN_CODE OR GEN12)
if(GEN12)
media_include_subdirectory(Xe_M)
media_include_subdirectory(Xe_R)
endif()
Expand Down
7 changes: 3 additions & 4 deletions media_driver/linux/common/cm/hal/cm_command_buffer_os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@
#include "cm_mem.h"
#include "cm_kernel_ex.h"
#include "cm_group_space.h"

#if IGFX_GEN12_SUPPORTED
#include "mhw_render_g12_X.h"
#include "mhw_mi_g12_X.h"

#include "cm_hal_g12.h"
#endif
#include "mos_solo_generic.h"
#include "mhw_mmio_g9.h"

#include "cm_hal_g12.h"

MOS_STATUS CmCommandBuffer::AddFrameTracker(MOS_RESOURCE *resource, uint32_t offset, uint32_t tag)
{
MHW_MI_STORE_DATA_PARAMS storeDataParams;
Expand Down
2 changes: 1 addition & 1 deletion media_driver/linux/media_srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if(GEN11)
media_include_subdirectory(gen11)
endif()

if(ENABLE_REQUIRED_GEN_CODE OR GEN12)
if(GEN12)
media_include_subdirectory(gen12)
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
#include "media_interfaces_hwinfo_device.h"

#include "mhw_cp_interface.h"
#if IGFX_GEN12_SUPPORTED
#include "mhw_mi_g12_X.h"
#endif
#include "mhw_render_xe_hp.h"
#include "mhw_sfc_xe_xpm.h"
#include "mhw_state_heap_xe_xpm.h"
Expand Down
14 changes: 7 additions & 7 deletions media_driver/media_interface/media_srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,35 +55,35 @@ if(GEN11_JSL)
media_include_subdirectory(media_interfaces_m11_jsl_ehl)
endif()

if(ENABLE_REQUIRED_GEN_CODE OR GEN12_TGLLP)
if(GEN12_TGLLP)
media_include_subdirectory(media_interfaces_m12_tgllp)
endif()

if(ENABLE_REQUIRED_GEN_CODE OR GEN12_DG1)
if(GEN12_DG1)
media_include_subdirectory(media_interfaces_m12_dg1)
endif()

if(ENABLE_REQUIRED_GEN_CODE OR GEN12_RKL)
if(GEN12_RKL)
media_include_subdirectory(media_interfaces_m12_rkl)
endif()

if(ENABLE_REQUIRED_GEN_CODE OR GEN12_ADLS)
if(GEN12_ADLS)
media_include_subdirectory(media_interfaces_m12_adls)
endif()

if(ENABLE_REQUIRED_GEN_CODE OR GEN12_ADLP)
if(GEN12_ADLP)
media_include_subdirectory(media_interfaces_m12_adlp)
endif()

if(GEN12_ADLN)
media_include_subdirectory(media_interfaces_m12_adln)
endif()

if(XEHP_SDV OR XE_LPG)
if(XEHP_SDV)
media_include_subdirectory(media_interfaces_xehp_sdv)
endif()

if(DG2 OR XE_LPG)
if(DG2)
media_include_subdirectory(media_interfaces_dg2)
endif()

Expand Down
2 changes: 2 additions & 0 deletions media_driver/media_softlet/agnostic/common/media_srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
# OTHER DEALINGS IN THE SOFTWARE.

media_include_subdirectory(shared)
if (GEN12)
media_include_subdirectory(vp)
endif()
media_include_subdirectory(codec)
2 changes: 1 addition & 1 deletion media_driver/media_softlet/agnostic/media_srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# OTHER DEALINGS IN THE SOFTWARE.

media_include_subdirectory(common)
if(ENABLE_REQUIRED_GEN_CODE OR GEN12)
if(GEN12)
media_include_subdirectory(gen12)
media_include_subdirectory(gen12_base)
media_include_subdirectory(gen12_tgllp)
Expand Down

0 comments on commit 3cbddb9

Please sign in to comment.