Skip to content

Commit

Permalink
[VP] VPBLT accessing regkey per frame
Browse files Browse the repository at this point in the history
refine VPBLT accessing regkey
  • Loading branch information
pengwan1 authored and intel-mediadev committed Aug 29, 2023
1 parent 7ba8e19 commit 3d49526
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 30 deletions.
9 changes: 8 additions & 1 deletion media_common/agnostic/common/vp/hal/vp_common_tools.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Intel Corporation
* Copyright (c) 2022-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -169,6 +169,10 @@ typedef struct _VP_CONFIG
bool isPacketReusedReported; // Reported vp packet reused.
bool isDnEnabled; // true if vp Dn enabled.
bool isDnEnabledReported; // Reported vp Dn reported
uint32_t dwCurrentVeboxScalability; // Current Vebox Scalability
uint32_t dwReportedVeboxScalability; // Reported Vebox Scalability
uint32_t dwCurrentVPApogeios; // Current VP Apogieos
uint32_t dwReportedVPApogeios; // Reported VP Apogieos

// Configurations for cache control
uint32_t dwDndiReferenceBuffer;
Expand Down Expand Up @@ -196,6 +200,9 @@ typedef struct _VP_CONFIG

// Optimize Cpu timing for VEBOX/SFC
bool bOptimizeCpuTiming;

// Output Regkey for whitelist
bool bOutputRegkey;
} VP_CONFIG, *PVP_CONFIG;

