[PATCH 3/3] drm/i915: re-enable rc6 by default when GMAR is disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 16, 2011 at 10:17:55PM -0200, Eugeni Dodonov wrote:
> Most of the rc6-related hangs and major issues were addressed for the past
> months.
> 
> Let's re-enable it by default to provide a more wider testing, and catch
> the remaining problems.
> 
> According to tests, enablement of rc6 results in up to +50% improvements
> in power usage and battery life, so it certainly would be a nice feature
> to have enabled by default.
> 
> Also, most of the rc6-related issues seem to came from GMAR, so we only
> enable it as long as GMAR is disabled.
> 
> CC: Keith Packard <keithp at keithp.com>
> CC: Daniel Vetter <daniel.vetter at ffwll.ch>
> CC: Jesse Barnes <jbarnes at virtuousgeek.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38567
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c      |    2 +-
>  drivers/gpu/drm/i915/intel_display.c |    3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 565725c..337a568 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -63,7 +63,7 @@ module_param_named(semaphores, i915_semaphores, int, 0600);
>  MODULE_PARM_DESC(semaphores,
>  		"Use semaphores for inter-ring sync (default: -1 (use per-chip defaults))");
>  
> -unsigned int i915_enable_rc6 __read_mostly = 0;
> +unsigned int i915_enable_rc6 __read_mostly = 1;
>  module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600);
>  MODULE_PARM_DESC(i915_enable_rc6,
>  		"Enable power-saving render C-state 6 (default: true)");
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 981b1f1..5dd0878 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -31,6 +31,7 @@
>  #include <linux/kernel.h>
>  #include <linux/slab.h>
>  #include <linux/vgaarb.h>
> +#include <linux/intel-iommu.h>
>  #include <drm/drm_edid.h>
>  #include "drmP.h"
>  #include "intel_drv.h"
> @@ -8746,7 +8747,7 @@ void intel_modeset_init(struct drm_device *dev)
>  
>  void intel_modeset_gem_init(struct drm_device *dev)
>  {
> -	if (IS_IRONLAKE_M(dev))
> +	if (IS_IRONLAKE_M(dev) && dmar_disabled)
>  		ironlake_enable_rc6(dev);
>  
>  	intel_setup_overlay(dev);
> -- 

This is not sufficient. You need to know that DMAR is compiled in, and
is actually being used.

The variable you want is: !intel_iommu_gfx_mapped

I think I saw Keith say he was sending this patch out on IRC.

Ben


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux