Skip to content

Commit

Permalink
[VP] [Kernel]add RegKey Control FC
Browse files Browse the repository at this point in the history
add regKey to control
  • Loading branch information
jiafengy1 authored and intel-mediadev committed Nov 7, 2024
1 parent 83f8d17 commit 928d451
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 15 deletions.
10 changes: 10 additions & 0 deletions media_softlet/agnostic/common/vp/hal/pipeline/vp_pipeline_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ typedef enum _VPHAL_COMP_BYPASS_MODE
VPHAL_COMP_BYPASS_DEFAULT = 0x2
} VPHAL_COMP_BYPASS_MODE, *PVPHAL_COMP_BYPASS_MODE;

//!
//! \brief VP CTRL enum
//!
typedef enum _VP_CTRL
{
VP_CTRL_DISABLE = 0,
VP_CTRL_ENABLE,
VP_CTRL_DEFAULT
} VP_CTRL;

struct VP_SURFACE
{
MOS_SURFACE *osSurface = nullptr; //!< mos surface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,12 @@ MOS_STATUS VpUserFeatureControl::CreateUserSettingForDebug()
MediaUserSetting::Group::Sequence);
if (MOS_SUCCEEDED(eRegKeyReadStatus))
{
m_ctrlValDefault.bEnableOcl3DLut = bEnableOCL3DLut;
m_ctrlValDefault.enableOcl3DLut = bEnableOCL3DLut ? VP_CTRL_ENABLE : VP_CTRL_DISABLE;
}
else
{
// Default value
m_ctrlValDefault.bEnableOcl3DLut = false;
m_ctrlValDefault.enableOcl3DLut = VP_CTRL_DEFAULT;
}

bool bForceOclFC = false;
Expand All @@ -434,12 +434,12 @@ MOS_STATUS VpUserFeatureControl::CreateUserSettingForDebug()
MediaUserSetting::Group::Sequence);
if (MOS_SUCCEEDED(eRegKeyReadStatus))
{
m_ctrlValDefault.bForceOclFC = bForceOclFC;
m_ctrlValDefault.forceOclFC = bForceOclFC ? VP_CTRL_ENABLE : VP_CTRL_DISABLE;
}
else
{
// Default value
m_ctrlValDefault.bForceOclFC = false;
m_ctrlValDefault.forceOclFC = VP_CTRL_DEFAULT;
}

bool bDisableOclFcFp = false;
Expand Down Expand Up @@ -509,18 +509,38 @@ PMOS_OCA_LOG_USER_FEATURE_CONTROL_INFO VpUserFeatureControl::GetOcaFeautreContro

bool VpUserFeatureControl::EnableOclFC()
{
bool bEnableOclFC = (m_vpPlatformInterface && m_vpPlatformInterface->SupportOclKernel());
#if (_DEBUG || _RELEASE_INTERNAL)
bEnableOclFC |= m_ctrlVal.bForceOclFC;
#endif
bool bEnableOclFC = false;
if (m_ctrlVal.forceOclFC == VP_CTRL_ENABLE)
{
bEnableOclFC = true;
}
else if (m_ctrlVal.forceOclFC == VP_CTRL_DISABLE)
{
bEnableOclFC = false;
}
else // if (m_ctrlVal.forceOclFC == VP_CTRL_DEFAULT)
{
bEnableOclFC = (m_vpPlatformInterface && m_vpPlatformInterface->SupportOclKernel());
}
VP_PUBLIC_NORMALMESSAGE("EnableOclFC set as %d", bEnableOclFC);
return bEnableOclFC;
}

bool VpUserFeatureControl::EnableOcl3DLut()
{
bool bEnableOcl3DLut = (m_vpPlatformInterface && m_vpPlatformInterface->SupportOclKernel());
#if (_DEBUG || _RELEASE_INTERNAL)
bEnableOcl3DLut |= m_ctrlVal.bEnableOcl3DLut;
#endif
bool bEnableOcl3DLut = false;
if (m_ctrlVal.enableOcl3DLut == VP_CTRL_ENABLE)
{
bEnableOcl3DLut = true;
}
else if (m_ctrlVal.enableOcl3DLut == VP_CTRL_DISABLE)
{
bEnableOcl3DLut = false;
}
else // if (m_ctrlVal.enableOcl3DLut == VP_CTRL_DEFAULT)
{
bEnableOcl3DLut = (m_vpPlatformInterface && m_vpPlatformInterface->SupportOclKernel());
}
VP_PUBLIC_NORMALMESSAGE("EnableOcl3DLut set as %d", bEnableOcl3DLut);
return bEnableOcl3DLut;
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ class VpUserFeatureControl
uint32_t enabledSFCNv12P010LinearOutput = 0;
uint32_t enabledSFCRGBPRGB24Output = 0;
bool enableIFNCC = false;
bool bEnableOcl3DLut = false;
bool bForceOclFC = false;
bool bDisableOclFcFp = false;
#endif
VP_CTRL enableOcl3DLut = VP_CTRL_DEFAULT;
VP_CTRL forceOclFC = VP_CTRL_DEFAULT;
bool bDisableOclFcFp = false;

bool disablePacketReuse = false;
bool enablePacketReuseTeamsAlways = false;

Expand Down

0 comments on commit 928d451

Please sign in to comment.