All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/xe: Don't expose device attributes for VFs
@ 2025-07-11 19:08 Raag Jadav
  2025-07-11 19:15 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Raag Jadav @ 2025-07-11 19:08 UTC (permalink / raw)
  To: lucas.demarchi, rodrigo.vivi
  Cc: intel-xe, michal.wajdeczko, matthew.d.roper, Raag Jadav

Commit a7f87deac229 ("drm/xe: Default auto_link_downgrade status to false")
tried to fix the side effect of xe_pcode_read() returning successfully
without valid data-out value when xe->info.skip_pcode is set. Since this
is true for IS_SRIOV_VF() cases, a much robust fix would be to not expose
device attributes for VFs, which covers wider pcode mailbox users.

Fixes: a7f87deac229 ("drm/xe: Default auto_link_downgrade status to false")
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
 drivers/gpu/drm/xe/xe_device_sysfs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_device_sysfs.c b/drivers/gpu/drm/xe/xe_device_sysfs.c
index e5fd0cd537bc..8250aa4620ee 100644
--- a/drivers/gpu/drm/xe/xe_device_sysfs.c
+++ b/drivers/gpu/drm/xe/xe_device_sysfs.c
@@ -259,8 +259,7 @@ auto_link_downgrade_status_show(struct device *dev, struct device_attribute *att
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
 	struct xe_device *xe = pdev_to_xe_device(pdev);
-	/* default the auto_link_downgrade status to 0 */
-	u32 val = 0;
+	u32 val;
 	int ret;
 
 	xe_pm_runtime_get(xe);
@@ -297,6 +296,9 @@ int xe_device_sysfs_init(struct xe_device *xe)
 	struct device *dev = xe->drm.dev;
 	int ret;
 
+	if (IS_SRIOV_VF(xe))
+		return 0;
+
 	if (xe->d3cold.capable) {
 		ret = sysfs_create_file(&dev->kobj, &dev_attr_vram_d3cold_threshold.attr);
 		if (ret)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-07-15  3:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11 19:08 [PATCH v1] drm/xe: Don't expose device attributes for VFs Raag Jadav
2025-07-11 19:15 ` ✓ CI.KUnit: success for " Patchwork
2025-07-11 20:07 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-11 20:49 ` [PATCH v1] " Summers, Stuart
2025-07-12  2:24   ` Raag Jadav
2025-07-14 15:30     ` Summers, Stuart
2025-07-15  3:55       ` Raag Jadav
2025-07-12  6:14 ` ✗ Xe.CI.Full: failure for " Patchwork

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.