Re: [Intel-gfx] [PATCH 01/53] drm/i915: Remove ironlake rc6 support

2015-03-10 Thread Tomas Elf

On 05/03/2015 14:03, john.c.harri...@intel.com wrote:

From: John Harrison john.c.harri...@intel.com

Apparently, this has never worked reliably and is currently disabled. Also, the
gains are not particularly impressive. Thus rather than try to keep unused code
from decaying and having to update it for other driver changes, it was decided
to simply remove it.

For: VIZ-5115
Signed-off-by: John Harrison john.c.harri...@intel.com
---
  drivers/gpu/drm/i915/i915_debugfs.c  |   12 ---
  drivers/gpu/drm/i915/i915_drv.h  |3 -
  drivers/gpu/drm/i915/intel_display.c |2 -
  drivers/gpu/drm/i915/intel_drv.h |1 -
  drivers/gpu/drm/i915/intel_pm.c  |  155 --
  5 files changed, 173 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index 68a1e6e..18e4900 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1846,18 +1846,6 @@ static int i915_context_status(struct seq_file *m, void 
*unused)
if (ret)
return ret;

-   if (dev_priv-ips.pwrctx) {
-   seq_puts(m, power context );
-   describe_obj(m, dev_priv-ips.pwrctx);
-   seq_putc(m, '\n');
-   }
-
-   if (dev_priv-ips.renderctx) {
-   seq_puts(m, render context );
-   describe_obj(m, dev_priv-ips.renderctx);
-   seq_putc(m, '\n');
-   }
-
list_for_each_entry(ctx, dev_priv-context_list, link) {
if (!i915.enable_execlists 
ctx-legacy_hw_ctx.rcs_state == NULL)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 798fa88..05f106d 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1053,9 +1053,6 @@ struct intel_ilk_power_mgmt {

int c_m;
int r_t;
-
-   struct drm_i915_gem_object *pwrctx;
-   struct drm_i915_gem_object *renderctx;
  };

  struct drm_i915_private;
diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 5c35098..51f7ed4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13904,8 +13904,6 @@ void intel_modeset_cleanup(struct drm_device *dev)

intel_fbc_disable(dev);

-   ironlake_teardown_rc6(dev);
-
mutex_unlock(dev-struct_mutex);

/* flush any delayed tasks or pending work */
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index f4305be..b793558 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1229,7 +1229,6 @@ void intel_enable_gt_powersave(struct drm_device *dev);
  void intel_disable_gt_powersave(struct drm_device *dev);
  void intel_suspend_gt_powersave(struct drm_device *dev);
  void intel_reset_gt_powersave(struct drm_device *dev);
-void ironlake_teardown_rc6(struct drm_device *dev);
  void gen6_update_ring_freq(struct drm_device *dev);
  void gen6_rps_idle(struct drm_i915_private *dev_priv);
  void gen6_rps_boost(struct drm_i915_private *dev_priv);
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 542cf68..0762572 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3539,41 +3539,6 @@ void intel_update_sprite_watermarks(struct drm_plane 
*plane,
   pixel_size, enabled, scaled);
  }

-static struct drm_i915_gem_object *
-intel_alloc_context_page(struct drm_device *dev)
-{
-   struct drm_i915_gem_object *ctx;
-   int ret;
-
-   WARN_ON(!mutex_is_locked(dev-struct_mutex));
-
-   ctx = i915_gem_alloc_object(dev, 4096);
-   if (!ctx) {
-   DRM_DEBUG(failed to alloc power context, RC6 disabled\n);
-   return NULL;
-   }
-
-   ret = i915_gem_obj_ggtt_pin(ctx, 4096, 0);
-   if (ret) {
-   DRM_ERROR(failed to pin power context: %d\n, ret);
-   goto err_unref;
-   }
-
-   ret = i915_gem_object_set_to_gtt_domain(ctx, 1);
-   if (ret) {
-   DRM_ERROR(failed to set-domain on power context: %d\n, ret);
-   goto err_unpin;
-   }
-
-   return ctx;
-
-err_unpin:
-   i915_gem_object_ggtt_unpin(ctx);
-err_unref:
-   drm_gem_object_unreference(ctx-base);
-   return NULL;
-}
-
  /**
   * Lock protecting IPS related data structures
   */
@@ -4990,124 +4955,6 @@ static void valleyview_enable_rps(struct drm_device 
*dev)
intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
  }

