Commit 105b7c11 authored by Rodrigo Vivi's avatar Rodrigo Vivi Committed by Daniel Vetter

drm/intel: add enable_psr module option and disable psr by default

v2: prefer seq_puts to seq_printf detected by Paulo Zanoni.
v3: PSR is disabled by default. Without userspace ready it
    will cause regression for kde and xdm users
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: default avatarShobhit Kumar <shobhit.kumar@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 3f51e471
...@@ -1565,6 +1565,9 @@ static int i915_edp_psr_status(struct seq_file *m, void *data) ...@@ -1565,6 +1565,9 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)
case PSR_NO_SINK: case PSR_NO_SINK:
seq_puts(m, "not supported by panel"); seq_puts(m, "not supported by panel");
break; break;
case PSR_MODULE_PARAM:
seq_puts(m, "disabled by flag");
break;
case PSR_CRTC_NOT_ACTIVE: case PSR_CRTC_NOT_ACTIVE:
seq_puts(m, "crtc not active"); seq_puts(m, "crtc not active");
break; break;
......
...@@ -118,6 +118,10 @@ module_param_named(i915_enable_ppgtt, i915_enable_ppgtt, int, 0600); ...@@ -118,6 +118,10 @@ module_param_named(i915_enable_ppgtt, i915_enable_ppgtt, int, 0600);
MODULE_PARM_DESC(i915_enable_ppgtt, MODULE_PARM_DESC(i915_enable_ppgtt,
"Enable PPGTT (default: true)"); "Enable PPGTT (default: true)");
int i915_enable_psr __read_mostly = 0;
module_param_named(enable_psr, i915_enable_psr, int, 0600);
MODULE_PARM_DESC(enable_psr, "Enable PSR (default: false)");
unsigned int i915_preliminary_hw_support __read_mostly = 0; unsigned int i915_preliminary_hw_support __read_mostly = 0;
module_param_named(preliminary_hw_support, i915_preliminary_hw_support, int, 0600); module_param_named(preliminary_hw_support, i915_preliminary_hw_support, int, 0600);
MODULE_PARM_DESC(preliminary_hw_support, MODULE_PARM_DESC(preliminary_hw_support,
......
...@@ -596,6 +596,7 @@ struct i915_fbc { ...@@ -596,6 +596,7 @@ struct i915_fbc {
enum no_psr_reason { enum no_psr_reason {
PSR_NO_SOURCE, /* Not supported on platform */ PSR_NO_SOURCE, /* Not supported on platform */
PSR_NO_SINK, /* Not supported by panel */ PSR_NO_SINK, /* Not supported by panel */
PSR_MODULE_PARAM,
PSR_CRTC_NOT_ACTIVE, PSR_CRTC_NOT_ACTIVE,
PSR_PWR_WELL_ENABLED, PSR_PWR_WELL_ENABLED,
PSR_NOT_TILED, PSR_NOT_TILED,
...@@ -1621,6 +1622,7 @@ extern int i915_enable_rc6 __read_mostly; ...@@ -1621,6 +1622,7 @@ extern int i915_enable_rc6 __read_mostly;
extern int i915_enable_fbc __read_mostly; extern int i915_enable_fbc __read_mostly;
extern bool i915_enable_hangcheck __read_mostly; extern bool i915_enable_hangcheck __read_mostly;
extern int i915_enable_ppgtt __read_mostly; extern int i915_enable_ppgtt __read_mostly;
extern int i915_enable_psr __read_mostly;
extern unsigned int i915_preliminary_hw_support __read_mostly; extern unsigned int i915_preliminary_hw_support __read_mostly;
extern int i915_disable_power_well __read_mostly; extern int i915_disable_power_well __read_mostly;
extern int i915_enable_ips __read_mostly; extern int i915_enable_ips __read_mostly;
......
...@@ -1521,6 +1521,12 @@ static bool intel_edp_psr_match_conditions(struct intel_dp *intel_dp) ...@@ -1521,6 +1521,12 @@ static bool intel_edp_psr_match_conditions(struct intel_dp *intel_dp)
return false; return false;
} }
if (!i915_enable_psr) {
DRM_DEBUG_KMS("PSR disable by flag\n");
dev_priv->no_psr_reason = PSR_MODULE_PARAM;
return false;
}
if (!intel_crtc->active || !crtc->fb || !crtc->mode.clock) { if (!intel_crtc->active || !crtc->fb || !crtc->mode.clock) {
DRM_DEBUG_KMS("crtc not active for PSR\n"); DRM_DEBUG_KMS("crtc not active for PSR\n");
dev_priv->no_psr_reason = PSR_CRTC_NOT_ACTIVE; dev_priv->no_psr_reason = PSR_CRTC_NOT_ACTIVE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment