From: "Souza, Jose" <jose.souza@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Cc: "Navare, Manasi D" <manasi.d.navare@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 3/9] drm/i915: Disable all planes before modesetting any pipes
Date: Tue, 26 Oct 2021 19:39:55 +0000 [thread overview]
Message-ID: <7820ad54bbd50cf94f5fe99fb627bd19cd05b6e4.camel@intel.com> (raw)
In-Reply-To: <20211022103304.24164-4-ville.syrjala@linux.intel.com>
On Fri, 2021-10-22 at 13:32 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Let's disable planes on all pipes affected by the modeset before
> we start doing the actual modeset. This means we have less
> random planes enabled during the modeset, and it also mirrors
> what we already do when enabling pipes on skl+ since we enable
> planes on all pipes as the very last step. As a bonus we also
> nuke a bunch og bigjoiner special casing.
>
> I've occasionally pondered about going even furher here and
> doing the pre_plane_update() stuff for all pipes first, then
> actually disabling the planes, and finally running the rest
> of the modeset sequence. This would potentially allow
> parallelizing all the extra vblank waits across multiple pipes,
> and would make the plane disable even more atomic. But let's
> go one step a time here.
>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 28 +++++++++-----------
> 1 file changed, 13 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 3d2a1cba78c1..1d920ba83521 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -8251,18 +8251,13 @@ static void intel_old_crtc_state_disables(struct intel_atomic_state *state,
>
> drm_WARN_ON(&dev_priv->drm, old_crtc_state->bigjoiner_slave);
>
> - intel_crtc_disable_planes(state, crtc);
> -
> /*
> * We still need special handling for disabling bigjoiner master
> * and slaves since for slave we do not have encoder or plls
> * so we dont need to disable those.
> */
> - if (old_crtc_state->bigjoiner) {
> - intel_crtc_disable_planes(state,
> - old_crtc_state->bigjoiner_linked_crtc);
> + if (old_crtc_state->bigjoiner)
> old_crtc_state->bigjoiner_linked_crtc->active = false;
> - }
>
> /*
> * We need to disable pipe CRC before disabling the pipe,
> @@ -8288,6 +8283,18 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)
> u32 handled = 0;
> int i;
>
> + for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
> + new_crtc_state, i) {
> + if (!intel_crtc_needs_modeset(new_crtc_state))
> + continue;
> +
> + if (!old_crtc_state->hw.active)
> + continue;
> +
> + intel_pre_plane_update(state, crtc);
> + intel_crtc_disable_planes(state, crtc);
> + }
> +
> /* Only disable port sync and MST slaves */
> for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
> new_crtc_state, i) {
> @@ -8306,7 +8313,6 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)
> !intel_dp_mst_is_slave_trans(old_crtc_state))
> continue;
>
> - intel_pre_plane_update(state, crtc);
> intel_old_crtc_state_disables(state, old_crtc_state,
> new_crtc_state, crtc);
> handled |= BIT(crtc->pipe);
> @@ -8320,14 +8326,6 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)
> old_crtc_state->bigjoiner_slave)
> continue;
>
> - intel_pre_plane_update(state, crtc);
> - if (old_crtc_state->bigjoiner) {
> - struct intel_crtc *slave =
> - old_crtc_state->bigjoiner_linked_crtc;
> -
> - intel_pre_plane_update(state, slave);
> - }
> -
> if (old_crtc_state->hw.active)
> intel_old_crtc_state_disables(state, old_crtc_state,
> new_crtc_state, crtc);
next prev parent reply other threads:[~2021-10-26 19:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 10:32 [Intel-gfx] [PATCH v2 0/9] drm/i915: Fix bigjoiner state readout Ville Syrjala
2021-10-22 10:32 ` [Intel-gfx] [PATCH v2 1/9] drm/i915/psr: Disable PSR before modesets turn off all planes Ville Syrjala
2021-10-22 14:29 ` Hogander, Jouni
2021-10-22 15:26 ` Ville Syrjälä
2021-10-22 10:32 ` [Intel-gfx] [PATCH v2 2/9] Revert "drm/i915/display: Disable audio, DRRS and PSR before planes" Ville Syrjala
2021-10-26 19:39 ` Souza, Jose
2021-10-27 11:31 ` Ville Syrjälä
2021-10-22 10:32 ` [Intel-gfx] [PATCH v2 3/9] drm/i915: Disable all planes before modesetting any pipes Ville Syrjala
2021-10-26 19:39 ` Souza, Jose [this message]
2021-10-22 10:32 ` [Intel-gfx] [PATCH v2 4/9] drm/i915: Introduce intel_master_crtc() Ville Syrjala
2021-10-22 10:33 ` [Intel-gfx] [PATCH v2 5/9] drm/i915: Simplify intel_crtc_copy_uapi_to_hw_state_nomodeset() Ville Syrjala
2021-10-22 10:33 ` [Intel-gfx] [PATCH v2 6/9] drm/i915: Split PPS write from DSC enable Ville Syrjala
2021-10-22 10:33 ` [Intel-gfx] [PATCH v2 7/9] drm/i915: Perform correct cpu_transcoder readout for bigjoiner Ville Syrjala
2021-10-22 10:33 ` [Intel-gfx] [PATCH v2 8/9] drm/i915: Reduce bigjoiner special casing Ville Syrjala
2021-10-22 10:33 ` [Intel-gfx] [PATCH v2 9/9] drm/i915: Nuke PIPE_CONFIG_QUIRK_BIGJOINER_SLAVE Ville Syrjala
2021-10-22 17:13 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix bigjoiner state readout (rev2) Patchwork
2021-10-22 17:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-22 23:59 ` [Intel-gfx] ✗ 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=7820ad54bbd50cf94f5fe99fb627bd19cd05b6e4.camel@intel.com \
--to=jose.souza@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=manasi.d.navare@intel.com \
--cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox