aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel
diff options
context:
space:
mode:
authorSumeet Pawnikar <sumeet.r.pawnikar@intel.com>2022-10-19 15:15:54 +0530
committerFelix Held <felix-coreboot@felixheld.de>2022-10-20 14:54:09 +0000
commit4dba71fd25c91a9e610287c61238a8fe24452e4e (patch)
tree9a61e75279e21d569fb3dd366f8c466396ed92a9 /src/drivers/intel
parent58a38af1175ea176b6719f864f277c4757b18d53 (diff)
Revert "drivers/intel/dptf: Add multiple fan support under dptf"
This reverts commit 672bd9bee5c0045694ef20fe3e2f7a003bef0edd. Reason for revert: Gmeet resolution dropped. When system starts Gmeet video call, it uses the hardware accelerated encoder as per the expectation. But, as soon as another system connects to the call, the immediate fallback observed from hardware to software encoder. Due to this, Gmeet resolution dropped from 720p to 180p. Currently, this issue observed on AlderLake-N SoC based fanless platforms. This issue is not seen on fan based systems. BUG=b:246535768,b:235254828 BRANCH=None TEST=Built and tested on Alderlake-N systems. With this revert Gmeet resolution drop not observed. Change-Id: Idaeaeaed47be44166a7cba9a0a1fac50d2688e50 Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68568 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Baieswara Reddy Sagili <baieswara.reddy.sagili@intel.com> Reviewed-by: V Sowmya <v.sowmya@intel.com>
Diffstat (limited to 'src/drivers/intel')
-rw-r--r--src/drivers/intel/dptf/chip.h12
-rw-r--r--src/drivers/intel/dptf/dptf.c83
2 files changed, 16 insertions, 79 deletions
diff --git a/src/drivers/intel/dptf/chip.h b/src/drivers/intel/dptf/chip.h
index 9bbf11f2f7..060f19699d 100644
--- a/src/drivers/intel/dptf/chip.h
+++ b/src/drivers/intel/dptf/chip.h
@@ -25,8 +25,6 @@ struct drivers_intel_dptf_config {
struct {
struct dptf_charger_perf charger_perf[DPTF_MAX_CHARGER_PERF_STATES];
struct dptf_fan_perf fan_perf[DPTF_MAX_FAN_PERF_STATES];
- struct dptf_multifan_perf
- multifan_perf[DPTF_MAX_FAN_PARTICIPANTS][DPTF_MAX_FAN_PERF_STATES];
struct dptf_power_limits power_limits;
} controls;
@@ -46,14 +44,6 @@ struct drivers_intel_dptf_config {
*/
bool low_speed_notify;
} fan;
-
- /* For multiple TFN fan options */
- struct {
- bool fine_grained_control;
- uint8_t step_size;
- bool low_speed_notify;
- } multifan_options[DPTF_MAX_FAN_PARTICIPANTS];
-
struct {
/*
* The amount of hysteresis implemented in circuitry or in the platform
@@ -72,8 +62,6 @@ struct drivers_intel_dptf_config {
/* Rest of platform Power */
uint32_t prop;
-
- bool dptf_multifan_support;
};
#endif /* _DRIVERS_INTEL_DPTF_CHIP_H_ */
diff --git a/src/drivers/intel/dptf/dptf.c b/src/drivers/intel/dptf/dptf.c
index 0a1fdc321b..450451082f 100644
--- a/src/drivers/intel/dptf/dptf.c
+++ b/src/drivers/intel/dptf/dptf.c
@@ -12,7 +12,6 @@
/* Generic DPTF participants have a PTYP field to distinguish them */
enum dptf_generic_participant_type {
DPTF_GENERIC_PARTICIPANT_TYPE_TSR = 0x3,
- DPTF_GENERIC_PARTICIPANT_TYPE_FAN = 0x4,
DPTF_GENERIC_PARTICIPANT_TYPE_TPCH = 0x5,
DPTF_GENERIC_PARTICIPANT_TYPE_CHARGER = 0xB,
DPTF_GENERIC_PARTICIPANT_TYPE_BATTERY = 0xC,
@@ -23,7 +22,6 @@ enum dptf_generic_participant_type {
#define DEFAULT_TPCH_STR "Intel PCH FIVR Participant"
#define DEFAULT_POWER_STR "Power Participant"
#define DEFAULT_BATTERY_STR "Battery Participant"
-#define DEFAULT_FAN_STR "Fan Participant"
#define PMC_IPC_COMMAND_FIVR_SIZE 0x8
@@ -53,26 +51,12 @@ static bool is_participant_used(const struct drivers_intel_dptf_config *config,
return true;
/* Check fan as well (its use is implicit in the Active policy) */
- if ((participant == DPTF_FAN || participant == DPTF_FAN_2) &&
- config->policies.active[0].target != DPTF_NONE)
+ if (participant == DPTF_FAN && config->policies.active[0].target != DPTF_NONE)
return true;
return false;
}
-/* Return the assigned namestring of the FAN participant */
-static const char *fan_namestring_of(enum dptf_participant participant)
-{
- switch (participant) {
- case DPTF_FAN:
- return "TFN1";
- case DPTF_FAN_2:
- return "TFN2";
- default:
- return "";
- }
-}
-
static const char *dptf_acpi_name(const struct device *dev)
{
return "DPTF";
@@ -131,20 +115,15 @@ static void write_tcpu(const struct device *pci_dev,
acpigen_pop_len(); /* TCPU Scope */
}
-/* \_SB.DPTF.TFNx */
+/* \_SB.DPTF.TFN1 */
static void write_fan(const struct drivers_intel_dptf_config *config,
- const struct dptf_platform_info *platform_info,
- enum dptf_participant participant)
+ const struct dptf_platform_info *platform_info)
{
- static int fan_uid = 0;
-
- acpigen_write_device(fan_namestring_of(participant));
+ acpigen_write_device("TFN1");
acpigen_write_name("_HID");
dptf_write_hid(platform_info->use_eisa_hids, platform_info->fan_hid);
- acpigen_write_name_integer("_UID", fan_uid++);
- acpigen_write_name_string("_STR", DEFAULT_FAN_STR);
- acpigen_write_name_integer("PTYP", DPTF_GENERIC_PARTICIPANT_TYPE_FAN);
- acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON);
+ acpigen_write_name_integer("_UID", 0);
+ acpigen_write_STA(get_STA_value(config, DPTF_FAN));
acpigen_pop_len(); /* Device */
}
@@ -459,7 +438,6 @@ static void write_device_definitions(const struct device *dev)
const struct dptf_platform_info *platform_info = get_dptf_platform_info();
const struct drivers_intel_dptf_config *config;
struct device *parent;
- enum dptf_participant p;
/* The CPU device gets an _ADR that matches the ACPI PCI address for 00:04.00 */
parent = dev && dev->bus ? dev->bus->dev : NULL;
@@ -472,13 +450,7 @@ static void write_device_definitions(const struct device *dev)
config = config_of(dev);
write_tcpu(parent, config);
write_open_dptf_device(dev, platform_info);
-
- if (config->dptf_multifan_support) {
- for (p = DPTF_FAN; p <= DPTF_FAN_2; ++p)
- write_fan(config, platform_info, p);
- } else
- write_fan(config, platform_info, DPTF_FAN);
-
+ write_fan(config, platform_info);
write_oem_variables(config);
write_imok();
write_generic_devices(config, platform_info);
@@ -504,7 +476,7 @@ static void write_policies(const struct drivers_intel_dptf_config *config)
config->policies.critical, DPTF_MAX_CRITICAL_POLICIES);
dptf_write_active_policies(config->policies.active,
- DPTF_MAX_ACTIVE_POLICIES, config->dptf_multifan_support);
+ DPTF_MAX_ACTIVE_POLICIES);
dptf_write_passive_policies(config->policies.passive,
DPTF_MAX_PASSIVE_POLICIES);
@@ -516,20 +488,8 @@ static void write_policies(const struct drivers_intel_dptf_config *config)
/* Writes other static tables that are used by DPTF */
static void write_controls(const struct drivers_intel_dptf_config *config)
{
- enum dptf_participant p;
- int fan_num;
-
dptf_write_charger_perf(config->controls.charger_perf, DPTF_MAX_CHARGER_PERF_STATES);
-
- /* Write TFN perf states based on the number of fans on the platform */
- if (config->dptf_multifan_support) {
- for (p = DPTF_FAN, fan_num = 0; p <= DPTF_FAN_2; ++p, ++fan_num)
- dptf_write_multifan_perf(config->controls.multifan_perf,
- DPTF_MAX_FAN_PERF_STATES, p, fan_num);
- } else
- dptf_write_fan_perf(config->controls.fan_perf, DPTF_MAX_FAN_PERF_STATES,
- DPTF_FAN);
-
+ dptf_write_fan_perf(config->controls.fan_perf, DPTF_MAX_FAN_PERF_STATES);
dptf_write_power_limits(&config->controls.power_limits);
}
@@ -537,25 +497,14 @@ static void write_controls(const struct drivers_intel_dptf_config *config)
static void write_options(const struct drivers_intel_dptf_config *config)
{
enum dptf_participant p;
- int i, fan_num;
+ int i;
- /* Configure Fan options based on the number of fans on the platform */
- if (config->dptf_multifan_support) {
- for (p = DPTF_FAN, fan_num = 0; p <= DPTF_FAN_2; ++p, ++fan_num) {
- dptf_write_scope(p);
- dptf_write_fan_options(
- config->options.multifan_options[fan_num].fine_grained_control,
- config->options.multifan_options[fan_num].step_size,
- config->options.multifan_options[fan_num].low_speed_notify);
- acpigen_pop_len(); /* Scope */
- }
- } else {
- dptf_write_scope(DPTF_FAN);
- dptf_write_fan_options(config->options.fan.fine_grained_control,
- config->options.fan.step_size,
- config->options.fan.low_speed_notify);
- acpigen_pop_len(); /* Scope */
- }
+ /* Fan options */
+ dptf_write_scope(DPTF_FAN);
+ dptf_write_fan_options(config->options.fan.fine_grained_control,
+ config->options.fan.step_size,
+ config->options.fan.low_speed_notify);
+ acpigen_pop_len(); /* Scope */
/* TSR options */
for (p = DPTF_TEMP_SENSOR_0, i = 0; p <= DPTF_TEMP_SENSOR_4; ++p, ++i) {