* [PATCH] drm/i915: Respect HW RC6 states availability
@ 2012-10-24 19:01 Rodrigo Vivi
2012-10-24 21:33 ` Chris Wilson
0 siblings, 1 reply; 4+ messages in thread
From: Rodrigo Vivi @ 2012-10-24 19:01 UTC (permalink / raw)
To: intel-gfx
If Hardware doesn't allow RC6p or RC6pp we shall avoid end users turning them on, falling back to the only RC6 deepness available.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
---
drivers/gpu/drm/i915/intel_pm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 50f5809..a8c6c08 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2370,7 +2370,7 @@ static void gen6_disable_rps(struct drm_device *dev)
int intel_enable_rc6(const struct drm_device *dev)
{
/* Respect the kernel parameter if it is set */
- if (i915_enable_rc6 >= 0)
+ if (i915_enable_rc6 = 0)
return i915_enable_rc6;
if (INTEL_INFO(dev)->gen == 5) {
@@ -2394,6 +2394,9 @@ int intel_enable_rc6(const struct drm_device *dev)
return INTEL_RC6_ENABLE;
}
+ if (i915_enable_rc6 > 0)
+ return i915_enable_rc6;
+
DRM_DEBUG_DRIVER("RC6 and deep RC6 enabled\n");
return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE);
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Respect HW RC6 states availability
2012-10-24 19:01 [PATCH] drm/i915: Respect HW RC6 states availability Rodrigo Vivi
@ 2012-10-24 21:33 ` Chris Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2012-10-24 21:33 UTC (permalink / raw)
To: Rodrigo Vivi, intel-gfx
On Wed, 24 Oct 2012 17:01:22 -0200, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 50f5809..a8c6c08 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2370,7 +2370,7 @@ static void gen6_disable_rps(struct drm_device *dev)
> int intel_enable_rc6(const struct drm_device *dev)
> {
> /* Respect the kernel parameter if it is set */
> - if (i915_enable_rc6 >= 0)
> + if (i915_enable_rc6 = 0)
This doesn't do what you want.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] drm/i915: Respect HW RC6 states availability
[not found] <84c8a88hfcj@orsmga001.jf.intel.com>
@ 2012-10-24 22:07 ` Rodrigo Vivi
2012-10-24 22:13 ` Rodrigo Vivi
0 siblings, 1 reply; 4+ messages in thread
From: Rodrigo Vivi @ 2012-10-24 22:07 UTC (permalink / raw)
To: intel-gfx
If Hardware doesn't allow RC6p or RC6pp we shall avoid end users turning them on, falling back to the only RC6 deepness available.
v2: fixed "if" comparison pointed by Chris Wilson
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
---
drivers/gpu/drm/i915/intel_pm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 50f5809..b6362d0 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2370,7 +2370,7 @@ static void gen6_disable_rps(struct drm_device *dev)
int intel_enable_rc6(const struct drm_device *dev)
{
/* Respect the kernel parameter if it is set */
- if (i915_enable_rc6 >= 0)
+ if (i915_enable_rc6 == 0)
return i915_enable_rc6;
if (INTEL_INFO(dev)->gen == 5) {
@@ -2394,6 +2394,9 @@ int intel_enable_rc6(const struct drm_device *dev)
return INTEL_RC6_ENABLE;
}
+ if (i915_enable_rc6 > 0)
+ return i915_enable_rc6;
+
DRM_DEBUG_DRIVER("RC6 and deep RC6 enabled\n");
return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE);
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Respect HW RC6 states availability
2012-10-24 22:07 ` Rodrigo Vivi
@ 2012-10-24 22:13 ` Rodrigo Vivi
0 siblings, 0 replies; 4+ messages in thread
From: Rodrigo Vivi @ 2012-10-24 22:13 UTC (permalink / raw)
To: intel-gfx
please ignore the other one. Stupid me (again) confused emacs with vim
and messed title up.
also I don't know why git send-email didn't like my in-reply-to
On Wed, Oct 24, 2012 at 8:07 PM, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
> If Hardware doesn't allow RC6p or RC6pp we shall avoid end users turning them on, falling back to the only RC6 deepness available.
>
> v2: fixed "if" comparison pointed by Chris Wilson
>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 50f5809..b6362d0 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2370,7 +2370,7 @@ static void gen6_disable_rps(struct drm_device *dev)
> int intel_enable_rc6(const struct drm_device *dev)
> {
> /* Respect the kernel parameter if it is set */
> - if (i915_enable_rc6 >= 0)
> + if (i915_enable_rc6 == 0)
> return i915_enable_rc6;
>
> if (INTEL_INFO(dev)->gen == 5) {
> @@ -2394,6 +2394,9 @@ int intel_enable_rc6(const struct drm_device *dev)
> return INTEL_RC6_ENABLE;
> }
>
> + if (i915_enable_rc6 > 0)
> + return i915_enable_rc6;
> +
> DRM_DEBUG_DRIVER("RC6 and deep RC6 enabled\n");
> return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE);
> }
> --
> 1.7.11.7
>
--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-24 22:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-24 19:01 [PATCH] drm/i915: Respect HW RC6 states availability Rodrigo Vivi
2012-10-24 21:33 ` Chris Wilson
[not found] <84c8a88hfcj@orsmga001.jf.intel.com>
2012-10-24 22:07 ` Rodrigo Vivi
2012-10-24 22:13 ` Rodrigo Vivi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.