[Intel-gfx] [PATCH v6 1/2] drm/i915: Allow control of PSR at runtime through debugfs, v6

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Fri Aug 10 12:10:27 UTC 2018


Op 09-08-18 om 16:21 schreef Maarten Lankhorst:
> Currently tests modify i915.enable_psr and then do a modeset cycle
> to change PSR. We can write a value to i915_edp_psr_debug to force
> a certain PSR mode without a modeset.
>
> To retain compatibility with older userspace, we also still allow
> the override through the module parameter, and add some tracking
> to check whether a debugfs mode is specified.
>
> Changes since v1:
> - Rename dev_priv->psr.enabled to .dp, and .hw_configured to .enabled.
> - Fix i915_psr_debugfs_mode to match the writes to debugfs.
> - Rename __i915_edp_psr_write to intel_psr_set_debugfs_mode, simplify
>   it and move it to intel_psr.c. This keeps all internals in intel_psr.c
> - Perform an interruptible wait for hw completion outside of the psr
>   lock, instead of being forced to trywait and return -EBUSY.
> Changes since v2:
> - Rebase on top of intel_psr changes.
> Changes since v3:
> - Assign psr.dp during init. (dhnkrn)
> - Add prepared bool, which should be used instead of relying on psr.dp. (dhnkrn)
> - Fix -EDEADLK handling in debugfs. (dhnkrn)
> - Clean up waiting for idle in intel_psr_set_debugfs_mode.
> - Print PSR mode when trying to enable PSR. (dhnkrn)
> - Move changing psr debug setting to i915_edp_psr_debug_set. (dhnkrn)
> Changes since v4:
> - Return error in _set() function.
> - Change flag values to make them easier to remember. (dhnkrn)
> - Only assign psr.dp once. (dhnkrn)
> - Only set crtc_state->has_psr on the crtc with psr.dp.
> - Fix typo. (dhnkrn)
> Changes since v5:
> - Only wait for PSR idle on the PSR connector correctly. (dhnkrn)
> - Reinstate WARN_ON(drrs.dp) in intel_psr_enable. (dhnkrn)
> - Remove stray comment. (dhnkrn)
> - Be silent in intel_psr_compute_config on wrong connector. (dhnkrn)
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c |  23 ++++-
>  drivers/gpu/drm/i915/i915_drv.h     |  12 ++-
>  drivers/gpu/drm/i915/i915_irq.c     |   2 +-
>  drivers/gpu/drm/i915/intel_drv.h    |   3 +
>  drivers/gpu/drm/i915/intel_psr.c    | 134 +++++++++++++++++++++++-----
>  5 files changed, 146 insertions(+), 28 deletions(-)
Pushed with dhnkrn's irc r-b


More information about the Intel-gfx mailing list