mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-27 04:22:58 +00:00
drm/i915/psr: Move printing sink PSR support to own function
intel_psr_status has grown and is about to grow even. Let's split it a bit and move printing sink psr support to an own function. Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240528114455.175961-4-jouni.hogander@intel.com
This commit is contained in:
@@ -3590,6 +3590,21 @@ psr_source_status(struct intel_dp *intel_dp, struct seq_file *m)
|
||||
seq_printf(m, "Source PSR/PanelReplay status: %s [0x%08x]\n", status, val);
|
||||
}
|
||||
|
||||
static void intel_psr_sink_capability(struct intel_dp *intel_dp,
|
||||
struct seq_file *m)
|
||||
{
|
||||
struct intel_psr *psr = &intel_dp->psr;
|
||||
|
||||
seq_printf(m, "Sink support: PSR = %s",
|
||||
str_yes_no(psr->sink_support));
|
||||
|
||||
if (psr->sink_support)
|
||||
seq_printf(m, " [0x%02x]", intel_dp->psr_dpcd[0]);
|
||||
seq_printf(m, ", Panel Replay = %s", str_yes_no(psr->sink_panel_replay_support));
|
||||
seq_printf(m, ", Panel Replay Selective Update = %s\n",
|
||||
str_yes_no(psr->sink_panel_replay_su_support));
|
||||
}
|
||||
|
||||
static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
|
||||
@@ -3600,14 +3615,7 @@ static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp)
|
||||
bool enabled;
|
||||
u32 val;
|
||||
|
||||
seq_printf(m, "Sink support: PSR = %s",
|
||||
str_yes_no(psr->sink_support));
|
||||
|
||||
if (psr->sink_support)
|
||||
seq_printf(m, " [0x%02x]", intel_dp->psr_dpcd[0]);
|
||||
seq_printf(m, ", Panel Replay = %s", str_yes_no(psr->sink_panel_replay_support));
|
||||
seq_printf(m, ", Panel Replay Selective Update = %s\n",
|
||||
str_yes_no(psr->sink_panel_replay_su_support));
|
||||
intel_psr_sink_capability(intel_dp, m);
|
||||
|
||||
if (!(psr->sink_support || psr->sink_panel_replay_support))
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user