public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org, stable@kernel.org
Subject: Re: [PATCH] drm/i915: Sanitize the output registers after resume
Date: Wed, 13 Apr 2011 07:53:18 +0100	[thread overview]
Message-ID: <b7da2f$r2pb6k@fmsmga001.fm.intel.com> (raw)
In-Reply-To: <20110412170005.7286b2fc@jbarnes-desktop>

On Tue, 12 Apr 2011 17:00:05 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Tue, 12 Apr 2011 18:06:51 +0100
> Chris Wilson <chris@chris-wilson.co.uk> wrote:
> 
> > Similar to booting, we need to inspect the state left by the BIOS and
> > remove any conflicting bits before we take over. The example reported by
> > Seth Forshee is very similar to the bug we encountered with the state left
> > by grub2, that the crtc pipe<->planning mapping was reversed from our
> > expectations and so we failed to turn off the outputs when booting or,
> > in this case, resuming. This may be in fact the same bug, but triggered
> > at resume time.
> > 
> > This patch rearranges the code we already have to clear up the
> > conflicting state upon init and calls it from reset (which is called
> > after we have lost control of the hardware, i.e. along both the boot and
> > resume paths) instead.
> > 
> > Reported-and-tested-by: Seth Forshee <seth.forshee@canonical.com>
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35796
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: stable@kernel.org
> > ---
> 
> It's a bigger change, but I'd really rather we have functions to probe
> the existing config and copy it into our mode config structures.  That
> way we can re-use the code to minimize flicker and transitions, and
> potentially just leave things alone if the config is valid (it should
> be since the BIOS provided it) and we just need to switch the fb around
> or disable VGA.

On the one hand, we should just be able to trust a BIOS config, right? On
the other hand did you just see what that BIOS did to Sitosfe's machine?
Or the PGTBL_ERs it generates on other machines?

Though we can reduce this particular issue by aligning ourselves better
with the state left by the BIOS, I don't think we can lose a function
whose job it is to make sure that the hw state is consistent with KMS. And
that function needs to be called whenever we takeover from the BIOS -
which is the purpose of this patch.

At the moment, we have a real problem where outputs are continuing to use
GTT as we rewrite it from underneath them. The simplest solution for that
is to disable the outputs right at the start. The next step is then to
recreate the GEM and KMS state currently occupied by the BIOS and preserve
that across the takeover.  So yes, to do it completely flicker free is a
much harder job.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

      reply	other threads:[~2011-04-13  6:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 17:06 [PATCH] drm/i915: Sanitize the output registers after resume Chris Wilson
2011-04-12 17:10 ` Chris Wilson
2011-04-12 17:26 ` Keith Packard
2011-04-12 18:01   ` Chris Wilson
2011-04-13  0:00 ` Jesse Barnes
2011-04-13  6:53   ` Chris Wilson [this message]

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='b7da2f$r2pb6k@fmsmga001.fm.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=stable@kernel.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