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 1/4] drm/i915: Don't do the WM0->WM1 copy w/a if WM1 is already enabled
Date: Wed, 1 Feb 2023 19:56:28 +0200 [thread overview]
Message-ID: <Y9qnzNTxDXRcjHrp@intel.com> (raw)
In-Reply-To: <20230131002127.29305-1-ville.syrjala@linux.intel.com>
On Tue, Jan 31, 2023 at 02:21:24AM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Due to a workaround we have to make sure the WM1 watermarks block/lines
> values are sensible even when WM1 is disabled. To that end we copy those
> values from WM0.
>
> However since we now keep each wm level enabled on a per-plane basis
> it doesn't seem necessary to do that copy when we already have an
> enabled WM1 on the current plane. That is, we might be in a situation
> where another plane can only do WM0 (and thus needs the copy) but
> the current plane's WM1 is still perfectly valid (ie. fits into the
> current DDB allocation).
>
> Skipping the copy could avoid reprogramming the plane's registers
> needlessly in some cases.
>
> Fixes: a301cb0fca2d ("drm/i915: Keep plane watermarks enabled more aggressively")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/skl_watermark.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
> index 261cdab390b4..0c605034356f 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> @@ -1586,7 +1586,8 @@ skl_crtc_allocate_plane_ddb(struct intel_atomic_state *state,
> skl_check_wm_level(&wm->wm[level], ddb);
>
> if (icl_need_wm1_wa(i915, plane_id) &&
> - level == 1 && wm->wm[0].enable) {
> + level == 1 && !wm->wm[level].enable &&
> + wm->wm[0].enable) {
> wm->wm[level].blocks = wm->wm[0].blocks;
> wm->wm[level].lines = wm->wm[0].lines;
> wm->wm[level].ignore_lines = wm->wm[0].ignore_lines;
Took some time to remember once again the logic here :)
We probably need to make this more easily readable, because the comment
kinda suggests that we disable all wms starting from level + 1 here, while
we actually do also check with ddb allocation first.
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> --
> 2.39.1
>
prev parent reply other threads:[~2023-02-01 17:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 0:21 [Intel-gfx] [PATCH 1/4] drm/i915: Don't do the WM0->WM1 copy w/a if WM1 is already enabled Ville Syrjala
2023-01-31 0:21 ` [Intel-gfx] [PATCH 2/4] drm/i915: Introduce HAS_SAGV() Ville Syrjala
2023-01-31 7:27 ` Jani Nikula
2023-01-31 0:21 ` [Intel-gfx] [PATCH 3/4] drm/i915: Keep sagv status updated on icl+ Ville Syrjala
2023-02-01 17:57 ` Lisovskiy, Stanislav
2023-01-31 0:21 ` [Intel-gfx] [PATCH 4/4] drm/i915: Expose SAGV state via debugfs Ville Syrjala
2023-01-31 7:29 ` Jani Nikula
2023-01-31 0:57 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/4] drm/i915: Don't do the WM0->WM1 copy w/a if WM1 is already enabled Patchwork
2023-01-31 1:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-01-31 7:32 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-02-01 17:56 ` 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=Y9qnzNTxDXRcjHrp@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.