-void ironlake_teardown_rc6(struct drm_device *dev)
-{
-   struct drm_i915_private *dev_priv = dev-dev_private;
-
-   if (dev_priv-ips.renderctx) {
-   i915_gem_object_ggtt_unpin(dev_priv-ips.renderctx);
-   drm_gem_object_unreference(dev_priv-ips.renderctx-base);
-   dev_priv-ips.renderctx = NULL;
-   }
-
-   if 

Re: [Intel-gfx] [PATCH 01/53] drm/i915: Remove ironlake rc6 support

2015-03-06 Thread Daniel Vetter
On Thu, Mar 05, 2015 at 03:36:03PM +, John Harrison wrote:
 On 05/03/2015 15:22, Daniel Vetter wrote:
 On Thu, Mar 05, 2015 at 02:03:03PM +, john.c.harri...@intel.com wrote:
 From: John Harrison john.c.harri...@intel.com
 
 Apparently, this has never worked reliably and is currently disabled. Also, 
 the
 gains are not particularly impressive. Thus rather than try to keep unused 
 code
 from decaying and having to update it for other driver changes, it was 
 decided
 to simply remove it.
 
 For: VIZ-5115
 Signed-off-by: John Harrison john.c.harri...@intel.com
 Queued for -next, thanks for the patch.
 -Daniel
 
 Can you hold off merging any of the other patches in the series for the
 moment. Tomas Elf is currently posting review comments, some with R-B some
 with change requests. Some of the re-work either for his comments or for
 yours causes changes which ripple through a number of the patches in the
 series. So I would like to repost the whole set once all the comments have
 been addressed. Otherwise, it all just gets far too messy as to which
 patches have or haven't been updated, what needs re-merging, which version
 is which, etc.

Fully agreed since that was my plan. I specifically pulled this one here
in since it should be otherwise free-standing and would likely cause
needless conflicts. For all the other patches it's better to first
converge on the review a bit more before proceeding with merging.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 01/53] drm/i915: Remove ironlake rc6 support

2015-03-05 Thread John . C . Harrison
From: John Harrison john.c.harri...@intel.com

Apparently, this has never worked reliably and is currently disabled. Also, the
gains are not particularly impressive. Thus rather than try to keep unused code
from decaying and having to update it for other driver changes, it was decided
to simply remove it.

For: VIZ-5115
Signed-off-by: John Harrison john.c.harri...@intel.com
---
 drivers/gpu/drm/i915/i915_debugfs.c  |   12 ---
 drivers/gpu/drm/i915/i915_drv.h  |3 -
 drivers/gpu/drm/i915/intel_display.c |2 -
 drivers/gpu/drm/i915/intel_drv.h |1 -
 drivers/gpu/drm/i915/intel_pm.c  |  155 --
 5 files changed, 173 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index 68a1e6e..18e4900 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1846,18 +1846,6 @@ static int i915_context_status(struct seq_file *m, void 
*unused)
if (ret)
return ret;
 
-   if (dev_priv-ips.pwrctx) {
-   seq_puts(m, power context );
-   describe_obj(m, dev_priv-ips.pwrctx);
-   seq_putc(m, '\n');
-   }
-
-   if (dev_priv-ips.renderctx) {
-   seq_puts(m, render context );
-   describe_obj(m, dev_priv-ips.renderctx);
-   seq_putc(m, '\n');
-   }
-
list_for_each_entry(ctx, dev_priv-context_list, link) {
if (!i915.enable_execlists 
ctx-legacy_hw_ctx.rcs_state == NULL)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 798fa88..05f106d 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1053,9 +1053,6 @@ struct intel_ilk_power_mgmt {
 
int c_m;
int r_t;
-
-   struct drm_i915_gem_object *pwrctx;
-   struct drm_i915_gem_object *renderctx;
 };
 
 struct drm_i915_private;
diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 5c35098..51f7ed4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13904,8 +13904,6 @@ void intel_modeset_cleanup(struct drm_device *dev)
 
intel_fbc_disable(dev);
 
-   ironlake_teardown_rc6(dev);
-
mutex_unlock(dev-struct_mutex);
 
/* flush any delayed tasks or pending work */
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index f4305be..b793558 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1229,7 +1229,6 @@ void intel_enable_gt_powersave(struct drm_device *dev);
 void intel_disable_gt_powersave(struct drm_device *dev);
 void intel_suspend_gt_powersave(struct drm_device *dev);
 void intel_reset_gt_powersave(struct drm_device *dev);
-void ironlake_teardown_rc6(struct drm_device *dev);
 void gen6_update_ring_freq(struct drm_device *dev);
 void gen6_rps_idle(struct drm_i915_private *dev_priv);
 void gen6_rps_boost(struct drm_i915_private *dev_priv);
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 542cf68..0762572 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3539,41 +3539,6 @@ void intel_update_sprite_watermarks(struct drm_plane 
*plane,
   pixel_size, enabled, scaled);
 }
 
