For the ones affected by RC6 issues..
Subsystems (2)
Hi,
if you are among the ones affected by any kind of RC6 issues on Sandy Bridge platform, please, try the following patch and report if it changes the behavior somehow on your machine.
This patch allows to enable different and separate RC6 stages independently from each other. So chances are, with one of the parameters things could work better (or worse) for you. If this is the case, we'd really like to know what happens.
So please, try it with different kernel i915_enable_rc6 parameter value. Namely, the following ones:
- i915_enable_rc6=1 (it should enable only RC6)
- i915_enable_rc6=2 (it should enable only deep RC6)
- i915_enable_rc6=3 (it should enable RC6 and deep RC6)
- i915_enable_rc6=4 (it should enable deepest RC6)
- i915_enable_rc6=5 (it should enable RC6 and deepest RC6)
- i915_enable_rc6=6 (it should enable deep and deepest RC6)
- i915_enable_rc6=7 (it should enable all possible RC6 states)
If anything changes with any of those parameters, please, let me know.
-Eugeni
PATCH 1/1 drm/i915: allow to select rc6 modes via kernel parameter
This allows to select which rc6 modes are to be used via kernel parameter, via a bitmask parameter. E.g.:
- to enable rc6, i915_enable_rc6=1
- to enable rc6 and deep rc6, i915_enable_rc6=3
- to enable rc6 and deepest rc6, use i915_enable_rc6=5
- to enable rc6, deep and deepest rc6, use i915_enable_rc6=7
Note that this changes behavior - previously, value of 1 would enable both RC6 and deep RC6. Now it should only enable RC6 and deep/deepest RC6 stages must be enabled manually.
--- drivers/gpu/drm/i915/i915_drv.c | 6 +++++- drivers/gpu/drm/i915/i915_drv.h | 5 +++++ drivers/gpu/drm/i915/intel_display.c | 24 ++++++++++++++++++++---- 3 files changed, 30 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +5 -1
@@ -66,7 +66,11 @@ MODULE_PARM_DESC(semaphores,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: -1 (use per-chip default)" ); +"Enable power-saving render C-state 6. " +"Different stages can be selected via bitmask values " +"(0 = disable; 1 = enable rc6; 2 = enable deep rc6; 4 = enable deepest rc6). " +"For example, 3 would enable rc6 and deep rc6, and 7 would enable everything. " +"default: -1 (use per-chip default)" );int i915_enable_fbc__read_mostly =-1 ;module_param_named (i915_enable_fbc, i915_enable_fbc, int,0600 );
drivers/gpu/drm/i915/i915_drv.h +5 -0
@@ -997,6 +997,11 @@ struct drm_i915_file_private {#include "i915_trace.h" +/* RC6 modes */ +#define INTEL_RC6_ENABLE (1<<0) +#define INTEL_RC6p_ENABLE (1<<1) +#define INTEL_RC6pp_ENABLE (1<<2) +extern struct drm_ioctl_desc i915_ioctls[];extern int i915_max_ioctl;extern unsigned int i915_fbpercrtc__always_unused ;
drivers/gpu/drm/i915/intel_display.c +20 -4
@@ -7907,7 +7907,7 @@ void intel_init_emon(struct drm_device *dev) dev_priv->corr = (lcfuse &LCFUSE_HIV_MASK ); } -static bool intel_enable_rc6 (struct drm_device *dev) +static int intel_enable_rc6 (struct drm_device *dev) {/* * Respect the kernel parameter if it is set
@@ -7938,6 +7938,7 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv)u32 gt_perf_status =I915_READ (GEN6_GT_PERF_STATUS );u32 pcu_mbox, rc6_mask =0 ;int cur_freq, min_freq, max_freq; +int rc6_mode;int i;/* Here begins a magic sequence of register writes to enable
@@ -7968,9 +7969,24 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv)I915_WRITE (GEN6_RC6p_THRESHOLD,100000 );I915_WRITE (GEN6_RC6pp_THRESHOLD,64000 );/* unused */ -if (intel_enable_rc6 (dev_priv->dev)) - rc6_mask = GEN6_RC_CTL_RC6p_ENABLE | -GEN6_RC_CTL_RC6_ENABLE ; + rc6_mode =intel_enable_rc6 (dev_priv->dev); +/* Are we enabling rc6? */ +if (rc6_mode >0 ) { +if (rc6_mode &INTEL_RC6_ENABLE ) { +DRM_INFO ("i915: Enabling RC6\n" ); + rc6_mask |=GEN6_RC_CTL_RC6_ENABLE ; + } + +if (rc6_mode & INTEL_RC6p_ENABLE) { +DRM_INFO ("i915: Enabling deep RC6\n" ); + rc6_mask |= GEN6_RC_CTL_RC6p_ENABLE; + } + +if (rc6_mode & INTEL_RC6pp_ENABLE) { +DRM_INFO ("i915: Enabling deepest RC6\n" ); + rc6_mask |= GEN6_RC_CTL_RC6pp_ENABLE; + } + } I915_WRITE(GEN6_RC_CONTROL, rc6_mask |
Signature · 1 line
1.7.9
Quoted 3 lines · Eugeni Dodonov
if you are among the ones affected by any kind of RC6 issues on Sandy Bridge platform, please, try the following patch and report if it changes the behavior somehow on your machine.
Can it be pulled from git somewhere? I do not use any tools for getting patches from mbox into git (I even do not know if it would be doable from knode what I'm using as the list reader). But I'd like to try this anyway...
Second question: Does it apply to 3.2.x?
Regards,
Kai
Quoted 6 lines · Kai Krakow
Quoted 3 lines · Eugeni Dodonov
if you are among the ones affected by any kind of RC6 issues on Sandy Bridge platform, please, try the following patch and report if it changes the behavior somehow on your machine.
Quoted 7 lines
Can it be pulled from git somewhere? I do not use any tools for getting patches from mbox into git (I even do not know if it would be doable from knode what I'm using as the list reader). But I'd like to try this anyway...
Second question: Does it apply to 3.2.x?
It is for 3.2 :). I can be applied to older kernel versions with (small) tweaking.
Git repo is at http://cgit.freedesktop.org/~eugeni/kernel/log/?h=rc6,
sorry, I forgot to mention it.
Signature · 2 lines
Eugeni Dodonov <http://eugeni.dodonov.net/>
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 14 lines · Eugeni Dodonov
Quoted 12 lines · Kai Krakow
Quoted 2 lines · Eugeni Dodonov
if you are among the ones affected by any kind of RC6 issues on Sandy Bridge platform, please, try the following patch and report if it
changes
Quoted 1 line
the behavior somehow on your machine.
Can it be pulled from git somewhere? I do not use any tools for getting patches from mbox into git (I even do not know if it would be doable from knode what I'm using as the list reader). But I'd like to try this anyway...
Quoted 10 lines
Quoted 2 lines
Second question: Does it apply to 3.2.x?
It is for 3.2 :). I can be applied to older kernel versions with (small) tweaking.
Git repo is at http://cgit.freedesktop.org/~eugeni/kernel/log/?h=rc6,
sorry, I forgot to mention it.
Hi folks,
for the ones of you running Ubuntu and suffering from these issues, Leann Ogasawara from Canonical has setup a ppa with pre-built kernel with this patch at http://people.canonical.com/~ogasawara/eugeni/rc6/ (thanks a lot, again!!).
Signature · 2 lines
Eugeni Dodonov <http://eugeni.dodonov.net/>
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 3 lines · Eugeni Dodonov
if you are among the ones affected by any kind of RC6 issues on Sandy Bridge platform, please, try the following patch and report if it changes the behavior somehow on your machine.
kakra@jupiter ~ $ dmesg|fgrep -i "rc6"
[ 0.000000] Kernel command line: quiet real_root=/dev/sda3
real_rootflags=compress=lzo,subvol=root64 fastboot zcache splash=silent,theme:default console=tty1 desktop nmi_watchdog=0 libata.ignore_hpa=1 acpi_enforce_resources=lax usbcore.autosuspend=1 i915.i915_enable_rc6=1
[ 1.000514] [drm] i915: Enabling RC6
This seems to work...
Did not try the others but I suppose my system hangs with deep rc6. I will test this a few days.
HTH
Kai