From: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Skip wm/ddb readout for disabled pipes
Date: Thu, 25 Aug 2022 10:32:07 +0300 [thread overview]
Message-ID: <Ywcld85gQs177IzR@intel.com> (raw)
In-Reply-To: <20220617195948.24007-1-ville.syrjala@linux.intel.com>
On Fri, Jun 17, 2022 at 10:59:48PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The stuff programmed into the wm/ddb registers of planes
> on disabled pipes doesn't matter. So during readout just
> leave our software state tracking for those zeroed.
>
> This should avoid us trying too hard to clean up after
> whatever mess the VBIOS/GOP left in there. The actual
> hardware state will get cleaned up if/when we enable
> the pipe anyway.
>
> References: https://gitlab.freedesktop.org/drm/intel/-/issues/5711
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 174fab564d10..d083964d5470 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -6560,7 +6560,10 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv)
> enum plane_id plane_id;
> u8 slices;
>
> - skl_pipe_wm_get_hw_state(crtc, &crtc_state->wm.skl.optimal);
> + memset(&crtc_state->wm.skl.optimal, 0,
> + sizeof(crtc_state->wm.skl.optimal));
> + if (crtc_state->hw.active)
> + skl_pipe_wm_get_hw_state(crtc, &crtc_state->wm.skl.optimal);
> crtc_state->wm.skl.raw = crtc_state->wm.skl.optimal;
>
> memset(&dbuf_state->ddb[pipe], 0, sizeof(dbuf_state->ddb[pipe]));
> @@ -6571,6 +6574,9 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv)
> struct skl_ddb_entry *ddb_y =
> &crtc_state->wm.skl.plane_ddb_y[plane_id];
>
> + if (!crtc_state->hw.active)
> + continue;
> +
> skl_ddb_get_hw_plane_state(dev_priv, crtc->pipe,
> plane_id, ddb, ddb_y);
>
> --
> 2.35.1
>
prev parent reply other threads:[~2022-08-25 7:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 19:59 [Intel-gfx] [PATCH] drm/i915: Skip wm/ddb readout for disabled pipes Ville Syrjala
2022-06-17 21:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-06-18 13:26 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-08-25 7:32 ` Lisovskiy, Stanislav [this message]
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=Ywcld85gQs177IzR@intel.com \
--to=stanislav.lisovskiy@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--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 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.