All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Souza, Jose" <jose.souza@intel.com>
Cc: "Mun, Gwan-gyeong" <gwan-gyeong.mun@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 01/16] Revert "drm/i915/display: Disable audio, DRRS and PSR before planes"
Date: Thu, 16 Sep 2021 16:21:21 +0300	[thread overview]
Message-ID: <YUNE0fd/iwOaNXW9@intel.com> (raw)
In-Reply-To: <35baca4ced0a0f0a045ddce0292aca1d5917551a.camel@intel.com>

On Wed, Sep 15, 2021 at 08:19:41PM +0000, Souza, Jose wrote:
> On Wed, 2021-09-15 at 15:30 +0300, Ville Syrjälä wrote:
> > On Wed, Sep 15, 2021 at 12:00:28AM +0000, Souza, Jose wrote:
> > > On Tue, 2021-09-14 at 16:30 -0700, José Roberto de Souza wrote:
> > > > On Tue, 2021-09-14 at 11:20 +0300, Ville Syrjälä wrote:
> > > > > On Mon, Sep 13, 2021 at 04:28:35PM +0000, Souza, Jose wrote:
> > > > > > On Mon, 2021-09-13 at 17:44 +0300, Ville Syrjala wrote:
> > > > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > > > 
> > > > > > > Disabling planes in the middle of the modeset seuqnece does not make
> > > > > > > sense since userspace can anyway disable planes before the modeset
> > > > > > > even starts. So when the modeset seuqence starts the set of enabled
> > > > > > > planes is entirely arbitrary. Trying to sprinkle the plane disabling
> > > > > > > into the modeset sequence just means more randomness and potential
> > > > > > > for hard to reproduce bugs.
> > > > > > 
> > > > > > The patch being reverted did not changed anything about plane, it only disables audio and PSR before pipe is disabled in this case.
> > > > > 
> > > > > The commit message only talks about planes. Also we already disable
> > > > > the pipe in the post_disable hook, so PSR/audio was always disabled
> > > > > before the pipe IIRC.
> > > > 
> > > > That is true, my bad.
> > > > 
> > > > Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
> > > 
> > > Sorry I missed the intel_crtc_disable_planes() call, so here is the problem:
> > > 
> > > 
> > > intel_commit_modeset_disables()
> > > 	intel_old_crtc_state_disables()
> > > 		intel_crtc_disable_planes()
> > > 			intel_disable_plane()
> > > 		dev_priv->display.crtc_disable(state, crtc)/hsw_crtc_disable()
> > > 			intel_encoders_disable()
> > > 				encoder->disable()/intel_disable_ddi()
> > > 					intel_psr_disable()
> > > 			intel_encoders_post_disable()
> > > 				post_disable/intel_ddi_post_disable()
> > > 					intel_disable_pipe()
> > > 
> > > So all the planes are disabled while PSR is still on, that is why this patch fixed the underrun.
> > > 
> > > We need to call the pre_disable() before intel_crtc_disable_planes() and for the case where pipe is not disabled but all of its planes are requires
> > > the pending patch that I have.
> > > 
> > > Or do you have other suggestion?
> > 
> > I would like to follow the same sequence always, ie. disable planes
> > first (be it from userspace or from the kernel just before the modeset),
> > and then we take the exact same measures in both cases to deal with
> > whatever is the problem with PSR vs. disabled planes. That makes the
> > sequence as deterministic as possible, and thus we avoid potential
> > weird bugs stemming from userspace behaviour wrt. disabling planes.
> > 
> > Hmm. Our modeset plane disable code is certainly a bit lackluster.
> > It misses a bunch of stuff that we do for normal plane updates.
> > So we might want to put a few extra things in there. Maybe PSR
> > needs the vblank_get+psr_idle trick? And we might want a
> > vrr_push/etc. in there as well, not sure.
> > 
> > What exactly is your solution to the case where the planes are
> > already disabled by userspace?
> 
> https://github.com/zehortigoza/linux/commit/013478a67e0b96abbaf6ab2d1b4be324b0fe737b

That's not going to work correctly. You can't depend on
connectors being part of the state since that's not the case for
pure plane updates/etc.

In general I really dislike the PSR code's reliance on the
encoder/connector. Tht makes it really hard to do these sorts
of things. So I think we'd have to redesign it to try to
operate purely on the crtc and not need the encoder/connector.

