diff mbox

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

Message ID 1251908825-3477-1-git-send-email-zhenyuw@linux.intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Zhenyu Wang Sept. 2, 2009, 4:27 p.m. UTC
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 <zhenyuw@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Comments

Zhao, Yakui Sept. 2, 2009, 9:34 a.m. UTC | #1
On Thu, 2009-09-03 at 00:27 +0800, Zhenyu Wang wrote:
> 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 <zhenyuw@linux.intel.com>
> ---
>  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;
> +
Is this required?
This function is never called if the KMS is disabled.
>  	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.
>  	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
>  		if (!crtc->fb)
>  			continue;
diff mbox

Patch

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;