intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH i-g-t] tests: add pc8
Date: Tue, 6 Aug 2013 17:43:23 -0300	[thread overview]
Message-ID: <CA+gsUGTJsuABJSJbCsQWM0oLmAQ4_pnmhiXR4W6eWA6WZ4advw@mail.gmail.com> (raw)
In-Reply-To: <20130806201102.GH22035@phenom.ffwll.local>

2013/8/6 Daniel Vetter <daniel@ffwll.ch>:
> On Tue, Aug 06, 2013 at 04:33:53PM -0300, Paulo Zanoni wrote:
>> 2013/8/5 Daniel Vetter <daniel@ffwll.ch>:
>> > On Mon, Aug 05, 2013 at 10:42:08AM -0300, Paulo Zanoni wrote:
>> >> 2013/8/5 Daniel Vetter <daniel@ffwll.ch>:
>> >> > On Mon, Jul 29, 2013 at 05:53:27PM -0300, Paulo Zanoni wrote:
>> >> The problem is: let's imagine there's some important register that we
>> >> initialize when starting the driver, but then we don't touch it
>> >> anymore. And this register is one of the registers that get reset when
>> >> we enter PC8, but our code doesn't fix it after leaving PC8. So if you
>> >> boot your machine, do something to allow PC8+ and then disallow it,
>> >> the register will go back to the "reset" state (which isn't guaranteed
>> >> to be 0x0, especially on display registers). Then you run tests/pc8:
>> >> it reads the register (which contains the "reset" value instead of the
>> >> real value set by our driver when it got loaded, because we already
>> >> entered PC8+ once), enters PC8+, leaves PC8+, reads the register
>> >> again, notices the value is the same and then gives us a "PASS". On
>> >> the other hand, if you didn't reach PC8+ before running tests/pc8,
>> >> then it would have noticed the value of the register changes.
>> >>
>> >> In other words: if some register gets initialized by our driver to a
>> >> non-default value, but this value gets lost after we enter/leave PC8+,
>> >> we will *only* be able to notice the difference when comparing a state
>> >> where we *never* entered PC8+ against a state where we "already
>> >> entered PC8+ at least once", because after the first time you
>> >> enter/leave PC8+ you'll already have reset the register, so you'll be
>> >> comparing bugged state against bugged state.
>> >
>> > Ok, I see your point. But imo igt testcases shouldn't (at least with the
>> > testcases run by default) have such detailed knowledge of what the kernel
>> > actually does with the registers. So a depency like "this test needs to be
>> > run after a fresh boot when we've never entered pc8+ yet" isn't good since
>> > it'll make the testcase fragile.
>> >
>> > Instead the test should check whether everything still works after we've
>> > been in pc8+ for a bit. One exception could be w/a bits if we have a
>> > common igt testcase to check for all of them. Then we could just rerun
>> > that testcase.
>> >
>> > But if e.g. the swizzling settings get lost over pc8+ it's better to add
>> > an explicit functional swizzle test here instead of checking registers.
>>
>> So instead of doing this, why not just make sure the very first i-g-t
>> test gets us to PC8+, ant then run the full i-g-t suite after that?
>> This should cover all the stuff that breaks due to us not restoring
>> registers properly. Then we only have to worry about the things that
>> run while PC8 is enabled, we can do that in another test.
>
> It would be nice if we could do this (e.g. also for re-running igt after
> gpu hangs or after a suspend/resume). But I think atm QA runs testcases
> essentially in a random order (or not in one we can control) so doing that
> is pretty hard.

Can't we just tell them we need this one first?

>
> Since the major usecase here would be to sanity-check some registers (for
> w/a and sane settings, e.g. the ddi transalation buffer settings) and we
> don't yet really have a good integration of the existing wa setting
> checker tool I think we can just punt here. I'll add a note to my igt
> wishlist about this. And of course pls keep the special test mode in your
> testcase so that developers could manually check that we correctly restore
> registers.

Well, the ddi buffer translation problem leads to big screen
corruption on testdisplay.

>
> Imo a big issue with making the w/a checker work is that it'll be a giant
> pain to keep it in sync with the kernel sources. But maybe we can extend
> the existing w/a sourcecode comment grabber in a clever way. Damien, any
> ideas?
>
> Cheers, Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch



-- 
Paulo Zanoni

  parent reply	other threads:[~2013-08-06 20:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 20:48 [PATCH 0/8] Allow Package C8+ Paulo Zanoni
2013-07-29 20:48 ` [PATCH 1/8] drm/i915: add the FCLK case to intel_ddi_get_cdclk_freq Paulo Zanoni
2013-07-29 20:48 ` [PATCH 2/8] drm/i915: don't disable/reenable IVB error interrupts when not needed Paulo Zanoni
2013-07-30  9:46   ` Chris Wilson
2013-08-01 17:16     ` Paulo Zanoni
2013-07-29 20:48 ` [PATCH 3/8] drm/i915: allow package C8+ states on Haswell (disabled) Paulo Zanoni
2013-07-29 21:42   ` Chris Wilson
2013-07-31 14:24     ` Paulo Zanoni
2013-07-31 15:01       ` Chris Wilson
2013-07-31 16:47         ` Paulo Zanoni
2013-07-29 23:11   ` Chris Wilson
2013-07-29 20:48 ` [PATCH 4/8] drm/i915: avoid waking up from PC8 on DP AUX operations Paulo Zanoni
2013-07-30  9:40   ` Chris Wilson
2013-07-31 14:31     ` Paulo Zanoni
2013-07-31 14:45       ` Chris Wilson
2013-07-29 20:48 ` [PATCH 5/8] drm/i915: avoid waking up from PC8 on GMBUS operations Paulo Zanoni
2013-07-30  9:30   ` Chris Wilson
2013-08-05  6:07     ` Daniel Vetter
2013-08-05 13:17       ` Paulo Zanoni
2013-07-29 20:48 ` [PATCH 6/8] drm/i915: silence message about the DDI buffers Paulo Zanoni
2013-07-29 20:48 ` [PATCH 7/8] drm/i915: add i915_pc8_status debugfs file Paulo Zanoni
2013-07-29 20:48 ` [PATCH 8/8] drm/i915: allow Package C8+ by default Paulo Zanoni
2013-07-30  9:25   ` Chris Wilson
2013-07-29 20:53 ` [PATCH i-g-t] tests: add pc8 Paulo Zanoni
2013-08-05  6:05   ` Daniel Vetter
2013-08-05 13:42     ` Paulo Zanoni
2013-08-05 15:35       ` Daniel Vetter
2013-08-06 19:33         ` Paulo Zanoni
2013-08-06 20:11           ` Daniel Vetter
2013-08-06 20:18             ` Daniel Vetter
2013-08-06 20:43             ` Paulo Zanoni [this message]
2013-08-13 21:48               ` Daniel Vetter

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=CA+gsUGTJsuABJSJbCsQWM0oLmAQ4_pnmhiXR4W6eWA6WZ4advw@mail.gmail.com \
    --to=przanoni@gmail.com \
    --cc=daniel@ffwll.ch \
    --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 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).