From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH] drm/i915: Sanitize the output registers after resume Date: Tue, 12 Apr 2011 17:00:05 -0700 Message-ID: <20110412170005.7286b2fc@jbarnes-desktop> References: <1302628011-16640-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy2-pub.bluehost.com (oproxy2-pub.bluehost.com [67.222.39.60]) by gabe.freedesktop.org (Postfix) with SMTP id B09489EFF5 for ; Tue, 12 Apr 2011 17:00:16 -0700 (PDT) In-Reply-To: <1302628011-16640-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, stable@kernel.org List-Id: intel-gfx@lists.freedesktop.org On Tue, 12 Apr 2011 18:06:51 +0100 Chris Wilson 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 > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35796 > Signed-off-by: Chris Wilson > 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. -- Jesse Barnes, Intel Open Source Technology Center