All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niels Penneman <niels at penneman.org>
To: powertop@lists.01.org
Subject: [Powertop] Intel GPU statistics on multi-GPU systems
Date: Thu, 04 Jul 2013 09:47:08 +0200	[thread overview]
Message-ID: <51D5287C.1090503@penneman.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

Hi all,

Currently powertop tries to find Intel GPU statistics in sysfs with a
hardcoded path; in src/cpu/cpu.cpp:353-354:

if (access("/sys/class/drm/card0/power/rc6_residency_ms", R_OK) == 0)
 handle_i965_gpu();

In systems with multiple GPUs it is not guaranteed that the Intel GPU is
labeled 'card0' in sysfs. In my system with both integrated Intel and
discrete AMD Radeon the Intel GPU is 'card1', and powertop will not
display GPU statistics.

One possible solution would be to scan all /sys/class/drm/card[0-9]+
folders and check the vendor & device IDs in 'device/vendor' and
'device/device'. Perhaps there is a better solution, e.g. by examining
the PCI device tree.


Regards,

-- 
Niels Penneman
Computer Systems Lab
Electronics and Information Systems Department
Ghent University


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

             reply	other threads:[~2013-07-04  7:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04  7:47 Niels Penneman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-07-04 18:33 [Powertop] Intel GPU statistics on multi-GPU systems Niels Penneman
2013-07-05 21:28 Sergey Senozhatsky
2013-07-08 10:09 Sergey Senozhatsky
2013-07-08 10:39 Sergey Senozhatsky
2013-07-08 10:55 Niels Penneman
2013-07-08 12:30 Niels Penneman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51D5287C.1090503@penneman.org \
    --to=powertop@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.