Re: [Intel-gfx] [PATCH] drm/i915: boost GPU and CPU freq when leaving idle

2013-06-28 Thread Arjan van de Ven

On 6/28/2013 11:37 AM, Chris Wilson wrote:

On Fri, Jun 28, 2013 at 09:54:32AM -0700, Jesse Barnes wrote:

Coming out of idle is usually due to some sort of user input (swiping a
screen, clicking a button) and often results in some sort of graphical
animation.  To prevent stutter for a CPU or GPU intensive animation,
boost the GPU and CPU freq to the maximum to get the first frame out as
quickly as possible.  The normal CPU and GPU frequency management code
will take over from there and (hopefully) clock down to save power as
needed if the max frequencies aren't required.

This could probably be done more cleanly, and possibly without another
uncached read in the execbuf path if we tracked idleness elsewhere.  I'm
also unsure about the cpufreq calls; I don't really know if this will do
what I want...


Would seem like a good idea to make intel_mark_busy() dtrt and use them.
-Chris



Is there a way to force the GPU always to run at the top speed?
(since it might well be the most efficient way to run things due to 
race-to-halt)

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


Re: [Intel-gfx] [PATCH 2/2] drm/i915: Align the retire_requests worker to the nearest second

2012-10-07 Thread Arjan van de Ven
On 10/5/2012 6:53 AM, Chris Wilson wrote:
 By using round_jiffies() we can align the wakeup of our worker to the
 nearest second in order to batch wakeups and reduce system load, which
 is useful for unimportant coarse tasks like our retire_requests.
 
 Suggested-by: Arjan van de Ven ar...@linux.intel.com
 Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk
 Cc: Arjan van de Ven ar...@linux.intel.com
 ---
  drivers/gpu/drm/i915/i915_gem.c |   14 +++---
  1 file changed, 11 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
 index 8e05d53..706f481 100644
 --- a/drivers/gpu/drm/i915/i915_gem.c
 +++ b/drivers/gpu/drm/i915/i915_gem.c
 @@ -2084,6 +2084,11 @@ i915_gem_next_request_seqno(struct intel_ring_buffer 
 *ring)
   return ring-outstanding_lazy_request;
  }
  
 +static unsigned long round_jiffies_delay(unsigned long delay)
 +{
 + return round_jiffies_relative(delay) - jiffies;
 +}

this is buggy


 +
  int
  i915_add_request(struct intel_ring_buffer *ring,
struct drm_file *file,
 @@ -2155,7 +2160,8 @@ i915_add_request(struct intel_ring_buffer *ring,
   }
   if (was_empty) {
   queue_delayed_work(dev_priv-wq,
 -dev_priv-mm.retire_work, HZ);
 +dev_priv-mm.retire_work,
 +round_jiffies_delay(HZ));

when used like this


round_jiffies() rounds absolute jiffies towards the next second

round_jiffies_relative() already subtracts jiffies from the result, like
the helper that you're trying to invent here does ;=)

doing that double up is a bad idea.


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