[Intel-xe] [PATCH] drm/xe/xe-pci: print a message when probing a device
Lucas De Marchi
lucas.demarchi at intel.com
Mon Mar 20 17:05:35 UTC 2023
On Wed, Mar 15, 2023 at 10:38:55AM +0100, Mauro Carvalho Chehab wrote:
>From: Mauro Carvalho Chehab <mchehab at kernel.org>
>
>On devices with multiple GPUs, like:
>
> GPU device: ADLS, PCI ID: 8086:4680
> GPU device: DG2 (DG2_G12), PCI ID: 8086:56a3
>
>Using force_probe parameter with a value different than "*" gives
>a warning for the other GPU, like:
>
>[ 448.991536] xe 0000:00:02.0: Your graphics device 4680 is not officially supported
> by xe driver in this kernel version. To force Xe probe,
> use xe.force_probe='4680' and i915.force_probe='!4680'
> module parameters or CONFIG_DRM_XE_FORCE_PROBE='4680' and
> CONFIG_DRM_I915_FORCE_PROBE='!4680' configuration options.
>
>This is confusing, as the subsequent messages refer to the
>other probe attempt:
>
> [ 448.991843] xe 0000:03:00.0: vgaarb: deactivate vga console
> [ 449.007744] GT topology dss mask (geometry): 00000000,00ffff00
> [ 449.007750] GT topology dss mask (compute): 00000000,00ffff00
> [ 449.007752] GT topology EU mask per DSS: 0000ffff
> [ 449.008846] xe 0000:03:00.0: [drm] vram_size: 0x180000000 usable_size: 0x17c800000
> [ 449.008880] xe 0000:03:00.0: BAR 2: releasing [mem 0x6000000000-0x600fffffff 64bit pref]
>
>Ok, one might infere from the PCI bus that it is for a different
>card, but it is better to state so, as it helps debugging
>issues and to check if the probe was really to the expected device.
>
>So, prints the PCI ID of the GPU it will be about to probe.
>
>Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
>---
> drivers/gpu/drm/xe/xe_pci.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>index c4d9fd2e7b2b..5aa594e92ff0 100644
>--- a/drivers/gpu/drm/xe/xe_pci.c
>+++ b/drivers/gpu/drm/xe/xe_pci.c
>@@ -394,6 +394,9 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> return -ENODEV;
> }
>
>+ dev_info(&pdev->dev, "Probing device [%04x:%04x].\n",
>+ pdev->vendor, pdev->device);
I think info would be too much. A debug is ok. Most of the drivers in
the kernel don't print anything about when probe is happening.
With a change to dev_dbg():
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
Btw as we move more things to rely on async probe (se e.g.
-EPROBE_DEFER in xe_display.c) the order of the messages
for different devices may not be something to rely on.
Lucas De Marchi
More information about the Intel-xe
mailing list