All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH v2 1/2] drm/xe: add skip_pcode flag
@ 2023-10-22 15:57 Koby Elbaz
  2023-10-22 15:57 ` [Intel-xe] [PATCH v2 2/2] drm/xe: rename bypass_mtcfg to skip_mtcfg Koby Elbaz
                   ` (18 more replies)
  0 siblings, 19 replies; 24+ messages in thread
From: Koby Elbaz @ 2023-10-22 15:57 UTC (permalink / raw)
  To: intel-xe

Per device, set this flag to enable access to the PCODE uC or to skip it.

Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
---
Changes in v2:
- Added the flag 'skip_pcode' instead of 'has_pcode'

 drivers/gpu/drm/xe/xe_device_types.h | 2 ++
 drivers/gpu/drm/xe/xe_pci.c          | 2 ++
 drivers/gpu/drm/xe/xe_pcode.c        | 9 +++++++++
 3 files changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index 44d622d4cc3a..29199671d9e8 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -257,6 +257,8 @@ struct xe_device {
 		u8 enable_display:1;
 		/** @bypass_mtcfg: Bypass Multi-Tile configuration from MTCFG register */
 		u8 bypass_mtcfg:1;
+		/** @skip_pcode: skip access to PCODE uC */
+		u8 skip_pcode:1;
 		/** @supports_mmio_ext: supports MMIO extension/s */
 		u8 supports_mmio_ext:1;
 		/** @has_heci_gscfi: device has heci gscfi */
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 2fae45b9d88e..05b0aa9f2ab7 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -61,6 +61,7 @@ struct xe_device_desc {
 
 	u8 has_llc:1;
 	u8 bypass_mtcfg:1;
+	u8 skip_pcode:1;
 	u8 supports_mmio_ext:1;
 };
 
@@ -578,6 +579,7 @@ static int xe_info_init(struct xe_device *xe,
 	xe->info.media_name = media_desc ? media_desc->name : "none";
 	xe->info.has_llc = desc->has_llc;
 	xe->info.bypass_mtcfg = desc->bypass_mtcfg;
+	xe->info.skip_pcode = desc->skip_pcode;
 	xe->info.supports_mmio_ext = desc->supports_mmio_ext;
 	xe->info.tile_mmio_ext_size = graphics_desc->tile_mmio_ext_size;
 
diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c
index 4a240acf7625..b324dc2a5deb 100644
--- a/drivers/gpu/drm/xe/xe_pcode.c
+++ b/drivers/gpu/drm/xe/xe_pcode.c
@@ -61,6 +61,9 @@ static int pcode_mailbox_rw(struct xe_gt *gt, u32 mbox, u32 *data0, u32 *data1,
 {
 	int err;
 
+	if (gt_to_xe(gt)->info.skip_pcode)
+		return 0;
+
 	lockdep_assert_held(&gt->pcode.lock);
 
 	if ((xe_mmio_read32(gt, PCODE_MAILBOX) & PCODE_READY) != 0)
@@ -249,6 +252,9 @@ int xe_pcode_init(struct xe_gt *gt)
 	int timeout_us = 180000000; /* 3 min */
 	int ret;
 
+	if (gt_to_xe(gt)->info.skip_pcode)
+		return 0;
+
 	if (!IS_DGFX(gt_to_xe(gt)))
 		return 0;
 
@@ -280,6 +286,9 @@ int xe_pcode_probe(struct xe_gt *gt)
 {
 	drmm_mutex_init(&gt_to_xe(gt)->drm, &gt->pcode.lock);
 
+	if (gt_to_xe(gt)->info.skip_pcode)
+		return 0;
+
 	if (!IS_DGFX(gt_to_xe(gt)))
 		return 0;
 
-- 
2.34.1


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

end of thread, other threads:[~2023-11-27 17:43 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-22 15:57 [Intel-xe] [PATCH v2 1/2] drm/xe: add skip_pcode flag Koby Elbaz
2023-10-22 15:57 ` [Intel-xe] [PATCH v2 2/2] drm/xe: rename bypass_mtcfg to skip_mtcfg Koby Elbaz
2023-11-13 13:54   ` Rodrigo Vivi
2023-10-24  7:00 ` [Intel-xe] ✗ CI.Patch_applied: failure for series starting with [v2,1/2] drm/xe: add skip_pcode flag Patchwork
2023-10-24 10:40 ` [Intel-xe] [PATCH v2 1/2] " Jani Nikula
2023-10-24 16:55   ` Koby Elbaz
2023-10-24 17:15   ` Lucas De Marchi
2023-11-13 13:53     ` Rodrigo Vivi
2023-11-14 18:58 ` [Intel-xe] ✓ CI.Patch_applied: success for series starting with [v2,1/2] drm/xe: add skip_pcode flag (rev2) Patchwork
2023-11-14 18:58 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-11-14 18:59 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-11-14 19:07 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-11-14 19:07 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-11-14 19:08 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-11-14 19:44 ` [Intel-xe] ✗ CI.BAT: failure " Patchwork
2023-11-20 16:08 ` [Intel-xe] ✗ CI.Patch_applied: failure for series starting with [v2,1/2] drm/xe: add skip_pcode flag (rev3) Patchwork
2023-11-21 22:06 ` [Intel-xe] ✓ CI.Patch_applied: success for series starting with [v2,1/2] drm/xe: add skip_pcode flag (rev4) Patchwork
2023-11-21 22:06 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-11-21 22:08 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-11-21 22:15 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-11-21 22:15 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-11-21 22:17 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-11-21 22:46 ` [Intel-xe] ✗ CI.BAT: failure " Patchwork
2023-11-27 17:43 ` [Intel-xe] ✗ CI.Patch_applied: failure for series starting with [v2,1/2] drm/xe: add skip_pcode flag (rev5) 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.