From: Matt Roper <matthew.d.roper@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/display: use max_level to control loop
Date: Tue, 22 Jun 2021 16:35:44 -0700 [thread overview]
Message-ID: <20210622233544.GW951094@mdroper-desk1.amr.corp.intel.com> (raw)
In-Reply-To: <20210622212210.3746133-2-lucas.demarchi@intel.com>
On Tue, Jun 22, 2021 at 02:22:10PM -0700, Lucas De Marchi wrote:
> Since we are already loop through the levels to sanitize them, mark what
> is the real max_level so it can be used in subsequent loop. This makes
> it simpler to later add the adjsutement latency to "valid levels". No
Minor typo in "adjustment."
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
> change in behavior, just makes the code easier to follow.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index be2931d54b95..6b6474d4f204 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2906,6 +2906,9 @@ static void intel_read_wm_latency(struct drm_i915_private *dev_priv,
> if (wm[level] == 0) {
> for (i = level + 1; i <= max_level; i++)
> wm[i] = 0;
> +
> + max_level = level - 1;
> +
> break;
> }
> }
> @@ -2920,12 +2923,8 @@ static void intel_read_wm_latency(struct drm_i915_private *dev_priv,
> if (wm[0] == 0) {
> u8 adjust = DISPLAY_VER(dev_priv) >= 12 ? 3 : 2;
>
> - wm[0] += adjust;
> - for (level = 1; level <= max_level; level++) {
> - if (wm[level] == 0)
> - break;
> + for (level = 0; level <= max_level; level++)
> wm[level] += adjust;
> - }
> }
>
> /*
> --
> 2.31.1
>
--
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-06-22 23:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 21:22 [Intel-gfx] [PATCH 1/2] drm/i915/display: fix level 0 adjustement on display ver >= 12 Lucas De Marchi
2021-06-22 21:22 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: use max_level to control loop Lucas De Marchi
2021-06-22 23:35 ` Matt Roper [this message]
2021-06-22 22:00 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/display: fix level 0 adjustement on display ver >= 12 Patchwork
2021-06-22 23:14 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-22 23:28 ` [Intel-gfx] [PATCH 1/2] " Matt Roper
2021-06-22 23:37 ` Matt Roper
2021-06-24 20:17 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/display: fix level 0 adjustement on display ver >= 12 (rev2) Patchwork
2021-06-25 3:03 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=20210622233544.GW951094@mdroper-desk1.amr.corp.intel.com \
--to=matthew.d.roper@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@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.