//!
Expand Down
8 changes: 7 additions & 1 deletion media_driver/agnostic/common/vp/hal/vphal_ddi.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2021, Intel Corporation
* Copyright (c) 2009-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -217,6 +217,12 @@ void VpHal_DdiReportFeatureMode(
pConfigValues->dwCurrentCompositionMode = pReport->GetFeatures().compositionMode;
pConfigValues->dwCurrentScdMode = pReport->GetFeatures().diScdMode;

// Report Vebox Scalability
pConfigValues->dwCurrentVeboxScalability = pReport->GetFeatures().VeboxScalability;

// Report VP Apogeios
pConfigValues->dwCurrentVPApogeios = pReport->GetFeatures().VPApogeios;

VP_DDI_NORMALMESSAGE("VP Feature Report: \
OutputPipeMode %d, \
HDRMode %d, \
Expand Down
26 changes: 25 additions & 1 deletion media_driver/linux/common/vp/ddi/media_libva_vp_tools.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2021, Intel Corporation
* Copyright (c) 2009-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -645,6 +645,8 @@ void VpConfigValuesInit(
#if (_DEBUG || _RELEASE_INTERNAL)
pConfigValues->dwRTOldCacheSettingReported = LIBVA_VP_CONFIG_NOT_REPORTED;
#endif
pConfigValues->dwReportedVeboxScalability = LIBVA_VP_CONFIG_NOT_REPORTED;
pConfigValues->dwReportedVPApogeios = LIBVA_VP_CONFIG_NOT_REPORTED;
}

void VpFeatureReport(
Expand Down Expand Up @@ -715,6 +717,28 @@ void VpFeatureReport(
MediaUserSetting::Group::Sequence);
#endif
#endif //(_DEBUG || _RELEASE_INTERNAL)

if (pConfig->dwCurrentVeboxScalability != pConfig->dwReportedVeboxScalability)
{
ReportUserSetting(
userSettingPtr,
__MEDIA_USER_FEATURE_VALUE_ENABLE_VEBOX_SCALABILITY_MODE,
pConfig->dwCurrentVeboxScalability,
MediaUserSetting::Group::Device);

pConfig->dwReportedVeboxScalability = pConfig->dwCurrentVeboxScalability;
}

if (pConfig->dwCurrentVPApogeios != pConfig->dwReportedVPApogeios)
{
ReportUserSetting(
userSettingPtr,
__MEDIA_USER_FEATURE_VALUE_VPP_APOGEIOS_ENABLE,
pConfig->dwCurrentVPApogeios,
MediaUserSetting::Group::Sequence);

pConfig->dwReportedVPApogeios = pConfig->dwCurrentVPApogeios;
}
}

VAStatus VpReportFeatureMode(PDDI_VP_CONTEXT pVpCtx)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2022, Intel Corporation
* Copyright (c) 2018-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -1947,19 +1947,16 @@ MOS_STATUS VpVeboxCmdPacket::RenderVeboxCmd(
if (bMultipipe)
{
scalability->SetCurrentPipeIndex(inputPipe);
VP_RENDER_CHK_STATUS_RETURN(ReportUserSetting(m_userSettingPtr, __MEDIA_USER_FEATURE_VALUE_ENABLE_VEBOX_SCALABILITY_MODE, true, MediaUserSetting::Group::Device));
}
else
{
VP_RENDER_CHK_STATUS_RETURN(ReportUserSetting(m_userSettingPtr, __MEDIA_USER_FEATURE_VALUE_ENABLE_VEBOX_SCALABILITY_MODE, false, MediaUserSetting::Group::Device));
}

auto report = (VpFeatureReport *)(m_hwInterface->m_reporting);
report->GetFeatures().VeboxScalability = bMultipipe;

MT_LOG2(MT_VP_HAL_RENDER_VE, MT_NORMAL, MT_VP_MHW_VE_SCALABILITY_EN, bMultipipe, MT_VP_MHW_VE_SCALABILITY_USE_SFC, m_IsSfcUsed);

return eStatus;
}


void VpVeboxCmdPacket::AddCommonOcaMessage(PMOS_COMMAND_BUFFER pCmdBufferInUse, MOS_CONTEXT_HANDLE pOsContext, PMOS_INTERFACE pOsInterface, PRENDERHAL_INTERFACE pRenderHal, PMHW_MI_MMIOREGISTERS pMmioRegisters)
{
VP_FUNC_CALL();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Intel Corporation
* Copyright (c) 2021-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -131,6 +131,12 @@ void VpFeatureReport::SetConfigValues(
configValues->dwCurrentCompositionMode = m_features.compositionMode;
configValues->dwCurrentScdMode = m_features.diScdMode;

// Report Vebox Scalability
configValues->dwCurrentVeboxScalability = m_features.VeboxScalability;

// Report VP Apogeios
configValues->dwCurrentVPApogeios = m_features.VPApogeios;

VP_PUBLIC_NORMALMESSAGE(
"VP Feature Report: \
OutputPipeMode %d, \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Intel Corporation
* Copyright (c) 2021-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -73,6 +73,8 @@ class VpFeatureReport
#if (_DEBUG || _RELEASE_INTERNAL)
uint8_t rtOldCacheSetting = 0; //!< Render Target old cache usage
#endif
bool VeboxScalability = false; //!< Vebox Scalability flag
bool VPApogeios = false; //!< VP Apogeios flag
};

virtual ~VpFeatureReport(){};
Expand Down
19 changes: 2 additions & 17 deletions media_softlet/agnostic/common/vp/hal/pipeline/vp_pipeline.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2022, Intel Corporation
* Copyright (c) 2018-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -207,22 +207,7 @@ MOS_STATUS VpPipeline::UserFeatureReport()

MediaPipeline::UserFeatureReport();

if (m_currentFrameAPGEnabled)
{
ReportUserSetting(
m_userSettingPtr,
__MEDIA_USER_FEATURE_VALUE_VPP_APOGEIOS_ENABLE,
uint32_t(1),
MediaUserSetting::Group::Sequence);
}
else
{
ReportUserSetting(
m_userSettingPtr,
__MEDIA_USER_FEATURE_VALUE_VPP_APOGEIOS_ENABLE,
uint32_t(0),
MediaUserSetting::Group::Sequence);
}
m_reporting->GetFeatures().VPApogeios = m_currentFrameAPGEnabled;

#if (_DEBUG || _RELEASE_INTERNAL)
//INTER_FRAME_MEMORY_NINJA_START_COUNTER will be reported in ReportIFNCC(true) function which runs in VpPipeline::Prepare()
Expand Down
28 changes: 27 additions & 1 deletion media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, Intel Corporation
* Copyright (c) 2021-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -1530,6 +1530,9 @@ void DdiVpFunctions::VpConfigValuesInit(
configValues->dwScalerCompressModeReported = LIBVA_VP_CONFIG_NOT_REPORTED;
configValues->dwPrimaryCompressibleReported = LIBVA_VP_CONFIG_NOT_REPORTED;
configValues->dwPrimaryCompressModeReported = LIBVA_VP_CONFIG_NOT_REPORTED;

configValues->dwReportedVeboxScalability = LIBVA_VP_CONFIG_NOT_REPORTED;
configValues->dwReportedVPApogeios = LIBVA_VP_CONFIG_NOT_REPORTED;
return;
}

Expand Down Expand Up @@ -1627,6 +1630,29 @@ void DdiVpFunctions::VpFeatureReport(PVP_CONFIG config, PDDI_VP_CONTEXT vpCtx)

#endif
#endif //(_DEBUG || _RELEASE_INTERNAL)

if (config->dwCurrentVeboxScalability != config->dwReportedVeboxScalability)
{
ReportUserSetting(
userSettingPtr,
__MEDIA_USER_FEATURE_VALUE_ENABLE_VEBOX_SCALABILITY_MODE,
config->dwCurrentVeboxScalability,
MediaUserSetting::Group::Device);

config->dwReportedVeboxScalability = config->dwCurrentVeboxScalability;
}

if (config->dwCurrentVPApogeios != config->dwReportedVPApogeios)
{
ReportUserSetting(
userSettingPtr,
__MEDIA_USER_FEATURE_VALUE_VPP_APOGEIOS_ENABLE,
config->dwCurrentVPApogeios,
MediaUserSetting::Group::Sequence);

config->dwReportedVPApogeios = config->dwCurrentVPApogeios;
}

return;
}

Expand Down

0 comments on commit 3d49526

Please sign in to comment.