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

ykzhao yakui.zhao at intel.com
Wed Sep 2 11:34:21 CEST 2009


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 at 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;




More information about the Intel-gfx mailing list