-static struct drm_i915_gem_object *
-intel_alloc_context_page(struct drm_device *dev)
-{
-   struct drm_i915_gem_object *ctx;
-   int ret;
-
-   WARN_ON(!mutex_is_locked(dev-struct_mutex));
-
-   ctx = i915_gem_alloc_object(dev, 4096);
-   if (!ctx) {
-   DRM_DEBUG(failed to alloc power context, RC6 disabled\n);
-   return NULL;
-   }
-
-   ret = i915_gem_obj_ggtt_pin(ctx, 4096, 0);
-   if (ret) {
-   DRM_ERROR(failed to pin power context: %d\n, ret);
-   goto err_unref;
-   }
-
-   ret = i915_gem_object_set_to_gtt_domain(ctx, 1);
-   if (ret) {
-   DRM_ERROR(failed to set-domain on power context: %d\n, ret);
-   goto err_unpin;
-   }
-
-   return ctx;
-
-err_unpin:
-   i915_gem_object_ggtt_unpin(ctx);
-err_unref:
-   drm_gem_object_unreference(ctx-base);
-   return NULL;
-}
-
 /**
  * Lock protecting IPS related data structures
  */
@@ -4990,124 +4955,6 @@ static void valleyview_enable_rps(struct drm_device 
*dev)
intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 }
 
