[Intel-gfx] [PATCH] drm/i915: do dynamic clock freq control only in kernel modesetting

Zhenyu Wang zhenyuw at linux.intel.com
Thu Sep 3 03:30:06 CEST 2009


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 at 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 at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

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);
 
-- 
1.6.3.3


-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090903/1a22360f/attachment.sig>


More information about the Intel-gfx mailing list