From: "Govindapillai, Vinod" <vinod.govindapillai@intel.com>
To: "Kandpal, Suraj" <suraj.kandpal@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Cc: "Syrjala, Ville" <ville.syrjala@intel.com>
Subject: Re: [PATCH 2/2] drm/i915/watermark: Modify latency programmed into PKG_C_LATENCY
Date: Thu, 14 Nov 2024 14:08:40 +0000 [thread overview]
Message-ID: <0f50f6f9ff11e17567a0041ec0f97bdf8c340268.camel@intel.com> (raw)
In-Reply-To: <20241114043040.1396947-2-suraj.kandpal@intel.com>
On Thu, 2024-11-14 at 10:00 +0530, Suraj Kandpal wrote:
> Increase the latency programmed into PKG_C_LATENCY latency to be
> a multiple of line time which is written into WM_LINETIME.
>
> --v2
> -Fix commit subject line [Sai Teja]
> -Use individual DISPLAY_VER checks instead of range [Sai Teja]
> -Initialize max_linetime [Sai Teja]
>
> --v3
> -take into account the scenario when adjusted_latency is 0 [Vinod]
>
> --v4
> -rename adjusted_latency to latency [Mitul]
> -fix the condition in which dpkgc is disabled [Vinod]
>
> --v5
> -Add check to see if max_linetime is 0 [Vinod]
>
> WA: 22020299601
Is this a normal practice? I didnt find any other than one of your prev patch. I wonder if the bspec
number more useful here?
Otherwise, looks ok after addressing the comments in prev patch.
BR
Vinod
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_wm.c | 22 +++++++++++++++++-----
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_wm.c b/drivers/gpu/drm/i915/display/intel_wm.c
> index 620873d1244f..ce11a69b36cc 100644
> --- a/drivers/gpu/drm/i915/display/intel_wm.c
> +++ b/drivers/gpu/drm/i915/display/intel_wm.c
> @@ -157,9 +157,10 @@ intel_program_dpkgc_latency(struct intel_atomic_state *state,
> struct intel_display *display = to_intel_display(state);
> struct intel_crtc *crtc;
> struct intel_crtc_state *new_crtc_state;
> - u32 max_latency = LNL_PKG_C_LATENCY_MASK;
> + u32 latency = LNL_PKG_C_LATENCY_MASK;
> u32 clear = 0, val = 0;
> u32 added_waketime = 0;
> + u32 max_linetime = 0;
> int i;
> bool fixed_refresh_rate = false;
>
> @@ -171,18 +172,29 @@ intel_program_dpkgc_latency(struct intel_atomic_state *state,
> new_crtc_state->vrr.vmin == new_crtc_state->vrr.flipline) ||
> !new_crtc_state->vrr.enable)
> fixed_refresh_rate = true;
> +
> + max_linetime = max(new_crtc_state->linetime, max_linetime);
> }
>
> if (fixed_refresh_rate) {
> - max_latency = skl_watermark_max_latency(i915, 1);
> - if (max_latency == 0)
> - max_latency = LNL_PKG_C_LATENCY_MASK;
> + latency = skl_watermark_max_latency(i915, 1);
> +
> + /* Wa_22020299601 */
> + if (latency) {
> + if ((DISPLAY_VER(display) == 20 || DISPLAY_VER(display) == 30) &&
> + max_linetime)
> + latency = max_linetime *
> + DIV_ROUND_UP(latency, max_linetime);
> + } else {
> + latency = LNL_PKG_C_LATENCY_MASK;
> + }
> +
> added_waketime = DSB_EXE_TIME +
> display->sagv.block_time_us;
> }
>
> clear |= LNL_ADDED_WAKE_TIME_MASK | LNL_PKG_C_LATENCY_MASK;
> - val |= REG_FIELD_PREP(LNL_PKG_C_LATENCY_MASK, max_latency) |
> + val |= REG_FIELD_PREP(LNL_PKG_C_LATENCY_MASK, latency) |
> REG_FIELD_PREP(LNL_ADDED_WAKE_TIME_MASK, added_waketime);
>
> intel_de_rmw(display, LNL_PKG_C_LATENCY, clear, val);
next prev parent reply other threads:[~2024-11-14 14:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 4:30 [PATCH 1/2] drm/i915/watermark: Refactor dpkgc code Suraj Kandpal
2024-11-14 4:30 ` [PATCH 2/2] drm/i915/watermark: Modify latency programmed into PKG_C_LATENCY Suraj Kandpal
2024-11-14 14:08 ` Govindapillai, Vinod [this message]
2024-11-15 2:37 ` Kandpal, Suraj
2024-11-14 4:38 ` ✓ CI.Patch_applied: success for series starting with [1/2] drm/i915/watermark: Refactor dpkgc code Patchwork
2024-11-14 4:38 ` ✓ CI.checkpatch: " Patchwork
2024-11-14 4:39 ` ✓ CI.KUnit: " Patchwork
2024-11-14 4:51 ` ✓ CI.Build: " Patchwork
2024-11-14 4:53 ` ✓ CI.Hooks: " Patchwork
2024-11-14 4:55 ` ✗ CI.checksparse: warning " Patchwork
2024-11-14 5:19 ` ✓ CI.BAT: success " Patchwork
2024-11-14 12:41 ` [PATCH 1/2] " Govindapillai, Vinod
2024-11-15 2:40 ` Kandpal, Suraj
2024-11-15 6:23 ` Govindapillai, Vinod
2024-11-14 14:29 ` ✗ CI.FULL: failure for series starting with [1/2] " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-11-15 3:01 [PATCH 1/2] drm/i915/display: Refactor handling of dpkgc latency programming Suraj Kandpal
2024-11-15 3:01 ` [PATCH 2/2] drm/i915/watermark: Modify latency programmed into PKG_C_LATENCY Suraj Kandpal
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=0f50f6f9ff11e17567a0041ec0f97bdf8c340268.camel@intel.com \
--to=vinod.govindapillai@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=suraj.kandpal@intel.com \
--cc=ville.syrjala@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