Intel-GFX Archive mirror
 help / color / mirror / Atom feed
* [PATCH i-g-t] overlay/intel-gpu-overlay Fix power consumption not being displayed
@ 2015-11-18 12:36 Marius Vlad
  2015-11-18 12:44 ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Marius Vlad @ 2015-11-18 12:36 UTC (permalink / raw
  To: marius.vlad0, intel-gfx

The power metter was not showing up due to a check over I915_PERF_ENERGY.
ENOENT is returned when I915_PERF_ENERGY is not available, and we use
that for relaying on debugfs i915_energy_uJ.

Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
---
 overlay/power.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/overlay/power.c b/overlay/power.c
index 6c5c374..6873e7f 100644
--- a/overlay/power.c
+++ b/overlay/power.c
@@ -60,7 +60,7 @@ int power_init(struct power *power)
 	memset(power, 0, sizeof(*power));
 
 	power->fd = perf_open();
-	if (power->fd != -1)
+	if (power->fd != -ENOENT)
 		return 0;
 
 	sprintf(buf, "%s/i915_energy_uJ", debugfs_dri_path);
@@ -121,7 +121,7 @@ int power_update(struct power *power)
 	if (power->error)
 		return power->error;
 
-	if (power->fd != -1) {
+	if (power->fd != -ENOENT) {
 		uint64_t data[2];
 		int len;
 
-- 
2.6.2

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH i-g-t] overlay/intel-gpu-overlay Fix power consumption not being displayed
@ 2015-11-18 12:39 marius.c.vlad
  0 siblings, 0 replies; 6+ messages in thread
From: marius.c.vlad @ 2015-11-18 12:39 UTC (permalink / raw
  To: marius.vlad0, intel-gfx

From: Marius Vlad <marius.c.vlad@intel.com>

The power metter was not showing up due to a check over I915_PERF_ENERGY.
ENOENT is returned when I915_PERF_ENERGY is not available, and we use
that for relaying on debugfs i915_energy_uJ.

Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
---
 overlay/power.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/overlay/power.c b/overlay/power.c
index 6c5c374..6873e7f 100644
--- a/overlay/power.c
+++ b/overlay/power.c
@@ -60,7 +60,7 @@ int power_init(struct power *power)
 	memset(power, 0, sizeof(*power));
 
 	power->fd = perf_open();
-	if (power->fd != -1)
+	if (power->fd != -ENOENT)
 		return 0;
 
 	sprintf(buf, "%s/i915_energy_uJ", debugfs_dri_path);
@@ -121,7 +121,7 @@ int power_update(struct power *power)
 	if (power->error)
 		return power->error;
 
-	if (power->fd != -1) {
+	if (power->fd != -ENOENT) {
 		uint64_t data[2];
 		int len;
 
-- 
2.6.2

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH i-g-t] overlay/intel-gpu-overlay Fix power consumption not being displayed
@ 2015-11-18 12:43 marius.c.vlad
  0 siblings, 0 replies; 6+ messages in thread
From: marius.c.vlad @ 2015-11-18 12:43 UTC (permalink / raw
  To: intel-gfx

From: Marius Vlad <marius.c.vlad@intel.com>

The power metter was not showing up due to a check over I915_PERF_ENERGY.
ENOENT is returned when I915_PERF_ENERGY is not available, and we use
that for relaying on debugfs i915_energy_uJ.

Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
---
 overlay/power.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/overlay/power.c b/overlay/power.c
index 6c5c374..6873e7f 100644
--- a/overlay/power.c
+++ b/overlay/power.c
@@ -60,7 +60,7 @@ int power_init(struct power *power)
 	memset(power, 0, sizeof(*power));
 
 	power->fd = perf_open();
-	if (power->fd != -1)
+	if (power->fd != -ENOENT)
 		return 0;
 
 	sprintf(buf, "%s/i915_energy_uJ", debugfs_dri_path);
@@ -121,7 +121,7 @@ int power_update(struct power *power)
 	if (power->error)
 		return power->error;
 
-	if (power->fd != -1) {
+	if (power->fd != -ENOENT) {
 		uint64_t data[2];
 		int len;
 
-- 
2.6.2

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH i-g-t] overlay/intel-gpu-overlay Fix power consumption not being displayed
  2015-11-18 12:36 [PATCH i-g-t] overlay/intel-gpu-overlay Fix power consumption not being displayed Marius Vlad
@ 2015-11-18 12:44 ` Chris Wilson
  2015-11-18 12:50   ` Vlad, Marius C
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2015-11-18 12:44 UTC (permalink / raw
  To: Marius Vlad; +Cc: marius.vlad0, intel-gfx

On Wed, Nov 18, 2015 at 02:36:22PM +0200, Marius Vlad wrote:
> The power metter was not showing up due to a check over I915_PERF_ENERGY.
> ENOENT is returned when I915_PERF_ENERGY is not available, and we use
> that for relaying on debugfs i915_energy_uJ.
> 
> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
> ---
>  overlay/power.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/overlay/power.c b/overlay/power.c
> index 6c5c374..6873e7f 100644
> --- a/overlay/power.c
> +++ b/overlay/power.c
> @@ -60,7 +60,7 @@ int power_init(struct power *power)
>  	memset(power, 0, sizeof(*power));
>  
>  	power->fd = perf_open();
> -	if (power->fd != -1)
> +	if (power->fd != -ENOENT)

Nope. The bug is

diff --git a/overlay/power.c b/overlay/power.c
index 6c5c374..2f1521b 100644
--- a/overlay/power.c
+++ b/overlay/power.c
@@ -45,7 +45,7 @@ static int perf_open(void)
 
        attr.type = i915_type_id();
        if (attr.type == 0)
-               return -ENOENT;
+               return -1;
        attr.config = I915_PERF_ENERGY;
 
        attr.read_format = PERF_FORMAT_TOTAL_TIME_ENABLED;

and the more pressing concern is that we still don't have support for the
more accurate tracking from the kernel.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH i-g-t] overlay/intel-gpu-overlay Fix power consumption not being displayed
  2015-11-18 12:44 ` Chris Wilson
@ 2015-11-18 12:50   ` Vlad, Marius C
  2015-11-18 12:55     ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Vlad, Marius C @ 2015-11-18 12:50 UTC (permalink / raw
  To: Chris Wilson; +Cc: marius.vlad0@gmail.com, intel-gfx@lists.freedesktop.org

Just trying to figure out what we have currently. I can redo with with -1, if that's 
OK with you.

Out of curiosity noticed that I915_PERF_ENERGY is not available on my machine, 
is that related to i915_oa? (Haswell).

-----Original Message-----
From: Chris Wilson [mailto:chris@chris-wilson.co.uk] 
Sent: Wednesday, November 18, 2015 2:45 PM
To: Vlad, Marius C <marius.c.vlad@intel.com>
Cc: marius.vlad0@gmail.com; intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH i-g-t] overlay/intel-gpu-overlay Fix power consumption not being displayed

On Wed, Nov 18, 2015 at 02:36:22PM +0200, Marius Vlad wrote:
> The power metter was not showing up due to a check over I915_PERF_ENERGY.
> ENOENT is returned when I915_PERF_ENERGY is not available, and we use 
> that for relaying on debugfs i915_energy_uJ.
> 
> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
> ---
>  overlay/power.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/overlay/power.c b/overlay/power.c index 6c5c374..6873e7f 
> 100644
> --- a/overlay/power.c
> +++ b/overlay/power.c
> @@ -60,7 +60,7 @@ int power_init(struct power *power)
>  	memset(power, 0, sizeof(*power));
>  
>  	power->fd = perf_open();
> -	if (power->fd != -1)
> +	if (power->fd != -ENOENT)

Nope. The bug is

diff --git a/overlay/power.c b/overlay/power.c index 6c5c374..2f1521b 100644
--- a/overlay/power.c
+++ b/overlay/power.c
@@ -45,7 +45,7 @@ static int perf_open(void)
 
        attr.type = i915_type_id();
        if (attr.type == 0)
-               return -ENOENT;
+               return -1;
        attr.config = I915_PERF_ENERGY;
 
        attr.read_format = PERF_FORMAT_TOTAL_TIME_ENABLED;

and the more pressing concern is that we still don't have support for the more accurate tracking from the kernel.
-Chris

--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH i-g-t] overlay/intel-gpu-overlay Fix power consumption not being displayed
  2015-11-18 12:50   ` Vlad, Marius C
@ 2015-11-18 12:55     ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2015-11-18 12:55 UTC (permalink / raw
  To: Vlad, Marius C; +Cc: marius.vlad0@gmail.com, intel-gfx@lists.freedesktop.org

On Wed, Nov 18, 2015 at 12:50:10PM +0000, Vlad, Marius C wrote:
> Just trying to figure out what we have currently. I can redo with with -1, if that's 
> OK with you.

Already pushed.
 
> Out of curiosity noticed that I915_PERF_ENERGY is not available on my machine, 
> is that related to i915_oa? (Haswell).

Kind off (except that i915_oa itself doesn't try to implement the generic
load/client tracking).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-18 12:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 12:36 [PATCH i-g-t] overlay/intel-gpu-overlay Fix power consumption not being displayed Marius Vlad
2015-11-18 12:44 ` Chris Wilson
2015-11-18 12:50   ` Vlad, Marius C
2015-11-18 12:55     ` Chris Wilson
  -- strict thread matches above, loose matches on Subject: below --
2015-11-18 12:39 marius.c.vlad
2015-11-18 12:43 marius.c.vlad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).