Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Senna Tschudin <peter.senna@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Peter Senna Tschudin <peter.senna@linux.intel.com>,
	zbigniew.kempczynski@intel.com, kamil.konieczny@linux.intel.com
Subject: [PATCH v2 i-g-t] man/lsgpu: Add man page for lsgpu
Date: Sat, 29 Mar 2025 15:36:06 +0100	[thread overview]
Message-ID: <20250329143607.33723-1-peter.senna@linux.intel.com> (raw)

Add man page for lsgpu.

Cc: zbigniew.kempczynski@intel.com
Cc: kamil.konieczny@linux.intel.com
Closes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/172
Signed-off-by: Peter Senna Tschudin <peter.senna@linux.intel.com>
---

v2:
 - Adds a newline after the SPDX identifier line
 - Adds Zbigniew Kempczyński to Cc list

 man/lsgpu.rst   | 89 +++++++++++++++++++++++++++++++++++++++++++++++++
 man/meson.build |  1 +
 2 files changed, 90 insertions(+)
 create mode 100644 man/lsgpu.rst

diff --git a/man/lsgpu.rst b/man/lsgpu.rst
new file mode 100644
index 000000000..a6dbec918
--- /dev/null
+++ b/man/lsgpu.rst
@@ -0,0 +1,89 @@
+.. SPDX-License-Identifier: MIT
+
+=====
+lsgpu
+=====
+
+-------------------------------------------------------------
+List and inspect GPUs by scanning the PCI bus, DRM, and sysfs
+-------------------------------------------------------------
+.. include:: defs.rst
+:Author: IGT Developers <igt-dev@lists.freedesktop.org>
+:Date: 2025-03-27
+:Version: |PACKAGE_STRING|
+:Copyright: 2009,2011,2012,2016,2018,2019,2020,2023,2024,2025 Intel Corporation
+:Manual section: |MANUAL_SECTION|
+:Manual group: |MANUAL_GROUP|
+
+SYNOPSIS
+========
+
+**lsgpu** [*OPTIONS*]
+
+DESCRIPTION
+===========
+
+**lsgpu** is part of the **igt-gpu-tools** suite, and it is designed to assist in GPU enumeration and debugging. **lsgpu**  is a command-line tool for listing and inspecting GPUs available on the system. It scans the PCI bus, DRM subsystem, and sysfs to gather information about detected GPU devices and their properties.
+
+By default, **lsgpu** displays a list of GPUs along with basic details. The tool supports additional options to print detailed properties and sysfs attributes, apply filters to select specific devices, and verify access permissions to GPU nodes.
+
+Filtering can be performed using the -d or --device option, allowing users to match GPUs based on vendor, PCI attributes, or other criteria. When a filter is applied, only the first matching device is displayed.
+
+Additionally, **lsgpu** attempts to open the corresponding DRM device nodes (/dev/dri/cardX, /dev/dri/renderDX) to check for access permissions. It follows the IGT variable search order for selecting the target device:
+
+1. The **--device** option, if provided
+2. The **IGT_DEVICE** environment variable, if set
+3. The **.igtrc** configuration file (Common::Device setting), if neither of the above is specified
+
+OPTIONS
+=======
+
+-h, --help
+    Show help text.
+
+-n, --numeric
+    Print vendor/device as hex
+
+-c, --codename
+    Print codename instead pretty device name
+
+-s, --print-simple
+    Print simple (legacy) device details
+
+-p, --print-details
+    Print devices with details
+
+-P, --pci-scan
+    Print PCI GPU devices
+
+-v, --list-vendors
+    List recognized vendors
+
+-l, --list-filter-types
+    List registered device filters types
+
+-d, --device <filter>
+    Apply a device filter (e.g. 'pci:vendor=Intel,device=discrete,card=0'). Can be used multiple times.
+
+-V, --version
+    Print version information and exit
+
+Default print mode options
+--------------------------
+
+These options are only valid when using the default printout mode:
+
+--drm
+    Default: Print DRM filters for each device
+
+--sysfs
+    Print sysfs filters for each device
+
+--pci
+    Print PCI filters for each device
+
+
+REPORTING BUGS
+==============
+
+Report bugs on fd.o GitLab: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues
diff --git a/man/meson.build b/man/meson.build
index 00264a21f..5c976c5d0 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -17,6 +17,7 @@ manpages = [
 	'intel_upload_blit_large_map',
 	'intel_upload_blit_small',
 	'intel_vbt_decode',
+	'lsgpu',
 ]
 
 defs_rst = configure_file(input : 'defs.rst.in',
-- 
2.43.0


             reply	other threads:[~2025-03-29 14:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-29 14:36 Peter Senna Tschudin [this message]
2025-03-29 15:32 ` ✓ i915.CI.BAT: success for man/lsgpu: Add man page for lsgpu (rev2) Patchwork
2025-03-29 15:40 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-29 17:09 ` ✗ i915.CI.Full: failure " Patchwork
2025-03-31  8:44   ` Peter Senna Tschudin
2025-04-01 10:26     ` Ravali, JupallyX
2025-03-30  1:02 ` ✗ Xe.CI.Full: " Patchwork
2025-03-31  8:43   ` Peter Senna Tschudin
2025-03-31 14:22 ` [PATCH v2 i-g-t] man/lsgpu: Add man page for lsgpu Kamil Konieczny
2025-04-01 10:21 ` ✓ i915.CI.Full: success for man/lsgpu: Add man page for lsgpu (rev2) Patchwork
2025-04-01 12:37 ` [PATCH v2 i-g-t] man/lsgpu: Add man page for lsgpu Kamil Konieczny
2025-04-06 20:50 ` ✗ Xe.CI.Full: failure for man/lsgpu: Add man page for lsgpu (rev2) 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=20250329143607.33723-1-peter.senna@linux.intel.com \
    --to=peter.senna@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=zbigniew.kempczynski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox