Re: [Intel-gfx] drm/i915/slpc: Update freq min/max softlimits

2016-08-20 Thread Chris Wilson
On Sat, Aug 20, 2016 at 10:39:25AM +0530, Sagar Arun Kamble wrote: > + obj = dev_priv->guc.slpc.vma->obj; > + if (obj) { OOPS. > + intel_slpc_query_task_state(dev_priv); > + > + page = i915_gem_object_get_page(obj, 0); > + if (page) > +

Re: [Intel-gfx] Add support for GuC-based SLPC

2016-08-20 Thread Chris Wilson
On Sat, Aug 20, 2016 at 10:38:59AM +0530, Sagar Arun Kamble wrote: > This series has been tested with SKL GuC firmware > version 9.18 which is yet to be released. Performance and > power testing with these patches and 9.18 firmware is at > parity and in some cases better than host solution today >

Re: [Intel-gfx] drm/i915/slpc: Update current requested frequency

2016-08-20 Thread Chris Wilson
On Sat, Aug 20, 2016 at 10:39:10AM +0530, Sagar Arun Kamble wrote: > From: Tom O'Rourke > > When SLPC is controlling requested frequency, the rps.cur_freq > value is not used to make the frequency request. > > Before using rps.cur_freq in sysfs or debugfs, read > requested frequency from registe

Re: [Intel-gfx] [PATCH 17/19] drm/i915: Use SSE4.1 movntdqa based memcpy for sampling GuC log buffer

2016-08-20 Thread Chris Wilson
On Sat, Aug 20, 2016 at 12:14:46PM +0530, Goel, Akash wrote: > > > On 8/19/2016 11:49 PM, Chris Wilson wrote: > >On Fri, Aug 19, 2016 at 02:13:16PM +0530, akash.g...@intel.com wrote: > >>From: Akash Goel > >> > >>In order to have fast reads from the GuC log buffer, used SSE4.1 movntdqa > >>based

[Intel-gfx] [PATCH] drm/i915: Ignore stuck requests when considering hangs

2016-08-20 Thread Chris Wilson
If the engine isn't being retired (worker starvation?) then it is possible for us to repeatedly observe that between consecutive hangchecks the seqno on the ring to be the same and there remain unretired requests. Ignore these completely and only regard the engine as busy for the purpose of hang de

[Intel-gfx] ✗ Ro.CI.BAT: failure for drm/i915: Ignore stuck requests when considering hangs

2016-08-20 Thread Patchwork
== Series Details == Series: drm/i915: Ignore stuck requests when considering hangs URL : https://patchwork.freedesktop.org/series/11359/ State : failure == Summary == Series 11359v1 drm/i915: Ignore stuck requests when considering hangs http://patchwork.freedesktop.org/api/1.0/series/11359/re

[Intel-gfx] [PATCH i-g-t] lib/intel_chipset: Fix compilation when enabling the debugger.

2016-08-20 Thread Marius Vlad
Add IS_SANDYBRIDGE() macro used by debugger/eudb. Signed-off-by: Marius Vlad CC: Chris Wilson --- lib/intel_chipset.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h index 1003266..3c1260b 100644 --- a/lib/intel_chipset.h +++ b/lib/intel_chipset.h @

[Intel-gfx] [PATCH i-g-t] lib/igt_core: Print stacktrace when receiving one of the crash signals.

2016-08-20 Thread Marius Vlad
While at it add SIGFPE as a crash signal. Signed-off-by: Marius Vlad CC: Chris Wilson --- lib/igt_core.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/igt_core.c b/lib/igt_core.c index 801f02f..67e1a4f 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1482,7 +

Re: [Intel-gfx] [PATCH i-g-t] lib/intel_chipset: Fix compilation when enabling the debugger.

2016-08-20 Thread Chris Wilson
On Sat, Aug 20, 2016 at 06:32:01PM +0300, Marius Vlad wrote: > Add IS_SANDYBRIDGE() macro used by debugger/eudb. > > Signed-off-by: Marius Vlad > CC: Chris Wilson Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

Re: [Intel-gfx] [PATCH i-g-t] lib/igt_core: Print stacktrace when receiving one of the crash signals.

2016-08-20 Thread Chris Wilson
On Sat, Aug 20, 2016 at 06:32:36PM +0300, Marius Vlad wrote: > While at it add SIGFPE as a crash signal. > > Signed-off-by: Marius Vlad > CC: Chris Wilson Seems reasonable. Though did you check that print_backtrace() was sigsafe? It doesn't use stdio, malloc, or any of the usual suspects? -Chri

Re: [Intel-gfx] drm/i915/slpc: Use intel_slpc_* functions if supported

2016-08-20 Thread Kamble, Sagar A
Thanks for the review David. Have incorporated the changes and will send in next series. On 8/20/2016 1:57 PM, David Weinehall wrote: On Sat, Aug 20, 2016 at 10:39:06AM +0530, Sagar Arun Kamble wrote: From: Tom O'Rourke On platforms with SLPC support: call intel_slpc_*() functions from corr

Re: [Intel-gfx] drm/i915: Check GuC load status for Host to GuC action and SLPC status

2016-08-20 Thread Kamble, Sagar A
Thanks for the review Deepak. Have incorporated the changes and will send in next series. On 8/20/2016 10:40 AM, Deepak S wrote: On 20/08/16 10:39 AM, Sagar Arun Kamble wrote: Host to GuC actions should not be invoked when GuC isn't loaded hence add early return in i915_guc_action if GuC lo

Re: [Intel-gfx] drm/i915/slpc: Update freq min/max softlimits

2016-08-20 Thread Kamble, Sagar A
On 8/20/2016 1:32 PM, Chris Wilson wrote: On Sat, Aug 20, 2016 at 10:39:25AM +0530, Sagar Arun Kamble wrote: + obj = dev_priv->guc.slpc.vma->obj; + if (obj) { OOPS. Fixed in next series. + intel_slpc_query_task_state(dev_priv); + + page = i915_gem_o

Re: [Intel-gfx] drm/i915/slpc: Update current requested frequency

2016-08-20 Thread Kamble, Sagar A
On 8/20/2016 1:45 PM, Chris Wilson wrote: On Sat, Aug 20, 2016 at 10:39:10AM +0530, Sagar Arun Kamble wrote: From: Tom O'Rourke When SLPC is controlling requested frequency, the rps.cur_freq value is not used to make the frequency request. Before using rps.cur_freq in sysfs or debugfs, read

Re: [Intel-gfx] Add support for GuC-based SLPC

2016-08-20 Thread Kamble, Sagar A
On 8/20/2016 1:46 PM, Chris Wilson wrote: On Sat, Aug 20, 2016 at 10:38:59AM +0530, Sagar Arun Kamble wrote: This series has been tested with SKL GuC firmware version 9.18 which is yet to be released. Performance and power testing with these patches and 9.18 firmware is at parity and in some c

[Intel-gfx] drm/i915: Remove RPM suspend dependency on rps.enabled and related changes

2016-08-20 Thread Sagar Arun Kamble
For Gen9, RPM suspend is failing if rps.enabled=false. This is needed for other platforms as RC6 and RPS enabling is indicated by rps.enabled. RPM Suspend depends only on RC6, so we need to remove the check of rps.enabled. For Gen9 RC6 and RPS enabling is separated hence do rps.enabled check only f

[Intel-gfx] Add support for GuC-based SLPC

2016-08-20 Thread Sagar Arun Kamble
SLPC (Single Loop Power Controller) is a replacement for some host-based power management features. The SLPC implementation runs in firmware on GuC. This series has been tested with SKL GuC firmware version 9.18 which is yet to be released. Performance and power testing with these patches and 9.1

[Intel-gfx] drm/i915/slpc: Add enable_slpc module parameter

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke i915.enable_slpc is used to override the default for slpc usage. The expected values are -1=auto, 0=disabled [default], 1=enabled. slpc_enable_sanitize() converts i915.enable_slpc to either 0 or 1. Interpretation of default value is based on HAS_SLPC(), after slpc_version_chec

[Intel-gfx] drm/i915/slpc: Add parameter unset/set/get functions

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke Add slpc_param_id enum values. Add events for setting/unsetting parameters. v1: Use host2guc_slpc update slcp_param_id enum values for SLPC 2015.2.4 return void instead of ignored error code (Paulo) v2: Checkpatch update. Signed-off-by: Tom O'Rourke Signed-off-by: S

[Intel-gfx] drm/i915/slpc: Keep RP SW Mode enabled while disabling rps

2016-08-20 Thread Sagar Arun Kamble
With SLPC, only RP SW Mode control should be left enabled by i915. Else, SLPC requests through through RPNSWREQ will not be granted. Signed-off-by: Sagar Arun Kamble --- drivers/gpu/drm/i915/intel_pm.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i91

[Intel-gfx] drm/i915/slpc: Add/Update interface for requested frequency

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke When SLPC is controlling requested frequency, the rps.cur_freq value is not used to make the frequency request. Requested frequency from register RPNSWREQ has the value most recently requested by SLPC firmware. Adding new sysfs interface gt_req_freq_mhz to know this value. SLP

[Intel-gfx] drm/i915/slpc: Sanitize SLPC version

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke The SLPC interface has changed and could continue to change. Only GuC versions known to be compatible are supported here. On Skylake, GuC firmware v6 is supported. Other platforms and versions can be added here later. v1: Updated with modified sanitize_slpc_option in earlie

[Intel-gfx] drm/i915/slpc: Add broxton support

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke Adds has_slpc to broxton info and adds broxton to version check. The SLPC interface version 2015.2.4 is found in Broxton Guc v5. v1: Adjusted slpc version check for major version 8. Added message if version mismatch happens for easier debug. (Sagar) Signed-off-by: Tom O'R

[Intel-gfx] drm/i915: Add support for SKL/BXT 9.18 GuC Firmware for SLPC

2016-08-20 Thread Sagar Arun Kamble
v2: Checkpatch update. Signed-off-by: Sagar Arun Kamble --- drivers/gpu/drm/i915/i915_debugfs.c | 71 ++-- drivers/gpu/drm/i915/intel_guc_loader.c | 12 +++--- drivers/gpu/drm/i915/intel_slpc.c | 27 +++- drivers/gpu/drm/i915/intel_slpc.h | 73

[Intel-gfx] drm/i915/slpc: Add i915_slpc_info to debugfs

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke i915_slpc_info shows the contents of SLPC shared data parsed into text format. v1: Reformat slpc info (Radek) squashed query task state info in slpc info, kunmap before seq_print (Paulo) return void instead of ignored return value (Paulo) Avoid magic numbers an

[Intel-gfx] drm/i915/slpc: Add has_slpc capability flag

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke Add has_slpc capablity flag to indicate GuC firmware supports single loop power control (SLPC). SLPC is a replacement for some host-based power management features. v1: fix whitespace (Sagar) Reviewed-by: David Weinehall Signed-off-by: Tom O'Rourke Signed-off-by: Sagar Aru

[Intel-gfx] drm/i915: Check GuC load status for Host to GuC action and SLPC status

2016-08-20 Thread Sagar Arun Kamble
Host to GuC actions should not be invoked when GuC isn't loaded hence add early return in i915_guc_action if GuC load status is not SUCCESS. Also, SLPC status has to be linked with GuC load status to make sure SLPC actions get invoked when GuC is loaded. v2: Space and function return convention is

[Intel-gfx] drm/i915/slpc: Add SKL SLPC Support

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke This patch adds has_slpc to skylake info. The SLPC interface has changed and could continue to change. Only GuC versions known to be compatible are supported here. On Skylake, GuC firmware v6 is supported. Other platforms and versions can be added here later. v1: Move slpc_

[Intel-gfx] drm/i915/slpc: Add enable/disable debugfs for slpc

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke Adds debugfs hooks for each slpc task. The enable/disable debugfs files are i915_slpc_gtperf, i915_slpc_balancer, and i915_slpc_dcc. Each of these can take the values: "default", "enabled", or "disabled" v1: update for SLPC v2015.2.4 dfps and turbo merged and renamed "gt

[Intel-gfx] drm/i915/slpc: Enable SLPC in guc if supported

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke If slpc enabled, then add enable SLPC flag to guc control parameter during guc load. v1: Use intel_slpc_enabled() (Paulo) Reviewed-by: David Weinehall Signed-off-by: Tom O'Rourke Signed-off-by: Sagar Arun Kamble --- drivers/gpu/drm/i915/intel_guc_loader.c | 3 +++ 1 file

[Intel-gfx] drm/i915/slpc: Add slpc_status enum values

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke v1: fix whitespace (Sagar) Signed-off-by: Tom O'Rourke Signed-off-by: Sagar Arun Kamble --- drivers/gpu/drm/i915/intel_slpc.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_slpc.h b/drivers/gpu/drm/i915/intel_slp

[Intel-gfx] drm/i915/slpc: Expose guc functions for use with SLPC

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke Expose host2guc_action for use by SLPC in intel_slpc.c. Expose functions to allocate and release objects used by GuC to be used for SLPC shared memory object. v1: Updated function names as they need to be made extern. (ChrisW) Reviewed-by: David Weinehall Signed-off-by: Tom

[Intel-gfx] drm/i915/slpc: Update freq min/max softlimits

2016-08-20 Thread Sagar Arun Kamble
v2: Removing checks for vma obj and kmap_atomic validity. (Chris) Signed-off-by: Sagar Arun Kamble --- drivers/gpu/drm/i915/intel_slpc.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_slpc.c b/drivers/gpu/drm/i915/intel_slpc.c index 5ab83

[Intel-gfx] drm/i915/slpc: If using SLPC, do not set frequency

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke When frequency requests are made by SLPC, host driver should not attempt to make frequency requests due to potential conflicts. Host-based turbo operations are already avoided when SLPC is used. This change covers other frequency requests such as from sysfs or debugfs interfa

[Intel-gfx] drm/i915/slpc: Add slpc support for max/min freq

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke Update sysfs and debugfs functions to set SLPC parameters when setting max/min frequency. v1: Update for SLPC 2015.2.4 (params for both slice and unslice) Replace HAS_SLPC with intel_slpc_active() (Paulo) Signed-off-by: Tom O'Rourke Signed-off-by: Sagar Arun Kamble ---

[Intel-gfx] drm/i915/slpc: Send shutdown event

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke Send SLPC shutdown event during disable, suspend, and reset operations. Sending shutdown event while already shutdown is OK. v1: Return void instead of ignored error code (Paulo) Removed WARN_ON for checking msb of gtt address of shared gem obj. (ChrisW) Added SLPC

[Intel-gfx] drm/i915/slpc: Use intel_slpc_* functions if supported

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke On platforms with SLPC support: call intel_slpc_*() functions from corresponding intel_*_gt_powersave() functions; and do not use rps functions. v1: Return void instead of ignored error code (Paulo) enable/disable RC6 in SLPC flows (Sagar) replace HAS_SLPC() use with i

[Intel-gfx] drm/i915/slpc: Only Enable GTPERF, Disable DCC, Balancer, IBC, FPS Stall

2016-08-20 Thread Sagar Arun Kamble
v1: Updated tasks and frequency post reset. Added DFPS param update for MAX_FPS and FPS Stall. Signed-off-by: Sagar Arun Kamble --- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/intel_slpc.c | 30 ++ drivers/gpu/drm/i915/intel_slpc.h | 5 +

[Intel-gfx] drm/i915/slpc: Send reset event

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke Add host2guc SLPC reset event and send reset event during enable. v1: Extract host2guc_slpc to handle slpc status code coding style changes (Paulo) Removed WARN_ON for checking msb of gtt address of shared gem obj. (ChrisW) host2guc_action to i915_guc_action ch

[Intel-gfx] drm/i915: Mark GuC load status as PENDING in i915_drm_resume_early

2016-08-20 Thread Sagar Arun Kamble
This will help avoid Host to GuC actions being called till GuC gets loaded during i915_drm_resume. Signed-off-by: Sagar Arun Kamble --- drivers/gpu/drm/i915/i915_drv.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c ind

[Intel-gfx] drm/i915/slpc: Allocate/Release/Initialize SLPC shared data

2016-08-20 Thread Sagar Arun Kamble
From: Tom O'Rourke SLPC shared data is used to pass information to/from SLPC in GuC firmware. For Skylake, platform sku type and slice count are identified from device id and fuse values. Support for other platforms needs to be added. v1: Update for SLPC interface version 2015.2.4 intel_sl