From: Raag Jadav <raag.jadav@intel.com>
To: Riana Tauro <riana.tauro@intel.com>
Cc: lucas.demarchi@intel.com, rodrigo.vivi@intel.com,
intel-xe@lists.freedesktop.org, anshuman.gupta@intel.com,
badal.nilawar@intel.com
Subject: Re: [PATCH v3 2/3] drm/xe: Expose PCIe Gen4 downspeed attributes
Date: Wed, 23 Apr 2025 11:48:39 +0300 [thread overview]
Message-ID: <aAipZ3pFfD_w7e2z@black.fi.intel.com> (raw)
In-Reply-To: <02d74b93-563e-4fab-a330-f05cf1898ca5@intel.com>
On Wed, Apr 23, 2025 at 10:55:30AM +0530, Riana Tauro wrote:
> Hi Raag
>
> On 4/17/2025 4:42 PM, Raag Jadav wrote:
> > Expose sysfs attributes for PCIe Gen4 downspeed capability and status.
> >
> > v2: Move from debugfs to sysfs (Lucas, Rodrigo, Badal)
> > Rework macros and their naming (Rodrigo)
> > v3: Use sysfs_create_files() (Riana)
> > Fix checkpatch warning (Riana)
> >
> > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_device.c | 5 ++
> > drivers/gpu/drm/xe/xe_device_sysfs.c | 101 +++++++++++++++++++++++++++
> > drivers/gpu/drm/xe/xe_device_sysfs.h | 1 +
> > drivers/gpu/drm/xe/xe_pcode_api.h | 5 ++
> > 4 files changed, 112 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> > index 6c9d3009aa03..79b7b0ecfbae 100644
> > --- a/drivers/gpu/drm/xe/xe_device.c
> > +++ b/drivers/gpu/drm/xe/xe_device.c
> > @@ -26,6 +26,7 @@
> > #include "xe_bo_evict.h"
> > #include "xe_debugfs.h"
> > #include "xe_devcoredump.h"
> > +#include "xe_device_sysfs.h"
> > #include "xe_dma_buf.h"
> > #include "xe_drm_client.h"
> > #include "xe_drv.h"
> > @@ -916,6 +917,10 @@ int xe_device_probe(struct xe_device *xe)
> > if (err)
> > goto err_unregister_display;
> > + err = xe_device_sysfs_init(xe);
> > + if (err)
> > + goto err_unregister_display;
> > +
> > xe_debugfs_register(xe);
> > err = xe_hwmon_register(xe);
> > diff --git a/drivers/gpu/drm/xe/xe_device_sysfs.c b/drivers/gpu/drm/xe/xe_device_sysfs.c
> > index 2d25e5b5d4bf..923612a0a2e0 100644
> > --- a/drivers/gpu/drm/xe/xe_device_sysfs.c
> > +++ b/drivers/gpu/drm/xe/xe_device_sysfs.c
> > @@ -11,6 +11,9 @@
> > #include "xe_device.h"
> > #include "xe_device_sysfs.h"
> > +#include "xe_mmio.h"
> > +#include "xe_pcode_api.h"
> > +#include "xe_pcode.h"
> > #include "xe_pm.h"
> > /**
> > @@ -81,3 +84,101 @@ int xe_pm_sysfs_init(struct xe_device *xe)
> > return devm_add_action_or_reset(dev, xe_pm_sysfs_fini, xe);
> > }
> > +
> > +/**
> > + * DOC: PCIe Gen5 Update Limitations
> > + *
> > + * Default link speed of discrete GPUs is determined by configuration
> > + * parameters stored in their flash memory, which are subject to override
> > + * through user initiated firmware updates. It has been observed that devices
> > + * configured with PCIe Gen5 as their default speed can come across link
> > + * quality issues due to host or motherboard limitations and may have to
> > + * auto-downspeed to PCIe Gen4 when faced with unstable link at Gen5, which
> > + * makes firmware updates rather risky on such setups. It is required to
> > + * ensure that the device is capable of auto-downspeeding to PCIe Gen4 link
> > + * before pushing the image with PCIe Gen5 as default configuration. This
> > + * can be done by reading ``pcie_gen4_downspeed_capable`` sysfs entry, which
> > + * will denote PCIe Gen4 downspeed capability of the device with boolean output
> > + * value of ``0`` or ``1``, meaning `incapable` or `capable` respectively.
> > + *
> > + * .. code-block:: shell
> > + *
> > + * $ cat /sys/bus/pci/devices/<bdf>/pcie_gen4_downspeed_capable
> > + *
> > + * Pushing PCIe Gen5 update on a downspeed incapable device and facing link
> > + * instability due to host or motherboard limitations can result in driver
> > + * failing to bind to the device, making further firmware updates impossible
> > + * with RMA being the only last resort.
> > + *
> > + * PCIe Gen4 downspeed status of downspeed capable devices is available through
> > + * ``pcie_gen4_downspeed_status`` sysfs entry with boolean output value of
> > + * ``0`` or ``1``, where ``0`` means no auto-downspeeding was required during
> > + * link training (which is the optimal scenario) and ``1`` means the device
> > + * has auto-downsped to PCIe Gen4 due to unstable Gen5 link.
> > + *
> > + * .. code-block:: shell
> > + *
> > + * $ cat /sys/bus/pci/devices/<bdf>/pcie_gen4_downspeed_status
> The code looks good. But i am not sure of the word downspeed.
> Couldn't find downspeed used in Pcie generation context. For link,
> it is mentioned as 'link downgrade'
>
> Could you share if you found any?
Since we're describing both firmware and PCI link in the same document,
1. It helps distinguish between them.
2. This information is for the end user and has to be translatable enough
regardless of what spec says about it and the distinction reduces the
chances of misinterpretation.
Raag
next prev parent reply other threads:[~2025-04-23 8:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 11:12 [PATCH v3 0/3] BMG PCIe Gen4 downspeed attributes and usage Raag Jadav
2025-04-17 11:12 ` [PATCH v3 1/3] drm/xe: s/xe_device_sysfs_init/xe_pm_sysfs_init Raag Jadav
2025-04-17 11:39 ` Riana Tauro
2025-04-17 11:12 ` [PATCH v3 2/3] drm/xe: Expose PCIe Gen4 downspeed attributes Raag Jadav
2025-04-23 5:25 ` Riana Tauro
2025-04-23 8:48 ` Raag Jadav [this message]
2025-04-23 9:59 ` Riana Tauro
2025-04-23 11:02 ` Raag Jadav
2025-04-23 13:35 ` Lucas De Marchi
2025-04-23 15:01 ` Raag Jadav
2025-04-23 15:26 ` Lucas De Marchi
2025-04-23 15:55 ` Vivi, Rodrigo
2025-04-23 16:41 ` Raag Jadav
2025-04-23 18:48 ` Vivi, Rodrigo
2025-04-17 11:12 ` [PATCH v3 3/3] drm/xe/doc: Wire up PCIe Gen5 update limitations Raag Jadav
2025-04-17 14:12 ` ✓ CI.Patch_applied: success for BMG PCIe Gen4 downspeed attributes and usage Patchwork
2025-04-17 14:13 ` ✓ CI.checkpatch: " Patchwork
2025-04-17 14:14 ` ✓ CI.KUnit: " Patchwork
2025-04-17 14:22 ` ✓ CI.Build: " Patchwork
2025-04-17 14:25 ` ✓ CI.Hooks: " Patchwork
2025-04-17 14:26 ` ✓ CI.checksparse: " Patchwork
2025-04-17 15:34 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-04-18 8:06 ` ✗ Xe.CI.Full: " 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=aAipZ3pFfD_w7e2z@black.fi.intel.com \
--to=raag.jadav@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.