From: Jani Nikula <jani.nikula@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
igt-dev@lists.freedesktop.org
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
Ashutosh Dixit <ashutosh.dixit@intel.com>
Subject: Re: [PATCH i-g-t v1 2/2] tools/intel_reg: Create default accelerator access
Date: Thu, 18 Jun 2026 08:50:13 +0300 [thread overview]
Message-ID: <1b4a7ea05916e95a5ec4416754cf988507ccc348@intel.com> (raw)
In-Reply-To: <20260617202600.251889-3-kamil.konieczny@linux.intel.com>
On Wed, 17 Jun 2026, Kamil Konieczny <kamil.konieczny@linux.intel.com> wrote:
> Among computing devices there are GPU and accelerators and the
> intel_reg tool worked only with former ones. Create new way for
> finding a compute device and when no Intel GPU is found, then
> search for Intel accelerator. Also, inform user about which type
> of device will be accessed.
>
> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> ---
> tools/intel_reg.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/tools/intel_reg.c b/tools/intel_reg.c
> index 49afe91c0..b4f8cd0fd 100644
> --- a/tools/intel_reg.c
> +++ b/tools/intel_reg.c
> @@ -1382,6 +1382,18 @@ int main(int argc, char *argv[])
> return EXIT_FAILURE;
> } else {
> config.pci_dev = intel_get_pci_device();
> + if (config.pci_dev) {
> + fprintf(stderr, "Found Intel GPU PCI device 0x%x\n", config.pci_dev->device_id);
> + } else {
> + config.pci_dev = intel_get_pci_accelerator_device();
> + if (config.pci_dev)
> + fprintf(stderr, "Found Intel accelerator PCI device 0x%x\n", config.pci_dev->device_id);
> + }
Please don't print anything on success. It's a distraction.
BR,
Jani.
> +
> + if (!config.pci_dev) {
> + fprintf(stderr, "Cannot find Intel GPU nor accelerator device\n");
> + return EXIT_FAILURE;
> + }
> }
>
> config.devid = config.pci_dev->device_id;
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-06-18 5:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 20:25 [PATCH i-g-t v1 0/2] Allow intel_reg tool to work also with accelerators Kamil Konieczny
2026-06-17 20:25 ` [PATCH i-g-t v1 1/2] lib/intel_chipset: Create intel_get_pci_accelerator_device() function Kamil Konieczny
2026-06-17 20:25 ` [PATCH i-g-t v1 2/2] tools/intel_reg: Create default accelerator access Kamil Konieczny
2026-06-17 22:09 ` Dixit, Ashutosh
2026-06-18 5:50 ` Jani Nikula [this message]
2026-06-17 22:14 ` ✓ Xe.CI.BAT: success for Allow intel_reg tool to work also with accelerators Patchwork
2026-06-17 22:29 ` ✓ i915.CI.BAT: " Patchwork
2026-06-18 7:46 ` ✗ Xe.CI.FULL: failure " Patchwork
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=1b4a7ea05916e95a5ec4416754cf988507ccc348@intel.com \
--to=jani.nikula@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
/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.