-void ironlake_teardown_rc6(struct drm_device *dev)
-{
-   struct drm_i915_private *dev_priv = dev-dev_private;
-
-   if (dev_priv-ips.renderctx) {
-   i915_gem_object_ggtt_unpin(dev_priv-ips.renderctx);
-   drm_gem_object_unreference(dev_priv-ips.renderctx-base);
-   dev_priv-ips.renderctx = NULL;
-   }
-
-   if (dev_priv-ips.pwrctx) {
-   

Re: [Intel-gfx] [PATCH 01/53] drm/i915: Remove ironlake rc6 support

2015-03-05 Thread Daniel Vetter
On Thu, Mar 05, 2015 at 02:03:03PM +, john.c.harri...@intel.com wrote:
 From: John Harrison john.c.harri...@intel.com
 
 Apparently, this has never worked reliably and is currently disabled. Also, 
 the
 gains are not particularly impressive. Thus rather than try to keep unused 
 code
 from decaying and having to update it for other driver changes, it was decided
 to simply remove it.
 
 For: VIZ-5115
 Signed-off-by: John Harrison john.c.harri...@intel.com

Queued for -next, thanks for the patch.
-Daniel

 ---
  drivers/gpu/drm/i915/i915_debugfs.c  |   12 ---
  drivers/gpu/drm/i915/i915_drv.h  |3 -
  drivers/gpu/drm/i915/intel_display.c |2 -
  drivers/gpu/drm/i915/intel_drv.h |1 -
  drivers/gpu/drm/i915/intel_pm.c  |  155 
 --
  5 files changed, 173 deletions(-)
 
 diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
 b/drivers/gpu/drm/i915/i915_debugfs.c
 index 68a1e6e..18e4900 100644
 --- a/drivers/gpu/drm/i915/i915_debugfs.c
 +++ b/drivers/gpu/drm/i915/i915_debugfs.c
 @@ -1846,18 +1846,6 @@ static int i915_context_status(struct seq_file *m, 
 void *unused)
   if (ret)
   return ret;
  
 - if (dev_priv-ips.pwrctx) {
 - seq_puts(m, power context );
 - describe_obj(m, dev_priv-ips.pwrctx);
 - seq_putc(m, '\n');
 - }
 -
 - if (dev_priv-ips.renderctx) {
 - seq_puts(m, render context );
 - describe_obj(m, dev_priv-ips.renderctx);
 - seq_putc(m, '\n');
 - }
 -
   list_for_each_entry(ctx, dev_priv-context_list, link) {
   if (!i915.enable_execlists 
   ctx-legacy_hw_ctx.rcs_state == NULL)
 diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
 index 798fa88..05f106d 100644
 --- a/drivers/gpu/drm/i915/i915_drv.h
 +++ b/drivers/gpu/drm/i915/i915_drv.h
 @@ -1053,9 +1053,6 @@ struct intel_ilk_power_mgmt {
  
   int c_m;
   int r_t;
 -
 - struct drm_i915_gem_object *pwrctx;
 - struct drm_i915_gem_object *renderctx;
  };
  
  struct drm_i915_private;
 diff --git a/drivers/gpu/drm/i915/intel_display.c 
 b/drivers/gpu/drm/i915/intel_display.c
 index 5c35098..51f7ed4 100644
 --- a/drivers/gpu/drm/i915/intel_display.c
 +++ b/drivers/gpu/drm/i915/intel_display.c
 @@ -13904,8 +13904,6 @@ void intel_modeset_cleanup(struct drm_device *dev)
  
   intel_fbc_disable(dev);
  
 - ironlake_teardown_rc6(dev);
 -
   mutex_unlock(dev-struct_mutex);
  
   /* flush any delayed tasks or pending work */
 diff --git a/drivers/gpu/drm/i915/intel_drv.h 
 b/drivers/gpu/drm/i915/intel_drv.h
 index f4305be..b793558 100644
 --- a/drivers/gpu/drm/i915/intel_drv.h
 +++ b/drivers/gpu/drm/i915/intel_drv.h
 @@ -1229,7 +1229,6 @@ void intel_enable_gt_powersave(struct drm_device *dev);
  void intel_disable_gt_powersave(struct drm_device *dev);
  void intel_suspend_gt_powersave(struct drm_device *dev);
  void intel_reset_gt_powersave(struct drm_device *dev);
 -void ironlake_teardown_rc6(struct drm_device *dev);
  void gen6_update_ring_freq(struct drm_device *dev);
  void gen6_rps_idle(struct drm_i915_private *dev_priv);
  void gen6_rps_boost(struct drm_i915_private *dev_priv);
 diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
 index 542cf68..0762572 100644
 --- a/drivers/gpu/drm/i915/intel_pm.c
 +++ b/drivers/gpu/drm/i915/intel_pm.c
 @@ -3539,41 +3539,6 @@ void intel_update_sprite_watermarks(struct drm_plane 
 *plane,
  pixel_size, enabled, scaled);
  }
  
 -static struct drm_i915_gem_object *
 -intel_alloc_context_page(struct drm_device *dev)
 -{
 - struct drm_i915_gem_object *ctx;
 - int ret;
 -
 - WARN_ON(!mutex_is_locked(dev-struct_mutex));
 -
 - ctx = i915_gem_alloc_object(dev, 4096);
 - if (!ctx) {
 - DRM_DEBUG(failed to alloc power context, RC6 disabled\n);
 - return NULL;
 - }
 -
 - ret = i915_gem_obj_ggtt_pin(ctx, 4096, 0);
 - if (ret) {
 - DRM_ERROR(failed to pin power context: %d\n, ret);
 - goto err_unref;
 - }
 -
 - ret = i915_gem_object_set_to_gtt_domain(ctx, 1);
 - if (ret) {
 - DRM_ERROR(failed to set-domain on power context: %d\n, ret);
 - goto err_unpin;
 - }
 -
 - return ctx;
 -
 -err_unpin:
 - i915_gem_object_ggtt_unpin(ctx);
 -err_unref:
 - drm_gem_object_unreference(ctx-base);
 - return NULL;
 -}
 -
  /**
   * Lock protecting IPS related data structures
   */
 @@ -4990,124 +4955,6 @@ static void valleyview_enable_rps(struct drm_device 
 *dev)
   intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
  }
  
 -void ironlake_teardown_rc6(struct drm_device *dev)
 -{
 - struct drm_i915_private *dev_priv = dev-dev_private;
 -
 - if (dev_priv-ips.renderctx) {
 - i915_gem_object_ggtt_unpin(dev_priv-ips.renderctx);
 - 

Re: [Intel-gfx] [PATCH 01/53] drm/i915: Remove ironlake rc6 support

2015-03-05 Thread John Harrison

On 05/03/2015 15:22, Daniel Vetter wrote:

On Thu, Mar 05, 2015 at 02:03:03PM +, john.c.harri...@intel.com wrote:

From: John Harrison john.c.harri...@intel.com

Apparently, this has never worked reliably and is currently disabled. Also, the
gains are not particularly impressive. Thus rather than try to keep unused code
from decaying and having to update it for other driver changes, it was decided
to simply remove it.

For: VIZ-5115
Signed-off-by: John Harrison john.c.harri...@intel.com

Queued for -next, thanks for the patch.
-Daniel


Can you hold off merging any of the other patches in the series for the 
moment. Tomas Elf is currently posting review comments, some with R-B 
some with change requests. Some of the re-work either for his comments 
or for yours causes changes which ripple through a number of the patches 
in the series. So I would like to repost the whole set once all the 
comments have been addressed. Otherwise, it all just gets far too messy 
as to which patches have or haven't been updated, what needs re-merging, 
which version is which, etc.


Thanks,
John.

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx