From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Imre Deak <imre.deak@intel.com>
Cc: stable@vger.kernel.org,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Chris Wilson" <chris@chris-wilson.co.uk>,
"Jani Nikula" <jani.nikula@intel.com>
Subject: Re: [PATCH v8] drm/i915/gen9: Fix PCODE polling during CDCLK change notification
Date: Fri, 13 Jan 2017 11:48:27 +0100 [thread overview]
Message-ID: <20170113104827.GA20965@kroah.com> (raw)
In-Reply-To: <1484243846.21150.1.camel@intel.com>
On Thu, Jan 12, 2017 at 07:57:26PM +0200, Imre Deak wrote:
> On Thu, 2017-01-12 at 18:21 +0100, Greg Kroah-Hartman wrote:
> > On Thu, Jan 12, 2017 at 03:22:38PM +0200, Imre Deak wrote:
> > > commit 848496e5902833600f7992f4faa82dc1546051ba
> > > Author: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> > > Date:���Wed Jul 13 16:32:03 2016 +0300
> > >
> > > ����drm/i915: Wait up to 3ms for the pcu to ack the cdclk change request on SKL
> > >
> > > increased the timeout to match the spec, but we still see a timeout on
> > > at least one SKL. A CDCLK change request following the failed one will
> > > succeed nevertheless.
> > >
> > > I could reproduce this problem easily by running kms_pipe_crc_basic in a
> > > loop. In all failure cases _wait_for() was pre-empted for >3ms and so in
> > > the worst case - when the pre-emption happened right after calculating
> > > timeout__ in _wait_for() - we called skl_cdclk_wait_for_pcu_ready() only
> > > once which failed and so _wait_for() timed out. As opposed to this the
> > > spec says to keep retrying the request for at most a 3ms period.
> > >
> > > To fix this send the first request explicitly to guarantee that there is
> > > 3ms between the first and last request. Though this matches the spec, I
> > > noticed that in rare cases this can still time out if we sent only a few
> > > requests (in the worst case 2) _and_ PCODE is busy for some reason even
> > > after a previous request and a 3ms delay. To work around this retry the
> > > polling with pre-emption disabled to maximize the number of requests.
> > > Also increase the timeout to 10ms to account for interrupts that could
> > > reduce the number of requests. With this change I couldn't trigger
> > > the problem.
> > >
> > > v2:
> > > - Use 1ms poll period instead of 10us. (Chris)
> > > v3:
> > > - Poll with pre-emption disabled to increase the number of request
> > > � attempts. (Ville, Chris)
> > > - Factor out a helper to poll, it's also needed by the next patch.
> > > v4:
> > > - Pass reply_mask, reply to skl_pcode_request(), instead of assuming the
> > > � reply is generic. (Ville)
> > > v5:
> > > - List the request specific timeout values as code comment. (Ville)
> > > v6:
> > > - Try the poll first with preemption enabled.
> > > - Add code comment about first request being queued by PCODE. (Art)
> > > - Add timeout_base_ms argument. (Ville)
> > > v7:
> > > - Clarify code comment about first queued request. (Chris)
> > > v8:
> > > - Rebased on 4.9.2
> > >
> > > Cc: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Art Runyan <arthur.j.runyan@intel.com>
> > > Cc: <stable@vger.kernel.org> # v4.2- : 3b2c171 : drm/i915: Wait up to 3ms
> > > Cc: <stable@vger.kernel.org> # v4.2-
> > > Fixes: 5d96d8afcfbb ("drm/i915/skl: Deinit/init the display at suspend/resume")
> > > Reference: https://bugs.freedesktop.org/show_bug.cgi?id=97929
> > > Testcase: igt/kms_pipe_crc_basic/suspend-read-crc-pipe-B
> > > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Link: http://patchwork.freedesktop.org/patch/msgid/1480955258-26311-1-git-send-email-imre.deak@intel.com
> > > (cherry picked from commit a0b8a1fe34430c3a82258e8cb45f5968bdf31afd)
> > > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> > > ---
> > > �drivers/gpu/drm/i915/i915_drv.h������|��2 +
> > > �drivers/gpu/drm/i915/intel_display.c | 31 +++++----------
> > > �drivers/gpu/drm/i915/intel_pm.c������| 75 ++++++++++++++++++++++++++++++++++++
> > > �3 files changed, 87 insertions(+), 21 deletions(-)
> >
> > What tree is this patch for?��Please give us a hint, we don't like
> > guessing...
>
> It's for the 4.9 stable tree and for other stable trees starting from 4.2.
> It's the upstream commit a0b8a1fe34430c3a82258e8cb45f5968bdf31afd
There is no such git commit id in Linus's tree :(
Do you mean 2c7d0602c815277f7cb7c932b091288710d8aba7?
> rebased on top of 4.9.2 according to our discussion at
> http://www.spinics.net/lists/stable/msg155406.html
Please always tell me stuff like this, I have the short-term memory of a
squirrel...
thanks,
greg k-h
next prev parent reply other threads:[~2017-01-13 10:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 13:22 [PATCH v8] drm/i915/gen9: Fix PCODE polling during CDCLK change notification Imre Deak
2017-01-12 17:21 ` Greg Kroah-Hartman
2017-01-12 17:57 ` Imre Deak
2017-01-13 10:48 ` Greg Kroah-Hartman [this message]
2017-01-13 12:24 ` 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=20170113104827.GA20965@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=chris@chris-wilson.co.uk \
--cc=imre.deak@intel.com \
--cc=jani.nikula@intel.com \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).