From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: re-init modeset hw state after gpu reset Date: Wed, 11 Apr 2012 12:09:11 +0200 Message-ID: <20120411100911.GD4296@phenom.ffwll.local> References: <1334065584-10392-1-git-send-email-daniel.vetter@ffwll.ch> <1334065811-13697-1-git-send-email-daniel.vetter@ffwll.ch> <1334067022_346667@CP5-2952> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by gabe.freedesktop.org (Postfix) with ESMTP id 886479F7A0 for ; Wed, 11 Apr 2012 03:08:19 -0700 (PDT) Received: by wibhm17 with SMTP id hm17so3591196wib.0 for ; Wed, 11 Apr 2012 03:08:18 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1334067022_346667@CP5-2952> 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: Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Tue, Apr 10, 2012 at 03:10:23PM +0100, Chris Wilson wrote: > On Tue, 10 Apr 2012 15:50:11 +0200, Daniel Vetter wrote: > > After a gpu reset we need to re-init some of the hw state we only > > initialize when modeset is enabled, like rc6, hw contexts or render/GT > > core clock gating and workaround register settings. > > > > Note that this patch has a small change in the resume code: > > - rc6 on gen6+ is only restored for the modeset case (for more > > consistency with other callsites). This is no problem because recent > > kernels refuse to load drm/i915 without kms on gen6+ > > - rc6/emon on ilk is only restored for the modeset case. This is no > > problem because rc6 is disabled by default on ilk, and ums on ilk > > has never really been a supported option outside of horrible rhel > > backports. > > > > v2: Chris Wilson noticed that we not only fail to restore the clock > > gating settings after gpu reset. > > > > v3: Move the call to modeset_init_hw in _reset out of the > > struct_mutext protected area - other callers don't hold it, too. > > > > Signed-Off-by: Daniel Vetter > > I don't think it makes the locking any worse than it already is, but it > is becoming more and more suspect. > > Reviewed-by: Chris Wilson Queued for -next, thanks for the review. -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48