Another chapter in RC6 saga...
Subsystems (2)
cover Another chapter in RC6 saga...
Hi,
so far, apparently all the RC6-related issues on Sandy Bridge seem to be gone when we enable RC6 but do not enable deep RC6. This apparently also cures the symptoms we were seeing with RC6 when VTd was active, so in theory we won't need the intel_iommu duct-taping anymore.
Somehow, we haven't attempted to flip the default RC6 status once again this year (yet), so this seems to be a good timing to get this into -next and ask the ones affected by RC6 bugs with 3.2 kernel to test.
If this indeed would fix the problems with rc6, I guess we can slip this into -fixes; but with all the RC6 default status flip-flopping of the past months I prefer to be sure that it won't get reverted once again.
Note that this patch also gives a way to get into deepest rc6 - but it really never should be enabled by default. It is provided merely as a way to easy the debugging of those RC6 issues in the future.
Eugeni Dodonov (2):
drm/i915: allow to select rc6 modes via kernel parameter drm/i915: enable plain RC6 on Sandy Bridge by default
drivers/gpu/drm/i915/i915_drv.c | 6 +++++- drivers/gpu/drm/i915/i915_drv.h | 5 +++++ drivers/gpu/drm/i915/intel_display.c | 32 ++++++++++++++++++++++++-------- 3 files changed, 34 insertions(+), 9 deletions(-)
Signature · 1 line
1.7.8.4
PATCH 1/2 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
Please keep in mind that the deepest RC6 state really should NOT be used by default, as it could potentially worsen the issues with deep RC6. So do enable it only when you know what you are doing. However, having it around could help solving possible future rc6-related issues and their debugging on user machines.
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_DEBUG ("i915: Enabling RC6\n" ); + rc6_mask |=GEN6_RC_CTL_RC6_ENABLE ; + } + +if (rc6_mode & INTEL_RC6p_ENABLE) { +DRM_DEBUG ("i915: Enabling deep RC6\n" ); + rc6_mask |= GEN6_RC_CTL_RC6p_ENABLE; + } + +if (rc6_mode & INTEL_RC6pp_ENABLE) { +DRM_DEBUG ("i915: Enabling deepest RC6\n" ); + rc6_mask |= GEN6_RC_CTL_RC6pp_ENABLE; + } + } I915_WRITE(GEN6_RC_CONTROL, rc6_mask |
Signature · 1 line
1.7.8.4
Re: [PATCH 1/2] drm/i915: allow to select rc6 modes via kernel parameter
Quoted 14 lines · Eugeni Dodonov
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=7Please keep in mind that the deepest RC6 state really should NOT be used by default, as it could potentially worsen the issues with deep RC6. So do enable it only when you know what you are doing. However, having it around could help solving possible future rc6-related issues and their debugging on user machines.
Quoted 5 lines
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.
Signed-off-by Eugeni Dodonov <[email protected]>
A couple of nits, but the code does what it says on the tin. I was going to give an r-b, but those nits seem to be growing...
Quoted 1 line
+/* RC6 modes */
If you're going to put a comment here, at least put a descriptive comment. What is an rc mode, why should I care about the differences, when should it be used, by whom and perhaps how?
drivers/gpu/drm/i915/intel_display.c void gen6_enable_rps(struct drm_i915_private *dev_priv) · line 7973
Quoted 11 lines
drivers/gpu/drm/i915/intel_display.c +6
-3+#define INTEL_RC6_ENABLE (1<<0) +#define INTEL_RC6p_ENABLE (1<<1) +#define INTEL_RC6pp_ENABLE (1<<2) + -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? */
/* This comment is pure fluff. Don't tell me what, tell me why, or rm! */
drivers/gpu/drm/i915/intel_display.c void gen6_enable_rps(struct drm_i915_private *dev_priv) · line 7974
Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +1
-0+if (rc6_mode >0 ) {
I'm a little uneasy mixing signs and bitmasks, and this test looks a little pointless as intel_enable_rc6 now returns the bitmask. Kill it and we kill one level of indentation!
drivers/gpu/drm/i915/intel_display.c void gen6_enable_rps(struct drm_i915_private *dev_priv) · line 7976
Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +2
-0+if (rc6_mode &INTEL_RC6_ENABLE ) { +DRM_DEBUG ("i915: Enabling RC6\n" );
No need to include i915 here, it will be added by DRM_DEBUG. I think these are worthy of being INFO, if you can tidy them up into a single string and further prettify them.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH 1/2] drm/i915: allow to select rc6 modes via kernel parameter
Quoted 4 lines · Chris Wilson
Quoted 1 line
+ if (
rc6_mode> 0) {I'm a little uneasy mixing signs and bitmasks, and this test looks a little pointless as
intel_enable_rc6now returns the bitmask. Kill it and we kill one level of indentation!
I think not, because Eugeni documented "-1" as the chipset default...
Just my 2 cents...
Regards,
Kai
Re: [PATCH 1/2] drm/i915: allow to select rc6 modes via kernel parameter
Quoted 9 lines · Kai Krakow
Quoted 4 lines · Chris Wilson
Quoted 1 line
+ if (
rc6_mode> 0) {I'm a little uneasy mixing signs and bitmasks, and this test looks a little pointless as
intel_enable_rc6now returns the bitmask. Kill it and we kill one level of indentation!I think not, because Eugeni documented "-1" as the chipset default...
Not quite, Chris is right, we can get rid of this if block. Chipset default values are being handled by the intel_enable_rc6(), that function returns a valid bitmask now. So it will always return some meaningful values to us and explicitly say if RC6 should be disabled or enabled (and if enabled, which states are active).
Signature · 2 lines
Eugeni Dodonov <http://eugeni.dodonov.net/>
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915: allow to select rc6 modes via kernel parameter
In reply to Chris WilsonThis 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
Please keep in mind that the deepest RC6 state really should NOT be used by default, as it could potentially worsen the issues with deep RC6. So do enable it only when you know what you are doing. However, having it around could help solving possible future rc6-related issues and their debugging on user machines.
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.
v2: address Chris Wilson comments and clean up the code.
--- drivers/gpu/drm/i915/i915_drv.c | 6 +++++- drivers/gpu/drm/i915/i915_drv.h | 21 +++++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++++++++---- 3 files changed, 42 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 +21 -0
@@ -997,6 +997,27 @@ struct drm_i915_file_private {#include "i915_trace.h" +/** +* RC6 is a special power stage which allows the GPU to enter an very +* low-voltage mode when idle, using down to 0V while at this stage. This +* stage is entered automatically when the GPU is idle when RC6 support is +* enabled, and as soon as new workload arises GPU wakes up automatically as well. +* +* There are different RC6 modes available in Intel GPU, which differentiate +* among each other with the latency required to enter and leave RC6 and +* voltage consumed by the GPU in different states. +* +* The combination of the following flags define which states GPU is allowed +* to enter, while RC6 is the normal RC6 state, RC6p is the deep RC6, and +* RC6pp is deepest RC6. Their support by hardware varies according to the +* GPU, BIOS, chipset and platform. RC6 is usually the safest one and the one +* which brings the most power savings; deeper states save more power, but +* require higher latency to switch to and wake up. +*/ +#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 +16 -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,20 @@ 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); +if (rc6_mode &INTEL_RC6_ENABLE ) + rc6_mask |=GEN6_RC_CTL_RC6_ENABLE ; + +if (rc6_mode & INTEL_RC6p_ENABLE) + rc6_mask |= GEN6_RC_CTL_RC6p_ENABLE; + +if (rc6_mode & INTEL_RC6pp_ENABLE) + rc6_mask |= GEN6_RC_CTL_RC6pp_ENABLE; + +DRM_INFO ("Enabling RC6 states: RC6 %s, RC6p %s, RC6pp %s\n" , + (rc6_mode &INTEL_RC6_ENABLE ) ?"on" :"off" , + (rc6_mode & INTEL_RC6p_ENABLE) ?"on" :"off" , + (rc6_mode & INTEL_RC6pp_ENABLE) ?"on" :"off" ); I915_WRITE(GEN6_RC_CONTROL, rc6_mask |
Signature · 1 line
1.7.8.4
Re: [PATCH 1/1] drm/i915: allow to select rc6 modes via kernel parameter
Quoted 14 lines · Eugeni Dodonov
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=7Please keep in mind that the deepest RC6 state really should NOT be used by default, as it could potentially worsen the issues with deep RC6. So do enable it only when you know what you are doing. However, having it around could help solving possible future rc6-related issues and their debugging on user machines.
Quoted 5 lines
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.
v2: address Chris Wilson comments and clean up the code.
Wow, that comment is superb! Definitely a standard we should try to achieve everywhere.
Quoted 1 line
Signed-off-by Eugeni Dodonov <[email protected]>
References: https://bugs.freedesktop.org/show_bug.cgi?id=42579
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH 1/1] drm/i915: allow to select rc6 modes via kernel parameter
In reply to Eugeni DodonovQuoted 66 lines · Eugeni Dodonov
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=7Please keep in mind that the deepest RC6 state really should NOT be used by default, as it could potentially worsen the issues with deep RC6. So do enable it only when you know what you are doing. However, having it around could help solving possible future rc6-related issues and their debugging on user machines.
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.
v2: address Chris Wilson comments and clean up the code.
Signed-off-by Eugeni Dodonov <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 6 +++++- drivers/gpu/drm/i915/i915_drv.h | 21 +++++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++++++++---- 3 files changed, 42 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 +14
-0@@ -997,6 +997,27 @@ struct drm_i915_file_private {#include "i915_trace.h" +/** +* RC6 is a special power stage which allows the GPU to enter an very +* low-voltage mode when idle, using down to 0V while at this stage. This +* stage is entered automatically when the GPU is idle when RC6 support is +* enabled, and as soon as new workload arises GPU wakes up automatically as well. +* +* There are different RC6 modes available in Intel GPU, which differentiate +* among each other with the latency required to enter and leave RC6 and +* voltage consumed by the GPU in different states. +* +* The combination of the following flags define which states GPU is allowed +* to enter, while RC6 is the normal RC6 state, RC6p is the deep RC6, and +* RC6pp is deepest RC6. Their support by hardware varies according to the +* GPU, BIOS, chipset and platform. RC6 is usually the safest one and the one
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1023
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h +7
-0+* which brings the most power savings; deeper states save more power, but +* require higher latency to switch to and wake up. +*/ +#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 ;
Does it ever make sense to enable a deeper state without enabling the one before it? Ie. would we ever enable RC6p and not RC6? Maybe we don't want to have discrete bitfields and instead do:
drivers/gpu/drm/i915/i915_drv.h
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.h +3
-0+#define INTEL_RC6_ENABLE (1<<0) +#define INTEL_RC6p_ENABLE (1<<1) | INTEL_RC6_ENABLE +#define INTEL_RC6pp_ENABLE (1<<2) | INTEL_RC6p_ENABLE
Just a thought for the sake of hearing myself speak.
Re: [PATCH 1/1] drm/i915: allow to select rc6 modes via kernel parameter
Quoted 3 lines · Ben Widawsky
Quoted 1 line · Eugeni Dodonov
This allows to select which rc6 modes are to be used via kernel
parameter,
Quoted 9 lines
Quoted 9 lines
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=7Please keep in mind that the deepest RC6 state really should NOT be used by default, as it could potentially worsen the issues with deep RC6. So
do
Quoted 1 line
Quoted 1 line
enable it only when you know what you are doing. However, having it
around
Quoted 1 line
Quoted 1 line
could help solving possible future rc6-related issues and their
debugging
Quoted 3 lines
Quoted 3 lines
on user machines.
Note that this changes behavior - previously, value of 1 would enable
both
Quoted 5 lines
Quoted 5 lines
RC6 and deep RC6. Now it should only enable RC6 and deep/deepest RC6 stages must be enabled manually.
v2: address Chris Wilson comments and clean up the code.
Quoted 8 lines
Review
Quoted 8 lines
Signed-off-by Eugeni Dodonov <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 6 +++++- drivers/gpu/drm/i915/i915_drv.h | 21 +++++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++++++++---- 3 files changed, 42 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_drv.c
Quoted 8 lines
drivers/gpu/drm/i915/i915_drv.c MODULE_PARM_DESC(semaphores, · line 69
Quoted 8 lines
index a1103fc..b7a91db 100644
drivers/gpu/drm/i915/i915_drv.c +0
-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)");
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.c MODULE_PARM_DESC(semaphores,
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.c +3
-0+"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). "
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.c MODULE_PARM_DESC(semaphores, · line 72
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.c +1
-0+ "For example, 3 would enable rc6 and deep rc6, and 7
would enable everything. "
Quoted 5 lines
Review
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.c +1
-0+ "default: -1 (use per-chip default)");int i915_enable_fbc__read_mostly =-1 ;module_param_named (i915_enable_fbc, i915_enable_fbc, int,0600 );(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_drv.h
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1002
Quoted 10 lines
index 554bef7..c17bccf 100644
drivers/gpu/drm/i915/i915_drv.h +3
-0@@ -997,6 +997,27 @@ struct drm_i915_file_private {#include "i915_trace.h" +/** +* RC6 is a special power stage which allows the GPU to enter an very +* low-voltage mode when idle, using down to 0V while at this stage.
This
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1003
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* stage is entered automatically when the GPU is idle when RC6
support is
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1004
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* enabled, and as soon as new workload arises GPU wakes up
automatically as well.
Quoted 2 lines
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1006
Quoted 2 lines
drivers/gpu/drm/i915/i915_drv.h +2
-0+* +* There are different RC6 modes available in Intel GPU, which
differentiate
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1007
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* among each other with the latency required to enter and leave RC6
and
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private {
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.h +3
-0+* voltage consumed by the GPU in different states. +* +* The combination of the following flags define which states GPU is
allowed
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1011
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* to enter, while RC6 is the normal RC6 state, RC6p is the deep RC6,
and
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1012
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* RC6pp is deepest RC6. Their support by hardware varies according to
the
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1013
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* GPU, BIOS, chipset and platform. RC6 is usually the safest one and
the one
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1014
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* which brings the most power savings; deeper states save more power,
but
Quoted 13 lines
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1023
Quoted 9 lines
drivers/gpu/drm/i915/i915_drv.h +6
-0+* require higher latency to switch to and wake up. +*/ +#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 ;Does it ever make sense to enable a deeper state without enabling the one before it? Ie. would we ever enable RC6p and not RC6? Maybe we don't want to have discrete bitfields and instead do:
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.h +3
-0+#define INTEL_RC6_ENABLE (1<<0) +#define INTEL_RC6p_ENABLE (1<<1) | INTEL_RC6_ENABLE +#define INTEL_RC6pp_ENABLE (1<<2) | INTEL_RC6p_ENABLEJust a thought for the sake of hearing myself speak.
We checked with Jesse, and these states are independent.. So it should be possible to have RC6p and not plain RC6.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/1] drm/i915: allow to select rc6 modes via kernel parameter
Quoted 105 lines · Eugeni Dodonov
Quoted 3 lines · On Feb 12, 2012 6:53 PM, "Ben Widawsky" <[email protected]…
Quoted 1 line · Eugeni Dodonov
This allows to select which rc6 modes are to be used via kernel
parameter,
Quoted 9 lines
Quoted 9 lines
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=7Please keep in mind that the deepest RC6 state really should NOT be used by default, as it could potentially worsen the issues with deep RC6.
So do
Quoted 1 line
Quoted 1 line
enable it only when you know what you are doing. However, having it
around
Quoted 1 line
Quoted 1 line
could help solving possible future rc6-related issues and their
debugging
Quoted 3 lines
Quoted 3 lines
on user machines.
Note that this changes behavior - previously, value of 1 would
enable both
Quoted 6 lines
Quoted 6 lines
RC6 and deep RC6. Now it should only enable RC6 and deep/deepest RC6 stages must be enabled manually.
v2: address Chris Wilson comments and clean up the code.
Signed-off-by Eugeni Dodonov <[email protected]<mailto:[email protected]>>
Quoted 7 lines
Review
Quoted 7 lines
--- drivers/gpu/drm/i915/i915_drv.c | 6 +++++- drivers/gpu/drm/i915/i915_drv.h | 21 +++++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++++++++---- 3 files changed, 42 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_drv.cQuoted 8 lines
drivers/gpu/drm/i915/i915_drv.c MODULE_PARM_DESC(semaphores, · line 69
Quoted 8 lines
index a1103fc..b7a91db 100644
drivers/gpu/drm/i915/i915_drv.c +0
-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)");
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.c MODULE_PARM_DESC(semaphores,
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.c +3
-0+"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). "
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.c MODULE_PARM_DESC(semaphores, · line 72
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.c +1
-0+ "For example, 3 would enable rc6 and deep rc6, and 7would enable everything. "
Quoted 5 lines
Review
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.c +1
-0+ "default: -1 (use per-chip default)");int i915_enable_fbc__read_mostly =-1 ;module_param_named (i915_enable_fbc, i915_enable_fbc, int,0600 );(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_drv.hQuoted 10 lines
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1002
Quoted 10 lines
index 554bef7..c17bccf 100644
drivers/gpu/drm/i915/i915_drv.h +3
-0@@ -997,6 +997,27 @@ struct drm_i915_file_private {#include "i915_trace.h" +/** +* RC6 is a special power stage which allows the GPU to enter an very +* low-voltage mode when idle, using down to 0V while at this stage. This
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1003
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* stage is entered automatically when the GPU is idle when RC6 support is
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1004
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* enabled, and as soon as new workload arises GPU wakes up automatically as well.
Quoted 2 lines
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1006
Quoted 2 lines
drivers/gpu/drm/i915/i915_drv.h +2
-0+* +* There are different RC6 modes available in Intel GPU, which differentiate
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1007
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* among each other with the latency required to enter and leave RC6 and
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private {
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.h +3
-0+* voltage consumed by the GPU in different states. +* +* The combination of the following flags define which states GPU is allowed
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1011
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* to enter, while RC6 is the normal RC6 state, RC6p is the deep RC6, and
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1012
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* RC6pp is deepest RC6. Their support by hardware varies according to the
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1013
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* GPU, BIOS, chipset and platform. RC6 is usually the safest one and the one
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1014
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+* which brings the most power savings; deeper states save more power, but
Quoted 13 lines
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_file_private { · line 1023
Quoted 9 lines
drivers/gpu/drm/i915/i915_drv.h +6
-0+* require higher latency to switch to and wake up. +*/ +#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 ;Does it ever make sense to enable a deeper state without enabling the one before it? Ie. would we ever enable RC6p and not RC6? Maybe we don't want to have discrete bitfields and instead do:
Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.h +3
-0+#define INTEL_RC6_ENABLE (1<<0) +#define INTEL_RC6p_ENABLE (1<<1) | INTEL_RC6_ENABLE +#define INTEL_RC6pp_ENABLE (1<<2) | INTEL_RC6p_ENABLEJust a thought for the sake of hearing myself speak.
We checked with Jesse, and these states are independent.. So it should be possible to have RC6p and not plain RC6.
I'm sure it's possible, the question was, does it ever make sense?
Re: [PATCH 1/1] drm/i915: allow to select rc6 modes via kernel parameter
Quoted 5 lines · Ben Widawsky
Quoted 2 lines
We checked with Jesse, and these states are independent.. So it should be possible to have RC6p and not plain RC6.
I'm sure it's possible, the question was, does it ever make sense?
One theory we had in mind for this is that the issue could be caused by RC6, but avoided by more aggressive RC6 states. There was mostly motivated by one case which said that deep rc6 was working while rc6+deep rc6 were giving issues.
SNB with RC6 seems to be stable now, but perhaps it would be interesting to leave this possibility, so in case we ever observe something similar on any other GEN arch we'd have a quick way to debug.
Signature · 2 lines
Eugeni Dodonov <http://eugeni.dodonov.net/>
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: enable plain RC6 on Sandy Bridge by default
In reply to Eugeni DodonovThis is yet another chapter in the ongoing saga of bringing RC6 to Sandy Bridge machines by default.
Now that we have discovered that RC6 issues are triggered by RC6+ state, let's try to disable it by default. Plain RC6 is the one responsible for most energy savings, and so far it haven't given any problems - at least, none we are aware of.
So with this, when i915_enable_rc6=-1 (e.g., the default value), we'll attempt to enable plain RC6 only on SNB. For Ivy Bridge, the behavior stays the same as always - we enable both RC6 and deep RC6.
--- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -4
@@ -7925,11 +7925,11 @@ static int intel_enable_rc6(struct drm_device *dev)* Disable rc6 on Sandybridge */ if (INTEL_INFO (dev)->gen ==6 ) { -DRM_DEBUG_DRIVER ("Sandybridge: RC6 disabled\n" ); -return 0 ; +DRM_DEBUG_DRIVER ("Sandybridge: deep RC6 disabled\n" ); +return INTEL_RC6_ENABLE ; } -DRM_DEBUG_DRIVER ("RC6 enabled\n" ); -return 1 ; +DRM_DEBUG_DRIVER ("RC6 and deep RC6 enabled\n" ); +return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE); }void gen6_enable_rps (struct drm_i915_private *dev_priv)
Signature · 1 line
1.7.8.4
Re: [PATCH 2/2] drm/i915: enable plain RC6 on Sandy Bridge by default
Quoted 11 lines · Eugeni Dodonov
This is yet another chapter in the ongoing saga of bringing RC6 to Sandy Bridge machines by default.
Now that we have discovered that RC6 issues are triggered by RC6+ state, let's try to disable it by default. Plain RC6 is the one responsible for most energy savings, and so far it haven't given any problems - at least, none we are aware of.
So with this, when i915_enable_rc6=-1 (e.g., the default value), we'll attempt to enable plain RC6 only on SNB. For Ivy Bridge, the behavior stays the same as always - we enable both RC6 and deep RC6.
We appear to be lacking a bunch of tested-bys for what we proclaim to have been tested.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH 2/2] drm/i915: enable plain RC6 on Sandy Bridge by default
Quoted 10 lines · Chris Wilson
Quoted 8 lines · Eugeni Dodonov
This is yet another chapter in the ongoing saga of bringing RC6 to Sandy Bridge machines by default.
Now that we have discovered that RC6 issues are triggered by RC6+ state, let's try to disable it by default. Plain RC6 is the one responsible for most energy savings, and so far it haven't given any problems - at least, none we are aware of.
Quoted 7 lines
Quoted 3 lines
So with this, when i915_enable_rc6=-1 (e.g., the default value), we'll attempt to enable plain RC6 only on SNB. For Ivy Bridge, the behavior stays the same as always - we enable both RC6 and deep RC6.
We appear to be lacking a bunch of tested-bys for what we proclaim to have been tested.
So far I had 2 reports saying that RC6 solved the problems which were present with RC6+RC6p (previous default) on SNB.
I'll wait a bit more and send a v2 version of this patch with all the Tested-by's. Indeed, it makes sense to have those on this patch before picking it into any kernel tree. Meanwhile, if there are any other volunteers who were affected by SNB RC6 voodoo in the past and are willing to give these patches a try, please, do so!
(Not that it wouldn't prevent all the possible issues, but it would certify that it is not a placebo effect at least for someone...)
Signature · 2 lines
Eugeni Dodonov <http://eugeni.dodonov.net/>
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: enable plain RC6 on Sandy Bridge by default
Quoted 2 lines · Eugeni Dodonov
So far I had 2 reports saying that RC6 solved the problems which were present with RC6+RC6p (previous default) on SNB.
I was probably one of the early reporters... After testing a while, including video and 3D, I probably can safely say: The new default works rock solid for me.
Thank you.
Regards,
Kai
Re: [PATCH 2/2] drm/i915: enable plain RC6 on Sandy Bridge by default
In reply to Eugeni Dodonov<#part sign=pgpmime>
Quoted 2 lines · Eugeni Dodonov
So far I had 2 reports saying that RC6 solved the problems which were present with RC6+RC6p (previous default) on SNB.
For -fixes, I think we shouldn't enable rc6 by default, but we may want to change what enabling rc6 does on SNB to stop using deeper states? That should let more people enable it manually at least.
Signature · 1 line
[email protected]
Re: [PATCH 2/2] drm/i915: enable plain RC6 on Sandy Bridge by default
Quoted 11 lines · Keith Packard
<#part sign=pgpmime>
Quoted 2 lines · Eugeni Dodonov
So far I had 2 reports saying that RC6 solved the problems which were present with RC6+RC6p (previous default) on SNB.
For -fixes, I think we shouldn't enable rc6 by default, but we may want to change what enabling rc6 does on SNB to stop using deeper states? That should let more people enable it manually at least.
Hi Keith,
what if we pick only the 1st patch in this series for -fixes? It won't change the defaults in any way, but it will allow the ones willing to enable it manually on SNB to prevent issues.
E.g., with this patch, passing i915_enable_rc6=1 will enable plain RC6, and leave deep RC6 off. This is probably the safest setting so far - it results in nice power savings and all the other benefits of RC6, but avoid entering RC6+ - which seems to be responsible for all the issues on the affected machines apparently. And it would further help to isolate which rc6 states are the guilty ones on the affected machines, so in case any other problem arises, we can ask people to test with different 'i915_enable_rc6=N' parameter prior to fully reverting it again..
The change of the default value for SNB could go into -next kernel. By the time we'll get to the first release of 3.4 we'll certainly know if there are any issues with that.
Signature · 2 lines
Eugeni Dodonov <http://eugeni.dodonov.net/>
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: enable plain RC6 on Sandy Bridge by default
<#part sign=pgpmime>
Quoted 3 lines · Eugeni Dodonov
what if we pick only the 1st patch in this series for -fixes? It won't change the defaults in any way, but it will allow the ones willing to enable it manually on SNB to prevent issues.
That seems like too big a change at this point in the release cycle. We should be focused purely on fixing functionality bugs, not adding new features. So, instead of adding the ability to individually control RC6 levels, we should just change what RC6 does on SNB when it is enabled, then encourage people to test that and see if the shallowest RC6 states actually work. That will provide sufficient information to know whether it will be safe to turn that on by default in the next release, which is what we really want.
The smallest change that gives us the data we need is what I'd like to have.
Signature · 1 line
[email protected]