From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Jouni Högander" <jouni.hogander@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 09/21] drm/i915/psr: Panel replay has to be enabled before link training
Date: Tue, 23 Jan 2024 19:41:19 +0200 [thread overview]
Message-ID: <87o7dclzgg.fsf@intel.com> (raw)
In-Reply-To: <87r0i8lzjg.fsf@intel.com>
On Tue, 23 Jan 2024, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Fri, 19 Jan 2024, Jouni Högander <jouni.hogander@intel.com> wrote:
>> Panel replay has to be enabled on sink side before link training. Take this
>> into account in fastset check and in initial fastset check.
>>
>> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
>> ---
>> drivers/gpu/drm/i915/display/intel_display.c | 12 ++++++++++++
>> drivers/gpu/drm/i915/display/intel_dp.c | 8 ++++++++
>> drivers/gpu/drm/i915/display/intel_psr.c | 3 ---
>> drivers/gpu/drm/i915/display/intel_psr.h | 3 +++
>> 4 files changed, 23 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
>> index a92e959c8ac7..b7e5b2774f2e 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display.c
>> @@ -5214,6 +5214,18 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
>> PIPE_CONF_CHECK_CSC(output_csc);
>> }
>>
>> + /*
>> + * Panel replay has to be enabled before link training. PSR doesn't have
>> + * this requirement -> check these only if using panel replay
>> + */
>> + if (current_config->has_panel_replay || pipe_config->has_panel_replay) {
>> + PIPE_CONF_CHECK_BOOL(has_psr);
>> + PIPE_CONF_CHECK_BOOL(has_psr2);
>> + PIPE_CONF_CHECK_BOOL(enable_psr2_sel_fetch);
>> + PIPE_CONF_CHECK_BOOL(enable_psr2_su_region_et);
>> + PIPE_CONF_CHECK_BOOL(has_panel_replay);
>> + }
>> +
>> PIPE_CONF_CHECK_BOOL(double_wide);
>>
>> if (dev_priv->display.dpll.mgr) {
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> index e7cda3162ea2..11143fb9b0f0 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -3326,6 +3326,14 @@ bool intel_dp_initial_fastset_check(struct intel_encoder *encoder,
>> fastset = false;
>> }
>>
>> + if (CAN_PANEL_REPLAY(intel_dp)) {
>> + drm_dbg_kms(&i915->drm,
>> + "[ENCODER:%d:%s] Forcing full modeset to compute panel replay state\n",
>> + encoder->base.base.id, encoder->base.name);
>> + crtc_state->uapi.mode_changed = true;
>> + fastset = false;
>> + }
>> +
>
> I think I'd rather start adding functionality specific functions that
> get called instead of exposing CAN_PANEL_REPLAY() and DP code covering
> everything.
>
> I.e. intel_psr_initial_fastset_check().
Rule of thumb: if code looks at intel_dp->psr, it belongs in
intel_psr.c.
Or, what would have to change if intel_dp->psr became an opaque pointer?
BR,
Jani.
>
> BR,
> Jani.
>
>> return fastset;
>> }
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
>> index b905aee0ec81..24a80f47b84f 100644
>> --- a/drivers/gpu/drm/i915/display/intel_psr.c
>> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
>> @@ -192,9 +192,6 @@
>> #define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
>> (intel_dp)->psr.source_support)
>>
>> -#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \
>> - (intel_dp)->psr.source_panel_replay_support)
>> -
>> bool intel_encoder_can_psr(struct intel_encoder *encoder)
>> {
>> if (intel_encoder_is_dp(encoder) || encoder->type == INTEL_OUTPUT_DP_MST)
>> diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h
>> index b74382b38f4a..e687d7bdbb1f 100644
>> --- a/drivers/gpu/drm/i915/display/intel_psr.h
>> +++ b/drivers/gpu/drm/i915/display/intel_psr.h
>> @@ -21,6 +21,9 @@ struct intel_encoder;
>> struct intel_plane;
>> struct intel_plane_state;
>>
>> +#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \
>> + (intel_dp)->psr.source_panel_replay_support)
>> +
>> bool intel_encoder_can_psr(struct intel_encoder *encoder);
>> void intel_psr_init_dpcd(struct intel_dp *intel_dp);
>> void intel_psr_enable_sink(struct intel_dp *intel_dp,
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-01-23 17:41 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 10:10 [PATCH v3 00/21] Panel replay selective update support Jouni Högander
2024-01-19 10:10 ` [PATCH v3 01/21] drm/i915/psr: Add some documentation of variables used in psr code Jouni Högander
2024-02-02 6:18 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 02/21] drm/i915/psr: Set intel_crtc_state->has_psr on panel replay as well Jouni Högander
2024-02-02 6:21 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 03/21] drm/i915/psr: Intel_psr_pause/resume needs to support panel replay Jouni Högander
2024-01-19 10:10 ` [PATCH v3 04/21] drm/i915/psr: Rename intel_psr_enabled Jouni Högander
2024-02-02 7:34 ` Manna, Animesh
2024-02-02 7:47 ` Hogander, Jouni
2024-02-05 4:50 ` Manna, Animesh
2024-04-02 9:54 ` Hogander, Jouni
2024-01-19 10:10 ` [PATCH v3 05/21] drm/i915/psr: Do not update phy power state in case of panel replay Jouni Högander
2024-02-02 7:55 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 06/21] drm/i915/psr: Check possible errors for panel replay as well Jouni Högander
2024-02-02 8:10 ` Manna, Animesh
2024-02-02 8:20 ` Hogander, Jouni
2024-02-05 4:54 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 07/21] drm/i915/psr: Do not write registers/bits not applicable for panel replay Jouni Högander
2024-02-02 10:42 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 08/21] drm/i915/psr: Unify panel replay enable/disable sink Jouni Högander
2024-02-02 11:11 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 09/21] drm/i915/psr: Panel replay has to be enabled before link training Jouni Högander
2024-01-23 17:39 ` Jani Nikula
2024-01-23 17:41 ` Jani Nikula [this message]
2024-02-02 11:21 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 10/21] drm/i915/psr: Rename has_psr2 as has_sel_update Jouni Högander
2024-02-02 11:22 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 11/21] drm/i915/psr: Modify VSC SDP calculation to support panel replay + su Jouni Högander
2024-02-02 13:58 ` Manna, Animesh
2024-02-05 13:43 ` Hogander, Jouni
2024-01-19 10:10 ` [PATCH v3 12/21] drm/i915/psr: Rename psr2_enabled as sel_update_enabled Jouni Högander
2024-01-19 10:10 ` [PATCH v3 13/21] drm/panelreplay: dpcd register definition for panelreplay SU Jouni Högander
2024-02-02 14:29 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 14/21] drm/i915/psr: Detect panel replay selective update support Jouni Högander
2024-02-02 14:31 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 15/21] drm/i915/psr: Modify intel_dp_get_su_granularity to support panel replay Jouni Högander
2024-02-02 14:39 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 16/21] drm/i915/psr: Ensure early transport is not enabled for " Jouni Högander
2024-02-05 4:40 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 17/21] drm/i915/psr: Panel replay uses SRD_STATUS to track it's status Jouni Högander
2024-01-19 10:10 ` [PATCH v3 18/21] drm/i915/psr: Do not apply workarounds in case of panel replay Jouni Högander
2024-01-19 10:10 ` [PATCH v3 19/21] drm/i915/psr: Update PSR module parameter descriptions Jouni Högander
2024-02-05 4:43 ` Manna, Animesh
2024-01-19 10:10 ` [PATCH v3 20/21] drm/i915/psr: Split intel_psr2_config_valid for panel replay Jouni Högander
2024-01-19 10:10 ` [PATCH v3 21/21] drm/i915/psr: Add panel replay sel update support to debugfs interface Jouni Högander
2024-01-19 11:36 ` ✗ Fi.CI.CHECKPATCH: warning for Panel replay selective update support (rev3) Patchwork
2024-01-19 11:36 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-01-19 11:56 ` ✓ Fi.CI.BAT: success " Patchwork
2024-01-19 15:39 ` ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o7dclzgg.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jouni.hogander@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.