From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Gajanan Bhat <gajanan.bhat@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Round-up clock and limit drain latency
Date: Tue, 5 Aug 2014 15:46:25 +0300 [thread overview]
Message-ID: <20140805124625.GJ4193@intel.com> (raw)
In-Reply-To: <1407260754-18316-2-git-send-email-gajanan.bhat@intel.com>
On Tue, Aug 05, 2014 at 11:15:54PM +0530, Gajanan Bhat wrote:
> Round up clock computation and limit drain latency to maximum of 0x7F.
>
> Signed-off-by: Gajanan Bhat <gajanan.bhat@intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index ea64675..5e81c49 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -1285,11 +1285,14 @@ static bool vlv_compute_drain_latency(struct drm_crtc *crtc,
> if (WARN(pixel_size == 0, "Pixel size is zero!\n"))
> return false;
>
> - entries = (clock / 1000) * pixel_size;
> + entries = DIV_ROUND_UP(clock, 1000) * pixel_size;
> *prec_mult = (entries > 128) ? DRAIN_LATENCY_PRECISION_64 :
> DRAIN_LATENCY_PRECISION_32;
> *drain_latency = (64 * (*prec_mult) * 4) / entries;
>
> + if (*drain_latency > DRAIN_LATENCY_MASK)
> + *drain_latency = DRAIN_LATENCY_MASK;
I would have probably written this as:
*drain_latency = min(..., DRAIN_LATENCY_MASK);
But that's just a style I like. The patch looks fine to me so:
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> +
> return true;
> }
>
> --
> 1.7.9.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-08-05 12:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-16 12:54 [PATCH 0/3] Update DDL code to support sprite watermarks Gajanan Bhat
2014-07-16 12:54 ` [PATCH 1/3] drm/i915: Update DDL only for current CRTC Gajanan Bhat
2014-07-31 12:53 ` Imre Deak
2014-07-16 12:54 ` [PATCH 2/3] drm/i915: Generalize drain latency computation Gajanan Bhat
2014-07-31 13:33 ` Imre Deak
2014-08-04 14:41 ` Ville Syrjälä
2014-08-05 17:45 ` [PATCH v2 1/2] " Gajanan Bhat
2014-08-05 12:56 ` Ville Syrjälä
2014-08-06 20:28 ` [PATCH v3] " Gajanan Bhat
2014-08-06 15:07 ` Ville Syrjälä
2014-08-06 19:49 ` Daniel Vetter
2014-08-05 17:45 ` [PATCH 2/2] drm/i915: Round-up clock and limit drain latency Gajanan Bhat
2014-08-05 12:46 ` Ville Syrjälä [this message]
2014-07-16 12:54 ` [PATCH 3/3] drm/i915: Add sprite watermark programming for VLV and CHV Gajanan Bhat
2014-07-31 13:44 ` Imre Deak
2014-08-07 5:56 ` Bhat, Gajanan
2014-08-07 9:51 ` Imre Deak
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=20140805124625.GJ4193@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=gajanan.bhat@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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