PerformanceControlDynamicCaps DomainPerformanceControl_003::getPerformanceControlDynamicCaps(UIntN participantIndex,
    UIntN domainIndex)
{
    checkAndCreateControlStructures(domainIndex);

    return *m_performanceControlDynamicCaps;
}
PerformanceControlStaticCaps DomainPerformanceControl_003::getPerformanceControlStaticCaps(UIntN participantIndex,
    UIntN domainIndex)
{
    checkAndCreateControlStructures(domainIndex);

    return *m_performanceControlStaticCaps;  //This is hard-coded to FALSE in 7.0
}
示例#3
0
void DomainActiveControl_001::setActiveControl(UIntN participantIndex, UIntN domainIndex, UIntN controlIndex)
{
    checkAndCreateControlStructures(domainIndex);

    if (m_activeControlStaticCaps->supportsFineGrainedControl())
    {
        // If fine grain control is supported, use the method that takes a Percentage as the set parameter
        throw dptf_exception("Wrong function called.  Since fine grain control is supported, use the \
            setActiveControl function that take a Percentage as an argument.");
    }
示例#4
0
XmlNode* DomainDisplayControl_001::getXml(UIntN domainIndex)
{
    checkAndCreateControlStructures(domainIndex);

    XmlNode* root = XmlNode::createWrapperElement("display_control");
    root->addChild(getDisplayControlStatus(Constants::Invalid, domainIndex).getXml());
    root->addChild(m_displayControlDynamicCaps->getXml());
    root->addChild(m_displayControlSet->getXml());
    root->addChild(XmlNode::createDataElement("control_knob_version", "001"));

    return root;
}
示例#5
0
XmlNode* DomainConfigTdpControl_001::getXml(UIntN domainIndex)
{
    checkAndCreateControlStructures(domainIndex);

    XmlNode* root = XmlNode::createWrapperElement("config_tdp_control");

    root->addChild(m_configTdpControlDynamicCaps->getXml());
    root->addChild(m_configTdpControlSet->getXml());
    root->addChild(m_configTdpControlStatus->getXml());
    root->addChild(XmlNode::createDataElement("control_knob_version", "001"));

    return root;
}
示例#6
0
XmlNode* DomainPowerControl_001::getXml(UIntN domainIndex)
{
    checkAndCreateControlStructures(domainIndex);

    XmlNode* root = XmlNode::createWrapperElement("power_control");

    if (m_powerControlStatusSet != nullptr)
    {
        root->addChild(m_powerControlStatusSet->getXml());
    }

    root->addChild(m_powerControlDynamicCaps->getXml());
    root->addChild(XmlNode::createDataElement("control_knob_version", "001"));

    return root;
}
void DomainPerformanceControl_003::setPerformanceControl(UIntN participantIndex, UIntN domainIndex,
    UIntN performanceControlIndex)
{
    checkAndCreateControlStructures(domainIndex);

    verifyPerformanceControlIndex(performanceControlIndex);

    m_participantServicesInterface->primitiveExecuteSetAsUInt32(
        esif_primitive_type::SET_PERF_PRESENT_CAPABILITY, // SET_PERF_SUPPORT_STATE
        performanceControlIndex,
        domainIndex);

    // Refresh the status
    m_currentPerformanceControlIndex = performanceControlIndex;

    delete m_performanceControlStatus;
    m_performanceControlStatus = new PerformanceControlStatus(m_currentPerformanceControlIndex);
}
示例#8
0
DisplayControlStatus DomainDisplayControl_001::getDisplayControlStatus(UIntN participantIndex, UIntN domainIndex)
{
    if (m_currentDisplayControlIndex == Constants::Invalid)
    {
        checkAndCreateControlStructures(domainIndex);

        // FIXME : This primitive will return the brightness after ALS setting has been applied!

        Percentage brightnessPercentage = m_participantServicesInterface->primitiveExecuteGetAsPercentage(
            esif_primitive_type::GET_DISPLAY_BRIGHTNESS_SOFT, domainIndex);

        m_currentDisplayControlIndex = m_displayControlSet->getControlIndex(brightnessPercentage);

        DELETE_MEMORY_TC(m_displayControlStatus);
        m_displayControlStatus = new DisplayControlStatus(m_currentDisplayControlIndex);
    }

    return *m_displayControlStatus;
}
示例#9
0
void DomainPowerControl_001::setPowerControl(UIntN participantIndex, UIntN domainIndex, const PowerControlStatusSet& powerControlStatusSet)
{
    checkAndCreateControlStructures(domainIndex);

    if (powerControlStatusSet.getCount() > PowerControlType::max)
    {
        throw dptf_exception("Too many power controls in the set!");
    }

    for (UIntN i = 0; i < powerControlStatusSet.getCount(); i++)
    {
        validatePowerControlStatus(powerControlStatusSet[i]);

        programPowerControl(powerControlStatusSet[i], domainIndex);
    }

    // Update control set
    delete m_powerControlStatusSet;
    m_powerControlStatusSet = new PowerControlStatusSet(powerControlStatusSet);
}
示例#10
0
void DomainConfigTdpControl_001::setConfigTdpControl(UIntN participantIndex, UIntN domainIndex,
    UIntN configTdpControlIndex)
{
    checkAndCreateControlStructures(domainIndex);

    // If any of the lock bits are set, we cannot program cTDP
    if (m_configTdpLock)
    {
        getParticipantServices()->writeMessageWarning(
            ParticipantMessage(FLF, "cTDP set level ignored, lock bit is set!"));
        return;
    }

    // Bounds checking
    verifyConfigTdpControlIndex(configTdpControlIndex);

    getParticipantServices()->primitiveExecuteSetAsUInt32(
        esif_primitive_type::SET_PROC_CTDP_CONTROL,
        (UInt32)(*m_configTdpControlSet)[configTdpControlIndex].getControlId(), // This is what 7.x does
        domainIndex);

    getParticipantServices()->primitiveExecuteSetAsUInt32(
        esif_primitive_type::SET_PROC_TURBO_ACTIVATION_RATIO,
        (UInt32)((*m_configTdpControlSet)[configTdpControlIndex].getTdpRatio() - 1), // This is what 7.x does
        domainIndex);

    // Then BIOS
    getParticipantServices()->primitiveExecuteSetAsUInt32(
        esif_primitive_type::SET_CTDP_POINT,
        configTdpControlIndex,
        domainIndex);

    // Refresh the status
    DELETE_MEMORY_TC(m_configTdpControlStatus);
    m_configTdpControlStatus = new ConfigTdpControlStatus(configTdpControlIndex);
}
示例#11
0
void DomainDisplayControl_001::setDisplayControl(UIntN participantIndex, UIntN domainIndex,
    UIntN displayControlIndex, Bool isOverridable)
{
    checkAndCreateControlStructures(domainIndex);

    if (displayControlIndex == m_currentDisplayControlIndex)
    {
        m_participantServicesInterface->writeMessageDebug(
            ParticipantMessage(FLF, "Requested limit = current limit.  Ignoring."));
        return;
    }

    verifyDisplayControlIndex(displayControlIndex);

    Percentage newBrightness = (*m_displayControlSet)[m_currentDisplayControlIndex].getBrightness();

    if (isOverridable == true)
    {
        m_participantServicesInterface->primitiveExecuteSetAsPercentage(
            esif_primitive_type::SET_DISPLAY_BRIGHTNESS_SOFT,
            newBrightness,
            domainIndex);
    }
    else
    {
        m_participantServicesInterface->primitiveExecuteSetAsPercentage(
            esif_primitive_type::SET_DISPLAY_BRIGHTNESS_HARD,
            newBrightness,
            domainIndex);
    }

    // Refresh the status
    m_currentDisplayControlIndex = displayControlIndex;
    DELETE_MEMORY_TC(m_displayControlStatus);
    m_displayControlStatus = new DisplayControlStatus(m_currentDisplayControlIndex);
}
示例#12
0
ConfigTdpControlSet DomainConfigTdpControl_001::getConfigTdpControlSet(UIntN participantIndex, UIntN domainIndex)
{
    checkAndCreateControlStructures(domainIndex);
    return *m_configTdpControlSet;
}
示例#13
0
ActiveControlSet DomainActiveControl_001::getActiveControlSet(UIntN participantIndex, UIntN domainIndex)
{
    checkAndCreateControlStructures(domainIndex);

    return *m_activeControlSet;
}
示例#14
0
PowerControlDynamicCapsSet DomainPowerControl_001::getPowerControlDynamicCapsSet(UIntN participantIndex, UIntN domainIndex)
{
    checkAndCreateControlStructures(domainIndex);

    return *m_powerControlDynamicCaps;
}
示例#15
0
DisplayControlSet DomainDisplayControl_001::getDisplayControlSet(UIntN participantIndex, UIntN domainIndex)
{
    checkAndCreateControlStructures(domainIndex);

    return *m_displayControlSet;
}