All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v1 2/2] tools/intel_reg: Create default accelerator access
Date: Wed, 17 Jun 2026 15:09:53 -0700	[thread overview]
Message-ID: <874ij0q0ni.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20260617202600.251889-3-kamil.konieczny@linux.intel.com>

On Wed, 17 Jun 2026 13:25:58 -0700, Kamil Konieczny 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);
> +			}
> +
> +			if (!config.pci_dev) {
> +				fprintf(stderr, "Cannot find Intel GPU nor accelerator device\n");
> +				return EXIT_FAILURE;
> +			}

So what I am not following is why you want to preserve
intel_get_pci_device() to just display class devices? In
https://patchwork.freedesktop.org/series/168385/ intel_get_pci_device() is
extended to both display and acceleretor class devices. So this kind of
modification to the individual tools is not needed at all.

Note that it is not just intel_reg. Similar modification will need to all
tools which currently call intel_get_pci_device(). They will now all have
to be changed to add the intel_get_pci_accelerator_device() calls,
something which is not needed with
https://patchwork.freedesktop.org/series/168385/ (especially rev1 of that
series). Because we would want most of these tools to "just work" with any
intel device (display or accelerator).

See also my comments here:
https://lore.kernel.org/igt-dev/87wlvyzbn0.wl-ashutosh.dixit@intel.com/

Anyway, let's see what other reviewers have to say about this.

Thanks.
--
Ashutosh

>		}
>
>		config.devid = config.pci_dev->device_id;
> --
> 2.54.0
>

  reply	other threads:[~2026-06-17 22:10 UTC|newest]

Thread overview: 7+ 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 [this message]
2026-06-18  5:50   ` Jani Nikula
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

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=874ij0q0ni.wl-ashutosh.dixit@intel.com \
    --to=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.