Hi Janusz,

On 2026-02-05 at 15:51:55 +0100, Janusz Krzysztofik wrote:
> In a short listing, lsgpu prints a sysfs path of a PCI GPU parent as a
> local attribute of a DRM device.  However, if that's a discrete GPU and
> its associated PCIe upstream bridge port has been identified, no
> information on that bridge is listed among the GPU attributes.  Follow the
> pattern used with DRM devices and also show a PCI slot of the bridge port
> as a local attribute of the discrete GPU device.
> 
> Moreover, in both short and detailed listings, local attributes intended
> for providing device names of GPU associated DRM devices and the GPU
> codename are also printed as attributes of related PCIe upstream bridge
> port, however, the DRM device names are shown as (null), and the codename
> attribute provides raw vendor:device codes of the bridge itself.  Replace
> those with PCI slot and codename of the GPU device.
> 
> v4: Free already allocated numeric codename before replacing (Sebastian),
>   - visually separate bridge specific updates of attributes already
>     populated by find_or_add_igt_device from bridge specific attribute
>     assignments.
> v2: Allocate memory to local attributes of a bridge for safety (Sebastian),
>   - merge with a formerly separate patch "lib/igt_device_scan: Don't print
>     bridge not applicable attributes" (Sebastian),
>   - no need for DEVTYPE_BRIDGE, just skip attributes if NULL.
> 
> Cc: Sebastian Brzezinka <[email protected]>
> Signed-off-by: Janusz Krzysztofik <[email protected]>
> ---

Reviewed-by: Krzysztof Karas <[email protected]>

-- 
Best Regards,
Krzysztof

Reply via email to