> 
> Whole branch: https://github.com/zehortigoza/linux/commits/upstream-psr2-sel-fetch-new
> 
> > 
> 

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2021-09-16 13:21 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 14:44 [Intel-gfx] [PATCH 00/16] drm/i915: Fix bigjoiner state readout Ville Syrjala
2021-09-13 14:44 ` [Intel-gfx] [PATCH 01/16] Revert "drm/i915/display: Disable audio, DRRS and PSR before planes" Ville Syrjala
2021-09-13 16:28   ` Souza, Jose
2021-09-14  8:20     ` Ville Syrjälä
2021-09-14 23:24       ` Souza, Jose
2021-09-15  0:00         ` Souza, Jose
2021-09-15 12:30           ` Ville Syrjälä
2021-09-15 20:19             ` Souza, Jose
2021-09-16 13:21               ` Ville Syrjälä [this message]
2021-09-17  0:14                 ` Souza, Jose
2021-09-13 14:44 ` [Intel-gfx] [PATCH 02/16] drm/i915: Disable all planes before modesetting any pipes Ville Syrjala
2021-09-20  7:52   ` Navare, Manasi
2021-09-21 12:49     ` Ville Syrjälä
2021-09-27 11:20       ` Navare, Manasi
2021-09-13 14:44 ` [Intel-gfx] [PATCH 03/16] drm/i915: Extract intel_dp_use_bigjoiner() Ville Syrjala
2021-09-15 10:12   ` Jani Nikula
2021-09-15 15:39     ` Ville Syrjälä
2021-09-21 11:10   ` Navare, Manasi
2021-09-13 14:44 ` [Intel-gfx] [PATCH 04/16] drm/i915: Flatten hsw_crtc_compute_clock() Ville Syrjala
2021-09-15 10:13   ` Jani Nikula
2021-09-13 14:44 ` [Intel-gfx] [PATCH 05/16] drm/i915: s/pipe/transcoder/ when dealing with PIPECONF/TRANSCONF Ville Syrjala
2021-09-15 10:16   ` Jani Nikula
2021-09-15 13:00     ` Ville Syrjälä
2021-09-15 13:17       ` Jani Nikula
2021-09-13 14:44 ` [Intel-gfx] [PATCH 06/16] drm/i915: Introduce with_intel_display_power_if_enabled() Ville Syrjala
2021-09-15 13:22   ` Jani Nikula
2021-09-13 14:44 ` [Intel-gfx] [PATCH 07/16] drm/i915: Adjust intel_dsc_power_domain() calling convention Ville Syrjala
2021-09-15 10:19   ` Jani Nikula
2021-09-13 14:44 ` [Intel-gfx] [PATCH 08/16] drm/i915: Extract hsw_panel_transcoders() Ville Syrjala
2021-09-15 10:20   ` Jani Nikula
2021-09-13 14:44 ` [Intel-gfx] [PATCH 09/16] drm/i915: Pimp HSW+ transcoder state readout Ville Syrjala
2021-09-21 11:46   ` Navare, Manasi
2021-09-13 14:44 ` [Intel-gfx] [PATCH 10/16] drm/i915: Configure TRANSCONF just the once with bigjoiner Ville Syrjala
2021-09-21 11:51   ` Navare, Manasi
2021-09-13 14:44 ` [Intel-gfx] [PATCH 11/16] drm/i915: Introduce intel_master_crtc() Ville Syrjala
2021-09-15 10:24   ` Jani Nikula
2021-09-15 12:21     ` Ville Syrjälä
2021-10-21 23:27   ` Navare, Manasi
2021-09-13 14:44 ` [Intel-gfx] [PATCH 12/16] drm/i915: Simplify intel_crtc_copy_uapi_to_hw_state_nomodeset() Ville Syrjala
2021-09-27 11:27   ` Navare, Manasi
2021-09-13 14:44 ` [Intel-gfx] [PATCH 13/16] drm/i915: Split PPS write from DSC enable Ville Syrjala
2021-09-27 12:01   ` Navare, Manasi
2021-09-13 14:44 ` [Intel-gfx] [PATCH 14/16] drm/i915: Perform correct cpu_transcoder readout for bigjoiner Ville Syrjala
2021-10-20 20:35   ` Navare, Manasi
2021-09-13 14:44 ` [Intel-gfx] [PATCH 15/16] drm/i915: Reduce bigjoiner special casing Ville Syrjala
2021-10-20 23:52   ` Navare, Manasi
2021-09-13 14:44 ` [Intel-gfx] [PATCH 16/16] drm/i915: Nuke PIPE_CONFIG_QUIRK_BIGJOINER_SLAVE Ville Syrjala
2021-10-20 23:53   ` Navare, Manasi
2021-09-13 16:05 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix bigjoiner state readout Patchwork
2021-09-13 16:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-09-13 18:39 ` [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=YUNE0fd/iwOaNXW9@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=gwan-gyeong.mun@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jose.souza@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.