From: Imre Deak <imre.deak@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH] drm/i915/vlv: fix RC6 residency time calculation
Date: Mon, 01 Jun 2015 09:29:40 +0300 [thread overview]
Message-ID: <1433140180.15761.3.camel@intel.com> (raw)
In-Reply-To: <CABVU7+sCeLH6UNCcTPqyUUAo5LbaEy4A3tGcP_MRvWRtzKmqZQ@mail.gmail.com>
On pe, 2015-05-29 at 13:22 -0700, Rodrigo Vivi wrote:
> On Fri, May 29, 2015 at 5:56 AM, Imre Deak <imre.deak@intel.com> wrote:
> > On ma, 2015-05-18 at 18:46 +0300, Imre Deak wrote:
> >> The divider value to convert from CZ clock rate to ms needs a +1
> >> adjustment on VLV just like on CHV. This matches both the spec and
> >> the accuracy test by pm_rc6_residency.
> >>
> >> Testcase: igt/pm_rc6_residency
> >> Signed-off-by: Imre Deak <imre.deak@intel.com>
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76877
> >
> > Rodrigo, could you review this?
> >
> > Thanks,
> > Imre
> >
> >> ---
> >> drivers/gpu/drm/i915/i915_sysfs.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
> >> index 2476268..aa99efc 100644
> >> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> >> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> >> @@ -76,6 +76,8 @@ static u32 calc_residency(struct drm_device *dev, const u32 reg)
> >> /* chv counts are one less */
> >> czcount_30ns += 1;
> >> }
> >> + } else {
> >> + czcount_30ns += 1;
>
> Thanks for spec and explanation...
> Reading code again I believe czcount_30ns += 1; shouldn't be
> duplicated in middle of elses here.
>
> It would be better to do something like:
> units = 0;
> div = 1000000ULL;
>
> if (IS_CHERRYVIEW(dev) && czcount_30ns == 1) {
> /* Special case for 320Mhz on CHV */
> div = 10000000ULL;
> units = 3125ULL;
> }
>
> /* counts are one less */
> czcount_30ns += 1;
This would increment also for the special case, but I agree we should
simplify this. I'll follow up with v2.
>
> >> if (units == 0)
> >
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
> But with my bikeshed or not let's move fwd because I hold this for to
> long already:
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-06-01 6:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 15:46 [PATCH] drm/i915/vlv: fix RC6 residency time calculation Imre Deak
2015-05-18 16:13 ` Rodrigo Vivi
2015-05-18 16:24 ` Imre Deak
2015-05-19 19:41 ` shuang.he
2015-05-29 12:56 ` Imre Deak
2015-05-29 20:22 ` Rodrigo Vivi
2015-06-01 6:29 ` Imre Deak [this message]
2015-06-01 7:32 ` [PATCH v2] " Imre Deak
2015-06-01 19:01 ` Rodrigo Vivi
2015-06-02 9:37 ` Imre Deak
2015-06-15 9:57 ` Daniel Vetter
2015-06-01 19:44 ` shuang.he
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=1433140180.15761.3.camel@intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@gmail.com \
--cc=rodrigo.vivi@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