Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Decode] Reenable VC1 decode for DG2 #1846

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion media_driver/linux/Xe_M/ddi/media_sku_wa_xe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static struct LinuxCodecInfo Dg2CodecInfo =
.avcDecoding = 1,
.mpeg2Decoding = 1,
.vp8Decoding = 0,
.vc1Decoding = 0,
.vc1Decoding = SET_STATUS_BY_FULL_OPEN_SOURCE(1, 0),
.jpegDecoding = 1,
.avcEncoding = 0,
.mpeg2Encoding = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ static bool dg2RegisteredMhw =
#define PLATFORM_INTEL_DG2 22
#define GENX_XEHP 11
#define GENX_DG2 13
#define GENX_TGLLP 12

MOS_STATUS MhwInterfacesDg2::Initialize(
CreateParams params,
Expand Down Expand Up @@ -916,7 +917,6 @@ MOS_STATUS CodechalInterfacesNextXe_Hpm::Initialize(
return MOS_STATUS_SUCCESS;
}

#ifdef _MEDIA_RESERVED
static bool dg2RegisteredCMHal =
MediaFactory<uint32_t, CMHalDevice>::
Register<CMHalInterfacesXe_Hpm>((uint32_t)IGFX_DG2);
Expand All @@ -933,12 +933,18 @@ MOS_STATUS CMHalInterfacesXe_Hpm::Initialize(CM_HAL_STATE *pCmState)
MHW_ASSERTMESSAGE("Create CM Hal interfaces failed.")
return MOS_STATUS_NO_SPACE;
}
#ifdef _MEDIA_RESERVED
device->SetCopyKernelIsa((void*)pGPUCopy_kernel_isa_dg2, iGPUCopy_kernel_isa_size_dg2);
device->SetInitKernelIsa((void*)pGPUInit_kernel_isa_dg2, iGPUInit_kernel_isa_size_dg2);
#endif

m_cmhalDevice = device;
m_cmhalDevice->SetGenPlatformInfo(PLATFORM_INTEL_DG2, PLATFORM_INTEL_GT2, "DG2");
uint32_t cisaIDs[] = { GENX_DG2 , GENX_XEHP };
#ifdef _MEDIA_RESVERED
uint32_t cisaIDs[] = { GENX_DG2, GENX_XEHP };
#else
uint32_t cisaIDs[] = { GENX_TGLLP, GENX_DG2, GENX_XEHP };
#endif
m_cmhalDevice->AddSupportedCisaIDs(cisaIDs, sizeof(cisaIDs)/sizeof(uint32_t));

if (pCmState->skuTable && MEDIA_IS_SKU(pCmState->skuTable, FtrCCSNode))
Expand All @@ -951,7 +957,6 @@ MOS_STATUS CMHalInterfacesXe_Hpm::Initialize(CM_HAL_STATE *pCmState)
m_cmhalDevice->m_l3ConfigCount = DG2_L3_CONFIG_COUNT;
return MOS_STATUS_SUCCESS;
}
#endif

static bool dg2RegisteredRenderHal =
MediaFactory<uint32_t, RenderHalDevice>::
Expand Down Expand Up @@ -1110,4 +1115,4 @@ MOS_STATUS CodechalInterfacesXe_Hpm::CreateCodecHalInterface(MhwInterfaces *mhwI
}
#endif // USE_CODECHAL_DEBUG_TOOL
return MOS_STATUS_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@

#include "cm_hal_xe_xpm.h"

#endif // _MEDIA_RESERVED
#else // _MEDIA_RESERVED

#include "cm_hal_g12.h"

#endif // !_MEDIA_RESERVED

#include "vphal_xe_xpm.h"
#include "vphal_xe_hpm.h"
Expand Down Expand Up @@ -356,15 +360,17 @@ static const L3ConfigRegisterValues DG2_L3_PLANES[DG2_L3_CONFIG_COUNT] =
{0x80000000, 0x70000080, 0, 0}, // 256 0 0 224 32 512
};

#ifdef _MEDIA_RESERVED
class CMHalInterfacesXe_Hpm : public CMHalDevice
{
protected:
#ifdef _MEDIA_RESERVED
using CMHal = CmHalXe_Xpm;
#else
using CMHal = CM_HAL_G12_X;
#endif
MOS_STATUS Initialize(
CM_HAL_STATE *pCmState);
};
#endif

class VphalInterfacesXe_Hpm : public VphalDevice
{
Expand Down
Loading