From patchwork Wed Jun 15 20:32:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 883532 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5FKXDKH020859 for ; Wed, 15 Jun 2011 20:33:33 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4AD3DA0875 for ; Wed, 15 Jun 2011 13:33:12 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from oproxy1-pub.bluehost.com (oproxy1-pub.bluehost.com [66.147.249.253]) by gabe.freedesktop.org (Postfix) with SMTP id B22BC9E8AF for ; Wed, 15 Jun 2011 13:33:00 -0700 (PDT) Received: (qmail 21727 invoked by uid 0); 15 Jun 2011 20:33:00 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by cpoproxy1.bluehost.com with SMTP; 15 Jun 2011 20:33:00 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=virtuousgeek.org; h=Received:Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=AviXFUh2GcrGKBRm5Ix56nM/OaUrKCX2hQKsJkGlX5yb5gHFOFjD20LqDAUx1tyu40AcRYmQmpPM1mooiaUUsCnN1tkTSAmJg13VO4+qYdfGDo8VLIadyIVJ3c4WeHqy; Received: from c-67-161-37-189.hsd1.ca.comcast.net ([67.161.37.189] helo=jbarnes-desktop) by box514.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1QWwln-0004gW-Ud; Wed, 15 Jun 2011 14:33:00 -0600 Date: Wed, 15 Jun 2011 13:32:56 -0700 From: Jesse Barnes To: Alan Stern Subject: Re: Oops in i915 intel_init_clock_gating Message-ID: <20110615133256.113293a0@jbarnes-desktop> In-Reply-To: References: X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.0; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Cc: Kernel development list , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 15 Jun 2011 20:33:33 +0000 (UTC) On Wed, 15 Jun 2011 16:08:51 -0400 (EDT) Alan Stern wrote: > The problem of dev_priv->display.init_clock_gating not getting set is > still present in 3.0-rc3. On my system this happens because > intel_init_display() never gets called in the first place. > > AFAICT, the normal calling sequence during driver initialization is: > > i915_driver_load() -> i915_load_modeset_init() -> > intel_modeset_init() -> intel_init_display(). > > But in my case the call to i915_load_modeset_init() doesn't occur > because drm_core_check_feature(dev, DRIVER_MODESET) is False. Ouch, a non-KMS config. Any reason you can't use KMS? This patch should help at any rate. diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 0defd42..a1a28fb 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -429,6 +429,9 @@ static int i915_drm_thaw(struct drm_device *dev) /* KMS EnterVT equivalent */ if (drm_core_check_feature(dev, DRIVER_MODESET)) { mutex_lock(&dev->struct_mutex); + + intel_init_clock_gating(dev); + dev_priv->mm.suspended = 0; error = i915_gem_init_ringbuffer(dev); diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 60a94d2..b478d16 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -863,8 +863,6 @@ int i915_restore_state(struct drm_device *dev) I915_WRITE(IMR, dev_priv->saveIMR); } - intel_init_clock_gating(dev); - if (IS_IRONLAKE_M(dev)) { ironlake_enable_drps(dev); intel_init_emon(dev);