soc/intel: Add config to use S3 over S0ix
When S0ix support is enabled it is always advertised to the OS that it is the preferred suspend method via the FADT feature flag. This config prevents the feature flag from being set, indicating to the OS that S3 suspend is the preferred sleep method. Test: `/sys/power/mem_sleep` defaults to "deep" on system76/darp8. Change-Id: Ife98166338c5457fb2c7dad81a30e54f487495f6 Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
@@ -158,7 +158,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt)
|
||||
|
||||
fill_fadt_extended_pm_io(fadt);
|
||||
|
||||
if (config->s0ix_enable)
|
||||
if (config->s0ix_enable && !config->prefer_s3_suspend)
|
||||
fadt->flags |= ACPI_FADT_LOW_PWR_IDLE_S0;
|
||||
}
|
||||
|
||||
|
@@ -771,6 +771,14 @@ struct soc_intel_alderlake_config {
|
||||
* Set this to 0 in order to disable hwp scalability tracking.
|
||||
*/
|
||||
bool enable_hwp_scalability_tracking;
|
||||
|
||||
/*
|
||||
* Used with `s0ix_enable` to indicate S3 is the preferred suspend
|
||||
* method via the FADT feature flag.
|
||||
* Default is set to false, using S0ix for suspend.
|
||||
* Set this to true to indicate to the OS that S3 should be used.
|
||||
*/
|
||||
bool prefer_s3_suspend;
|
||||
};
|
||||
|
||||
typedef struct soc_intel_alderlake_config config_t;
|
||||
|
@@ -157,7 +157,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt)
|
||||
|
||||
fill_fadt_extended_pm_io(fadt);
|
||||
|
||||
if (config->s0ix_enable)
|
||||
if (config->s0ix_enable && !config->prefer_s3_suspend)
|
||||
fadt->flags |= ACPI_FADT_LOW_PWR_IDLE_S0;
|
||||
}
|
||||
|
||||
|
@@ -452,6 +452,14 @@ struct soc_intel_cannonlake_config {
|
||||
bool cpu_turbo_disable;
|
||||
|
||||
bool disable_vmx;
|
||||
|
||||
/*
|
||||
* Used with `s0ix_enable` to indicate S3 is the preferred suspend
|
||||
* method via the FADT feature flag.
|
||||
* Default is set to false, using S0ix for suspend.
|
||||
* Set this to true to indicate to the OS that S3 should be used.
|
||||
*/
|
||||
bool prefer_s3_suspend;
|
||||
};
|
||||
|
||||
typedef struct soc_intel_cannonlake_config config_t;
|
||||
|
@@ -159,7 +159,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt)
|
||||
|
||||
fill_fadt_extended_pm_io(fadt);
|
||||
|
||||
if (config->s0ix_enable)
|
||||
if (config->s0ix_enable && !config->prefer_s3_suspend)
|
||||
fadt->flags |= ACPI_FADT_LOW_PWR_IDLE_S0;
|
||||
}
|
||||
|
||||
|
@@ -525,6 +525,14 @@ struct soc_intel_meteorlake_config {
|
||||
* as per `enum slew_rate` data type.
|
||||
*/
|
||||
uint8_t slow_slew_rate_config[NUM_VR_DOMAINS];
|
||||
|
||||
/*
|
||||
* Used with `s0ix_enable` to indicate S3 is the preferred suspend
|
||||
* method via the FADT feature flag.
|
||||
* Default is set to false, using S0ix for suspend.
|
||||
* Set this to true to indicate to the OS that S3 should be used.
|
||||
*/
|
||||
bool prefer_s3_suspend;
|
||||
};
|
||||
|
||||
typedef struct soc_intel_meteorlake_config config_t;
|
||||
|
@@ -156,7 +156,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt)
|
||||
|
||||
fill_fadt_extended_pm_io(fadt);
|
||||
|
||||
if (config->s0ix_enable)
|
||||
if (config->s0ix_enable && !config->prefer_s3_suspend)
|
||||
fadt->flags |= ACPI_FADT_LOW_PWR_IDLE_S0;
|
||||
}
|
||||
|
||||
|
@@ -533,6 +533,14 @@ struct soc_intel_tigerlake_config {
|
||||
|
||||
/* i915 struct for GMA backlight control */
|
||||
struct i915_gpu_controller_info gfx;
|
||||
|
||||
/*
|
||||
* Used with `s0ix_enable` to indicate S3 is the preferred suspend
|
||||
* method via the FADT feature flag.
|
||||
* Default is set to false, using S0ix for suspend.
|
||||
* Set this to true to indicate to the OS that S3 should be used.
|
||||
*/
|
||||
bool prefer_s3_suspend;
|
||||
};
|
||||
|
||||
typedef struct soc_intel_tigerlake_config config_t;
|
||||
|
Reference in New Issue
Block a user