Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tools/intel_reg: Fix mchbar register write
@ 2024-04-18 11:26 Ville Syrjala
  2024-04-18 11:44 ` Jani Nikula
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Ville Syrjala @ 2024-04-18 11:26 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

I somehow lost the write part of the mchbar register support.
Add it back so that we can also write mchbar registers without
having to remember the address of the mirror range.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tools/intel_reg.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index 6c37e14d127d..aae5a23956b9 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -586,6 +586,7 @@ static int write_register(struct config *config, struct reg *reg, uint32_t val)
 	}
 
 	switch (reg->port_desc.port) {
+	case PORT_MCHBAR_32:
 	case PORT_MMIO_32:
 		if (reg->engine) {
 			register_srm(config, reg, &val);
@@ -593,6 +594,7 @@ static int write_register(struct config *config, struct reg *reg, uint32_t val)
 			OUTREG(reg->mmio_offset + reg->addr, val);
 		}
 		break;
+	case PORT_MCHBAR_16:
 	case PORT_MMIO_16:
 		if (val > 0xffff) {
 			fprintf(stderr, "value 0x%08x out of range for port %s\n",
@@ -601,6 +603,7 @@ static int write_register(struct config *config, struct reg *reg, uint32_t val)
 		}
 		OUTREG16(reg->mmio_offset + reg->addr, val);
 		break;
+	case PORT_MCHBAR_8:
 	case PORT_MMIO_8:
 		if (val > 0xff) {
 			fprintf(stderr, "value 0x%08x out of range for port %s\n",
-- 
2.43.2


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

end of thread, other threads:[~2024-04-25 16:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-18 11:26 [PATCH i-g-t] tools/intel_reg: Fix mchbar register write Ville Syrjala
2024-04-18 11:44 ` Jani Nikula
2024-04-18 20:50 ` ✗ Fi.CI.BAT: failure for " Patchwork
2024-04-19 14:13   ` Kamil Konieczny
2024-04-25 11:07     ` Illipilli, TejasreeX
2024-04-18 21:07 ` ✓ CI.xeBAT: success " Patchwork
2024-04-25  9:57 ` ✓ Fi.CI.BAT: " Patchwork
2024-04-25 15:32 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-04-25 16:42   ` Kamil Konieczny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox