Revert "drivers/intel/dptf: Add multiple fan support under dptf"

This reverts commit 672bd9bee5.

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>
This commit is contained in:
Sumeet Pawnikar
2022-10-19 15:15:54 +05:30
committed by Felix Held
parent 58a38af117
commit 4dba71fd25
9 changed files with 45 additions and 205 deletions

View File

@@ -62,8 +62,6 @@ static const char *namestring_of(enum dptf_participant participant)
return "TCHG";
case DPTF_FAN:
return "TFN1";
case DPTF_FAN_2:
return "TFN2";
case DPTF_TEMP_SENSOR_0:
return "TSR0";
case DPTF_TEMP_SENSOR_1:
@@ -125,7 +123,7 @@ void dptf_write_scope(enum dptf_participant participant)
* are used to increase the speed of the fan in order to speed up cooling.
*/
static void write_active_relationship_table(const struct dptf_active_policy *policies,
int max_count, bool dptf_multifan_support)
int max_count)
{
char *pkg_count;
int i, j;
@@ -156,11 +154,7 @@ static void write_active_relationship_table(const struct dptf_active_policy *pol
/* Source, Target, Percent, Fan % for each of _AC0 ... _AC9 */
acpigen_write_package(13);
if (dptf_multifan_support)
acpigen_emit_namestring(path_of(policies[i].source));
else
acpigen_emit_namestring(path_of(DPTF_FAN));
acpigen_emit_namestring(path_of(DPTF_FAN));
acpigen_emit_namestring(path_of(policies[i].target));
acpigen_write_integer(DEFAULT_IF_0(policies[i].weight, DEFAULT_WEIGHT));
@@ -211,10 +205,9 @@ static void write_active_cooling_methods(const struct dptf_active_policy *polici
}
}
void dptf_write_active_policies(const struct dptf_active_policy *policies,
int max_count, bool dptf_multifan_support)
void dptf_write_active_policies(const struct dptf_active_policy *policies, int max_count)
{
write_active_relationship_table(policies, max_count, dptf_multifan_support);
write_active_relationship_table(policies, max_count);
write_active_cooling_methods(policies, max_count);
}
@@ -359,29 +352,7 @@ void dptf_write_charger_perf(const struct dptf_charger_perf *states, int max_cou
acpigen_pop_len(); /* Scope */
}
int dptf_write_fan_perf_fps(uint8_t percent, uint16_t power, uint16_t speed,
uint16_t noise_level)
{
/*
* Some _FPS tables do include a last entry where Percent is 0, but Power is
* called out, so this table is finished when both are zero.
*/
if (!percent && !power)
return 1;
acpigen_write_package(5);
acpigen_write_integer(percent);
acpigen_write_integer(DEFAULT_TRIP_POINT);
acpigen_write_integer(speed);
acpigen_write_integer(noise_level);
acpigen_write_integer(power);
acpigen_pop_len(); /* inner Package */
return 0;
}
void dptf_write_fan_perf(const struct dptf_fan_perf *states, int max_count,
enum dptf_participant participant)
void dptf_write_fan_perf(const struct dptf_fan_perf *states, int max_count)
{
char *pkg_count;
int i;
@@ -389,48 +360,29 @@ void dptf_write_fan_perf(const struct dptf_fan_perf *states, int max_count,
if (!max_count || !states[0].percent)
return;
dptf_write_scope(participant);
dptf_write_scope(DPTF_FAN);
/* _FPS - Fan Performance States */
acpigen_write_name("_FPS");
pkg_count = acpigen_write_package(1); /* 1 for Revision */
acpigen_write_integer(FPS_REVISION); /* revision */
for (i = 0; i < max_count; ++i) {
(*pkg_count)++;
if (dptf_write_fan_perf_fps(states[i].percent, states[i].power,
states[i].speed, states[i].noise_level))
/*
* Some _FPS tables do include a last entry where Percent is 0, but Power is
* called out, so this table is finished when both are zero.
*/
if (!states[i].percent && !states[i].power)
break;
}
acpigen_pop_len(); /* Package */
acpigen_pop_len(); /* Scope */
}
void dptf_write_multifan_perf(
const struct dptf_multifan_perf (*states)[DPTF_MAX_FAN_PERF_STATES],
int max_count, enum dptf_participant participant, int fan_num)
{
char *pkg_count;
int i;
if (!max_count || !states[fan_num][0].percent)
return;
dptf_write_scope(participant);
/* _FPS - Fan Performance States */
acpigen_write_name("_FPS");
pkg_count = acpigen_write_package(1); /* 1 for Revision */
acpigen_write_integer(FPS_REVISION); /* revision */
for (i = 0; i < max_count; ++i) {
(*pkg_count)++;
if (dptf_write_fan_perf_fps(states[fan_num][i].percent, states[fan_num][i].power,
states[fan_num][i].speed, states[fan_num][i].noise_level))
break;
acpigen_write_package(5);
acpigen_write_integer(states[i].percent);
acpigen_write_integer(DEFAULT_TRIP_POINT);
acpigen_write_integer(states[i].speed);
acpigen_write_integer(states[i].noise_level);
acpigen_write_integer(states[i].power);
acpigen_pop_len(); /* inner Package */
}
acpigen_pop_len(); /* Package */