From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB23ECD98E4 for ; Wed, 17 Jun 2026 22:10:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A85310E334; Wed, 17 Jun 2026 22:10:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JmcoDOwI"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6050310E359 for ; Wed, 17 Jun 2026 22:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781734199; x=1813270199; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=uOPa0zTURlEeZ9wIpvk8lXIQgIXgcAolen7aaq8X8Ak=; b=JmcoDOwIWvYDzK2TbnHbaFTdY2wo4bQZVhS97DtTEzkra4IhPLgtnZkC suuTZScPSkP9C+VQTjsUAB2vPcpw1JXKdxSEGlZUFmYwJgxakvvaGMsrz 0gPJ5KtbxpSkqIz6Uekp0YisHWpTXum9vNZeuh2ub4jn3xPCvAmTqaGHF 0C3+oaW8Jf/Ydqd+Pw03uHndulWqIlVl8mXtjP24Z4vRDGLUbd0DVUVex 0+3DoRnR4mNRs1qTQjHeDJzGy61XwVpuxIlTaXPdG2mI0cp/6ZqVFT7Uv rP8vrUEtHrnpx6r5b7BZaBGTriDyEqeqoKF0K85Md0qPZh534GGWgPL4s w==; X-CSE-ConnectionGUID: t/7UdRH5RtOCAK7TJUrEAw== X-CSE-MsgGUID: KrVkcQi2STiwSWyn1BP0QQ== X-IronPort-AV: E=McAfee;i="6800,10657,11820"; a="82605397" X-IronPort-AV: E=Sophos;i="6.24,210,1774335600"; d="scan'208";a="82605397" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2026 15:09:58 -0700 X-CSE-ConnectionGUID: LYrnFfBuRfKF1wKOFGeSyQ== X-CSE-MsgGUID: JVmH6H/GQJKOXqPA69sINQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,210,1774335600"; d="scan'208";a="253163511" Received: from unknown (HELO adixit-MOBL3.intel.com) ([10.241.243.42]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2026 15:09:57 -0700 Date: Wed, 17 Jun 2026 15:09:53 -0700 Message-ID: <874ij0q0ni.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Kamil Konieczny Cc: Subject: Re: [PATCH i-g-t v1 2/2] tools/intel_reg: Create default accelerator access In-Reply-To: <20260617202600.251889-3-kamil.konieczny@linux.intel.com> References: <20260617202600.251889-1-kamil.konieczny@linux.intel.com> <20260617202600.251889-3-kamil.konieczny@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" 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 > Signed-off-by: Kamil Konieczny > --- > 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 >