[PATCH i-g-t] man/lsgpu: Add man page for lsgpu
Kamil Konieczny
kamil.konieczny at linux.intel.com
Fri Mar 28 14:28:21 UTC 2025
Hi Peter,
On 2025-03-27 at 12:06:16 +0100, Peter Senna Tschudin wrote:
> Adds a man page for lsgpu.
This looks good but it has an error seen in compilation
and later on with view. I checked it with:
meson -Dman=enabled build
ninja -C build
man/lsgpu.rst:2: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
man -l build/man/lsgpu*gz
Please fix it (see below) and send v2.
>
+cc Zbigniew
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski at intel.com>
> Cc: kamil.konieczny at linux.intel.com
> Closes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/172
> Signed-off-by: Peter Senna Tschudin <peter.senna at linux.intel.com>
> ---
> man/lsgpu.rst | 88 +++++++++++++++++++++++++++++++++++++++++++++++++
> man/meson.build | 1 +
> 2 files changed, 89 insertions(+)
> create mode 100644 man/lsgpu.rst
>
> diff --git a/man/lsgpu.rst b/man/lsgpu.rst
> new file mode 100644
> index 000000000..d67437fc3
> --- /dev/null
> +++ b/man/lsgpu.rst
> @@ -0,0 +1,88 @@
> +.. SPDX-License-Identifier: MIT
Add one empty line here, this should fix it.
Regards,
Kamil
PS. Please update your git to some recent version, 2.34.1 looks old
compared to 2.49.0
> +=====
> +lsgpu
> +=====
> +
> +-------------------------------------------------------------
> +List and inspect GPUs by scanning the PCI bus, DRM, and sysfs
> +-------------------------------------------------------------
> +.. include:: defs.rst
> +:Author: IGT Developers <igt-dev at 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.34.1
>
More information about the igt-dev
mailing list