All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: daniel.vetter@intel.com, intel-gfx@lists.freedesktop.org,
	Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH RESEND] drm: i915: Preserve old FBC status for update without new planes
Date: Fri, 9 Jun 2017 22:40:02 +0300	[thread overview]
Message-ID: <20170609194002.GZ12629@intel.com> (raw)
In-Reply-To: <149703629912.23435.15932739889623009582@mail.alporthouse.com>

On Fri, Jun 09, 2017 at 08:24:59PM +0100, Chris Wilson wrote:
> Quoting Gabriel Krisman Bertazi (2017-06-01 16:36:08)
> > If the atomic commit doesn't include any new plane, there is no need to
> > choose a new CRTC for FBC, and the intel_fbc_choose_crtc() will bail out
> > early.  Although, if the FBC setup failed in the previous commit, if the
> > current commit doesn't include new plane update, it tries to overwrite
> > no_fbc_reason to "no suitable CRTC for FBC".  For that scenario, it is
> > better that we simply keep the old message in-place to make debugging
> > easier.
> > 
> > A scenario where this happens is with the
> > igt@kms_frontbuffer_tracking@fbc-suspend testcase when executed on a
> > Haswell system with not enough stolen memory.  When enabling the CRTC,
> > the FBC setup will be correctly initialized to a specific CRTC, but
> > won't be enabled, since there is not enough memory.  The testcase will
> > then enable CRC checking, which requires a quirk for Haswell, which
> > issues a new atomic commit that doesn't update the planes.  Since that
> > update doesn't include any new planes (and the FBC wasn't enabled),
> > intel_fbc_choose_crtc() will not find any suitable CRTC, but update the
> > error message, hiding the lack of memory information, which is the
> > actual cause of the initialization failure.  As a result, this causes
> > that test, which should skip, to fail on Haswell.
> > 
> > Changes since v1:
> >   - Update commit message (Manasi)
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100020
> > Fixes: f7e9b004b8a3 ("drm/i915/fbc: inline intel_fbc_can_choose()")
> 
> I just don't see the test case as being a good reason to claim the
> kernel behaviour is broken. The kernel may report any of the reasons as
> the one that caused FBC to be disabled (they are all valid, it is only
> the order in which we test, or the order in which we set the reason that
> determines the "reason" reported via debugfs). The test itself looks to
> be at fault for rejecting a valid FBC failure and claiming it to be a
> test failure. The test is far too fragile and dependent upon assumptions
> about the kernel internals.

Just a random idea that popped to my head (probably not for the first
time); I think the most informative option would be to make the kernel
report a separate fbc reason for each pipe. That way at least each pipe
would have one clear reason for refusing fbc. Currently some of the
reasons are per-pipe and some are global, which leads to this kind of
confusion.

But that of course doesn't solve all the problems if the test continues
to make fragile assumptions about the kernel behaviour.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-06-09 19:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01 15:36 [PATCH RESEND] drm: i915: Preserve old FBC status for update without new planes Gabriel Krisman Bertazi
2017-06-01 15:54 ` ✓ Fi.CI.BAT: success for drm: i915: Preserve old FBC status for update without new planes (rev2) Patchwork
2017-06-01 23:09 ` [PATCH RESEND] drm: i915: Preserve old FBC status for update without new planes Manasi Navare
2017-06-05 19:46   ` Paulo Zanoni
2017-06-09 19:24 ` Chris Wilson
2017-06-09 19:40   ` Ville Syrjälä [this message]
2017-06-09 19:53     ` Paulo Zanoni
2017-06-09 22:20       ` Gabriel Krisman Bertazi
2017-06-09 19:40   ` Paulo Zanoni
2017-06-09 22:09   ` Gabriel Krisman Bertazi

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=20170609194002.GZ12629@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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.