diff mbox

drm/i915: do dynamic clock freq control only in kernel modesetting

Message ID 20090903013006.GA8437@zhen-devel.sh.intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Zhenyu Wang Sept. 3, 2009, 1:30 a.m. UTC
On 2009.09.02 17:34:21 +0800, ykzhao wrote:
> > 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;
> > +
> Is this required?
> This function is never called if the KMS is disabled.

oh, yeah, I was thinking even if KMS is not active, we might still
be able to adjust render clock, not read the code carefully.

> >  	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;
> > +
> Should this be moved before increasing the render clock?
> In the UMS mode we had better not touch the render clock.

As we actually can't do any help if KMS is disabled, maybe
simply do as below is enough.

From b9feb67eda98ca53521b63f92840cf7ab1320701 Mon Sep 17 00:00:00 2001
From: Zhenyu Wang <zhenyuw@linux.intel.com>
Date: Thu, 3 Sep 2009 09:27:23 +0800
Subject: [PATCH] drm/i915: don't try dynamic clock control when not in kernel modesetting

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c4b17a7..e6ea590 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3448,6 +3448,9 @@  void intel_mark_busy(struct drm_device *dev, struct drm_gem_object *obj)
 	struct intel_framebuffer *intel_fb;
 	struct intel_crtc *intel_crtc;
 
+	if (!drm_core_check_feature(dev, DRIVER_MODESET))
+		return;
+
 	dev_priv->busy = true;
 	intel_increase_renderclock(dev, true);