From patchwork Wed Sep 2 16:27:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 45154 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n828VsSp019108 for ; Wed, 2 Sep 2009 08:31:54 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B77C9F38D; Wed, 2 Sep 2009 01:31:53 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by gabe.freedesktop.org (Postfix) with ESMTP id EC4059EFD6 for ; Wed, 2 Sep 2009 01:31:50 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 02 Sep 2009 01:18:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,317,1249282800"; d="scan'208";a="444841735" Received: from unknown (HELO localhost.localdomain) ([10.239.36.122]) by orsmga002.jf.intel.com with ESMTP; 02 Sep 2009 01:38:06 -0700 From: Zhenyu Wang To: jbarnes@virtuousgeek.org Date: Thu, 3 Sep 2009 00:27:05 +0800 Message-Id: <1251908825-3477-1-git-send-email-zhenyuw@linux.intel.com> X-Mailer: git-send-email 1.5.3.8 Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] drm/i915: do dynamic clock freq control only in kernel modesetting X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Don't do dynamic clock frequence change if not in kernel modesetting. But this one keeps render clock control which should be fine. Btw, I don't have machine with dual frequence feature to really test this now, but this fixed kernel oops when kernel modesetting is disabled. Signed-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/intel_display.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 6a58e1d..81ba1a2 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3418,6 +3418,9 @@ static void intel_idle_update(struct work_struct *work) intel_decrease_displayclock(dev); } + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + return; + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { /* Skip inactive CRTCs */ if (!crtc->fb) @@ -3451,6 +3454,9 @@ void intel_mark_busy(struct drm_device *dev, struct drm_gem_object *obj) dev_priv->busy = true; intel_increase_renderclock(dev, true); + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + return; + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { if (!crtc->fb) continue;