Skip to content

Commit 105b7c1

Browse files
rodrigovividanvet
authored andcommitted
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: Rodrigo Vivi <rodrigo.vivi@gmail.com> Reviewed-by: Shobhit Kumar <shobhit.kumar@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 3f51e47 commit 105b7c1

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

drivers/gpu/drm/i915/i915_debugfs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,6 +1565,9 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)
15651565
case PSR_NO_SINK:
15661566
seq_puts(m, "not supported by panel");
15671567
break;
1568+
case PSR_MODULE_PARAM:
1569+
seq_puts(m, "disabled by flag");
1570+
break;
15681571
case PSR_CRTC_NOT_ACTIVE:
15691572
seq_puts(m, "crtc not active");
15701573
break;

drivers/gpu/drm/i915/i915_drv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ module_param_named(i915_enable_ppgtt, i915_enable_ppgtt, int, 0600);
118118
MODULE_PARM_DESC(i915_enable_ppgtt,
119119
"Enable PPGTT (default: true)");
120120

121+
int i915_enable_psr __read_mostly = 0;
122+
module_param_named(enable_psr, i915_enable_psr, int, 0600);
123+
MODULE_PARM_DESC(enable_psr, "Enable PSR (default: false)");
124+
121125
unsigned int i915_preliminary_hw_support __read_mostly = 0;
122126
module_param_named(preliminary_hw_support, i915_preliminary_hw_support, int, 0600);
123127
MODULE_PARM_DESC(preliminary_hw_support,

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ struct i915_fbc {
596596
enum no_psr_reason {
597597
PSR_NO_SOURCE, /* Not supported on platform */
598598
PSR_NO_SINK, /* Not supported by panel */
599+
PSR_MODULE_PARAM,
599600
PSR_CRTC_NOT_ACTIVE,
600601
PSR_PWR_WELL_ENABLED,
601602
PSR_NOT_TILED,
@@ -1621,6 +1622,7 @@ extern int i915_enable_rc6 __read_mostly;
16211622
extern int i915_enable_fbc __read_mostly;
16221623
extern bool i915_enable_hangcheck __read_mostly;
16231624
extern int i915_enable_ppgtt __read_mostly;
1625+
extern int i915_enable_psr __read_mostly;
16241626
extern unsigned int i915_preliminary_hw_support __read_mostly;
16251627
extern int i915_disable_power_well __read_mostly;
16261628
extern int i915_enable_ips __read_mostly;

drivers/gpu/drm/i915/intel_dp.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,6 +1521,12 @@ static bool intel_edp_psr_match_conditions(struct intel_dp *intel_dp)
15211521
return false;
15221522
}
15231523

1524+
if (!i915_enable_psr) {
1525+
DRM_DEBUG_KMS("PSR disable by flag\n");
1526+
dev_priv->no_psr_reason = PSR_MODULE_PARAM;
1527+
return false;
1528+
}
1529+
15241530
if (!intel_crtc->active || !crtc->fb || !crtc->mode.clock) {
15251531
DRM_DEBUG_KMS("crtc not active for PSR\n");
15261532
dev_priv->no_psr_reason = PSR_CRTC_NOT_ACTIVE;

0 commit comments

Comments
 (0)