Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/2] iosys-map: Add per-word read
@ 2022-06-17  8:52 Lucas De Marchi
  2022-06-17  8:52 ` [Intel-gfx] [PATCH 2/2] iosys-map: Add per-word write Lucas De Marchi
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Lucas De Marchi @ 2022-06-17  8:52 UTC (permalink / raw)
  To: intel-gfx, dri-devel
  Cc: Daniel Vetter, Lucas De Marchi, christian.koenig, tzimmermann

Instead of always falling back to memcpy_fromio() for any size, prefer
using read{b,w,l}(). When reading struct members it's common to read
individual integer variables individually. Going through memcpy_fromio()
for each of them poses a high penalty.

Employ a similar trick as __seqprop() by using _Generic() to generate
only the specific call based on a type-compatible variable.

For a pariticular i915 workload producing GPU context switches,
__get_engine_usage_record() is particularly hot since the engine usage
is read from device local memory with dgfx, possibly multiple times
since it's racy. Test execution time for this test shows a ~12.5%
improvement with DG2:

Before:
	nrepeats = 1000; min = 7.63243e+06; max = 1.01817e+07;
	median = 9.52548e+06; var = 526149;
After:
	nrepeats = 1000; min = 7.03402e+06; max = 8.8832e+06;
	median = 8.33955e+06; var = 333113;

Other things attempted that didn't prove very useful:
1) Change the _Generic() on x86 to just dereference the memory address
2) Change __get_engine_usage_record() to do just 1 read per loop,
   comparing with the previous value read
3) Change __get_engine_usage_record() to access the fields directly as it
   was before the conversion to iosys-map

(3) did gave a small improvement (~3%), but doesn't seem to scale well
to other similar cases in the driver.

Additional test by Chris Wilson using gem_create from igt with some
changes to track object creation time. This happens to accidentally
stress this code path:

	Pre iosys_map conversion of engine busyness:
	lmem0: Creating    262144 4KiB objects took 59274.2ms

	Unpatched:
	lmem0: Creating    262144 4KiB objects took 108830.2ms

	With readl (this patch):
	lmem0: Creating    262144 4KiB objects took 61348.6ms

	s/readl/READ_ONCE/
	lmem0: Creating    262144 4KiB objects took 61333.2ms

So we do take a little bit more time than before the conversion, but
that is due to other factors: bringing the READ_ONCE back would be as
good as just doing this conversion.

v2:
- Remove default from _Generic() - callers wanting to read more
  than u64 should use iosys_map_memcpy_from()
- Add READ_ONCE() cases dereferencing the pointer when using system
  memory

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com> # v1
---
 include/linux/iosys-map.h | 45 +++++++++++++++++++++++++++++++--------
 1 file changed, 36 insertions(+), 9 deletions(-)

diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
index 4b8406ee8bc4..f59dd00ed202 100644
--- a/include/linux/iosys-map.h
+++ b/include/linux/iosys-map.h
@@ -6,6 +6,7 @@
 #ifndef __IOSYS_MAP_H__
 #define __IOSYS_MAP_H__
 
+#include <linux/compiler_types.h>
 #include <linux/io.h>
 #include <linux/string.h>
 
@@ -333,6 +334,26 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
 		memset(dst->vaddr + offset, value, len);
 }
 
+#ifdef CONFIG_64BIT
+#define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)				\
+	u64: val_ = readq(vaddr_iomem_)
+#else
+#define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)				\
+	u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
+#endif
+
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,		\
+	u8: val__ = readb(vaddr_iomem__),					\
+	u16: val__ = readw(vaddr_iomem__),					\
+	u32: val__ = readl(vaddr_iomem__),					\
+	__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
+
+#define __iosys_map_rd_sys(val__, vaddr__, type__) ({				\
+	compiletime_assert(sizeof(type__) <= sizeof(u64),			\
+			   "Unsupported access size for __iosys_map_rd_sys()");	\
+	val__ = READ_ONCE(*((type__ *)vaddr__));				\
+})
+
 /**
  * iosys_map_rd - Read a C-type value from the iosys_map
  *
@@ -340,16 +361,21 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
  * @offset__:	The offset from which to read
  * @type__:	Type of the value being read
  *
- * Read a C type value from iosys_map, handling possible un-aligned accesses to
- * the mapping.
+ * Read a C type value (u8, u16, u32 and u64) from iosys_map. For other types or
+ * if pointer may be unaligned (and problematic for the architecture supported),
+ * use iosys_map_memcpy_from().
  *
  * Returns:
  * The value read from the mapping.
  */
-#define iosys_map_rd(map__, offset__, type__) ({			\
-	type__ val;							\
-	iosys_map_memcpy_from(&val, map__, offset__, sizeof(val));	\
-	val;								\
+#define iosys_map_rd(map__, offset__, type__) ({				\
+	type__ val;								\
+	if ((map__)->is_iomem) {						\
+		__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
+	} else {								\
+		__iosys_map_rd_sys(val, (map__)->vaddr + (offset__), type__);	\
+	}									\
+	val;									\
 })
 
 /**
@@ -379,9 +405,10 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
  *
  * Read a value from iosys_map considering its layout is described by a C struct
  * starting at @struct_offset__. The field offset and size is calculated and its
- * value read handling possible un-aligned memory accesses. For example: suppose
- * there is a @struct foo defined as below and the value ``foo.field2.inner2``
- * needs to be read from the iosys_map:
+ * value read. If the field access would incur in un-aligned access, then either
+ * iosys_map_memcpy_from() needs to be used or the architecture must support it.
+ * For example: suppose there is a @struct foo defined as below and the value
+ * ``foo.field2.inner2`` needs to be read from the iosys_map:
  *
  * .. code-block:: c
  *
-- 
2.36.1


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

* [Intel-gfx] [PATCH 2/2] iosys-map: Add per-word write
  2022-06-17  8:52 [Intel-gfx] [PATCH 1/2] iosys-map: Add per-word read Lucas De Marchi
@ 2022-06-17  8:52 ` Lucas De Marchi
  2022-06-26 21:01   ` Lucas De Marchi
  2022-06-17 13:25 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] iosys-map: Add per-word read Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Lucas De Marchi @ 2022-06-17  8:52 UTC (permalink / raw)
  To: intel-gfx, dri-devel
  Cc: Daniel Vetter, Lucas De Marchi, christian.koenig, tzimmermann

Like was done for read, provide the equivalent for write. Even if
current users are not in the hot path, this should future-proof it.

v2:
  - Remove default from _Generic() - callers wanting to write more
    than u64 should use iosys_map_memcpy_to()
  - Add WRITE_ONCE() cases dereferencing the pointer when using system
    memory

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Reviewed-by: Christian König <christian.koenig@amd.com> # v1
---
 include/linux/iosys-map.h | 42 ++++++++++++++++++++++++++++++---------
 1 file changed, 33 insertions(+), 9 deletions(-)

diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
index f59dd00ed202..580e14cd360c 100644
--- a/include/linux/iosys-map.h
+++ b/include/linux/iosys-map.h
@@ -337,9 +337,13 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
 #ifdef CONFIG_64BIT
 #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)				\
 	u64: val_ = readq(vaddr_iomem_)
+#define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_)			\
+	u64: writeq(val_, vaddr_iomem_)
 #else
 #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)				\
 	u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
+#define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_)			\
+	u64: memcpy_toio(vaddr_iomem_, &(val_), sizeof(u64))
 #endif
 
 #define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,		\
@@ -354,6 +358,19 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
 	val__ = READ_ONCE(*((type__ *)vaddr__));				\
 })
 
+#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) _Generic(val__,		\
+	u8: writeb(val__, vaddr_iomem__),					\
+	u16: writew(val__, vaddr_iomem__),					\
+	u32: writel(val__, vaddr_iomem__),					\
+	__iosys_map_wr_io_u64_case(val__, vaddr_iomem__))
+
+#define __iosys_map_wr_sys(val__, vaddr__, type__) ({				\
+	compiletime_assert(sizeof(type__) <= sizeof(u64),			\
+			   "Unsupported access size for __iosys_map_wr_sys()"); \
+	WRITE_ONCE(*((type__ *)vaddr__), val__);				\
+})
+
+
 /**
  * iosys_map_rd - Read a C-type value from the iosys_map
  *
@@ -386,12 +403,17 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
  * @type__:	Type of the value being written
  * @val__:	Value to write
  *
- * Write a C-type value to the iosys_map, handling possible un-aligned accesses
- * to the mapping.
+ * Write a C type value (u8, u16, u32 and u64) to the iosys_map. For other types
+ * or if pointer may be unaligned (and problematic for the architecture
+ * supported), use iosys_map_memcpy_to()
  */
-#define iosys_map_wr(map__, offset__, type__, val__) ({			\
-	type__ val = (val__);						\
-	iosys_map_memcpy_to(map__, offset__, &val, sizeof(val));	\
+#define iosys_map_wr(map__, offset__, type__, val__) ({				\
+	type__ val = (val__);							\
+	if ((map__)->is_iomem) {						\
+		__iosys_map_wr_io(val, (map__)->vaddr_iomem + (offset__), type__);\
+	} else {								\
+		__iosys_map_wr_sys(val, (map__)->vaddr + (offset__), type__);	\
+	}									\
 })
 
 /**
@@ -472,10 +494,12 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
  * @field__:		Member of the struct to read
  * @val__:		Value to write
  *
- * Write a value to the iosys_map considering its layout is described by a C struct
- * starting at @struct_offset__. The field offset and size is calculated and the
- * @val__ is written handling possible un-aligned memory accesses. Refer to
- * iosys_map_rd_field() for expected usage and memory layout.
+ * Write a value to the iosys_map considering its layout is described by a C
+ * struct starting at @struct_offset__. The field offset and size is calculated
+ * and the @val__ is written. If the field access would incur in un-aligned
+ * access, then either iosys_map_memcpy_to() needs to be used or the
+ * architecture must support it. Refer to iosys_map_rd_field() for expected
+ * usage and memory layout.
  */
 #define iosys_map_wr_field(map__, struct_offset__, struct_type__, field__, val__) ({	\
 	struct_type__ *s;								\
-- 
2.36.1


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

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] iosys-map: Add per-word read
  2022-06-17  8:52 [Intel-gfx] [PATCH 1/2] iosys-map: Add per-word read Lucas De Marchi
  2022-06-17  8:52 ` [Intel-gfx] [PATCH 2/2] iosys-map: Add per-word write Lucas De Marchi
@ 2022-06-17 13:25 ` Patchwork
  2022-06-17 13:47 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2022-06-17 13:25 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] iosys-map: Add per-word read
URL   : https://patchwork.freedesktop.org/series/105273/
State : warning

== Summary ==

Error: dim checkpatch failed
59710fe2242f iosys-map: Add per-word read
-:87: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#87: FILE: include/linux/iosys-map.h:339:
+	u64: val_ = readq(vaddr_iomem_)
 	   ^

-:87: WARNING:INDENTED_LABEL: labels should not be indented
#87: FILE: include/linux/iosys-map.h:339:
+	u64: val_ = readq(vaddr_iomem_)

-:90: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#90: FILE: include/linux/iosys-map.h:342:
+	u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
 	   ^

-:90: WARNING:INDENTED_LABEL: labels should not be indented
#90: FILE: include/linux/iosys-map.h:342:
+	u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))

-:93: CHECK:CAMELCASE: Avoid CamelCase: <_Generic>
#93: FILE: include/linux/iosys-map.h:345:
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,		\

-:93: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'val__' - possible side-effects?
#93: FILE: include/linux/iosys-map.h:345:
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,		\
+	u8: val__ = readb(vaddr_iomem__),					\
+	u16: val__ = readw(vaddr_iomem__),					\
+	u32: val__ = readl(vaddr_iomem__),					\
+	__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))

-:93: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'vaddr_iomem__' - possible side-effects?
#93: FILE: include/linux/iosys-map.h:345:
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,		\
+	u8: val__ = readb(vaddr_iomem__),					\
+	u16: val__ = readw(vaddr_iomem__),					\
+	u32: val__ = readl(vaddr_iomem__),					\
+	__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))

-:94: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#94: FILE: include/linux/iosys-map.h:346:
+	u8: val__ = readb(vaddr_iomem__),					\
 	  ^

-:94: WARNING:INDENTED_LABEL: labels should not be indented
#94: FILE: include/linux/iosys-map.h:346:
+	u8: val__ = readb(vaddr_iomem__),					\

-:95: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#95: FILE: include/linux/iosys-map.h:347:
+	u16: val__ = readw(vaddr_iomem__),					\
 	   ^

-:95: WARNING:INDENTED_LABEL: labels should not be indented
#95: FILE: include/linux/iosys-map.h:347:
+	u16: val__ = readw(vaddr_iomem__),					\

-:96: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#96: FILE: include/linux/iosys-map.h:348:
+	u32: val__ = readl(vaddr_iomem__),					\
 	   ^

-:96: WARNING:INDENTED_LABEL: labels should not be indented
#96: FILE: include/linux/iosys-map.h:348:
+	u32: val__ = readl(vaddr_iomem__),					\

-:99: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'type__' may be better as '(type__)' to avoid precedence issues
#99: FILE: include/linux/iosys-map.h:351:
+#define __iosys_map_rd_sys(val__, vaddr__, type__) ({				\
+	compiletime_assert(sizeof(type__) <= sizeof(u64),			\
+			   "Unsupported access size for __iosys_map_rd_sys()");	\
+	val__ = READ_ONCE(*((type__ *)vaddr__));				\
+})

-:125: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'map__' - possible side-effects?
#125: FILE: include/linux/iosys-map.h:371:
+#define iosys_map_rd(map__, offset__, type__) ({				\
+	type__ val;								\
+	if ((map__)->is_iomem) {						\
+		__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
+	} else {								\
+		__iosys_map_rd_sys(val, (map__)->vaddr + (offset__), type__);	\
+	}									\
+	val;									\
 })

-:125: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'offset__' - possible side-effects?
#125: FILE: include/linux/iosys-map.h:371:
+#define iosys_map_rd(map__, offset__, type__) ({				\
+	type__ val;								\
+	if ((map__)->is_iomem) {						\
+		__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
+	} else {								\
+		__iosys_map_rd_sys(val, (map__)->vaddr + (offset__), type__);	\
+	}									\
+	val;									\
 })

-:125: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'type__' - possible side-effects?
#125: FILE: include/linux/iosys-map.h:371:
+#define iosys_map_rd(map__, offset__, type__) ({				\
+	type__ val;								\
+	if ((map__)->is_iomem) {						\
+		__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
+	} else {								\
+		__iosys_map_rd_sys(val, (map__)->vaddr + (offset__), type__);	\
+	}									\
+	val;									\
 })

total: 5 errors, 5 warnings, 7 checks, 73 lines checked
c205cb395bbc iosys-map: Add per-word write
-:30: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#30: FILE: include/linux/iosys-map.h:341:
+	u64: writeq(val_, vaddr_iomem_)
 	   ^

-:30: WARNING:INDENTED_LABEL: labels should not be indented
#30: FILE: include/linux/iosys-map.h:341:
+	u64: writeq(val_, vaddr_iomem_)

-:35: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#35: FILE: include/linux/iosys-map.h:346:
+	u64: memcpy_toio(vaddr_iomem_, &(val_), sizeof(u64))
 	   ^

-:35: WARNING:INDENTED_LABEL: labels should not be indented
#35: FILE: include/linux/iosys-map.h:346:
+	u64: memcpy_toio(vaddr_iomem_, &(val_), sizeof(u64))

-:43: CHECK:CAMELCASE: Avoid CamelCase: <_Generic>
#43: FILE: include/linux/iosys-map.h:361:
+#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) _Generic(val__,		\

-:43: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'val__' - possible side-effects?
#43: FILE: include/linux/iosys-map.h:361:
+#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) _Generic(val__,		\
+	u8: writeb(val__, vaddr_iomem__),					\
+	u16: writew(val__, vaddr_iomem__),					\
+	u32: writel(val__, vaddr_iomem__),					\
+	__iosys_map_wr_io_u64_case(val__, vaddr_iomem__))

-:43: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'vaddr_iomem__' - possible side-effects?
#43: FILE: include/linux/iosys-map.h:361:
+#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) _Generic(val__,		\
+	u8: writeb(val__, vaddr_iomem__),					\
+	u16: writew(val__, vaddr_iomem__),					\
+	u32: writel(val__, vaddr_iomem__),					\
+	__iosys_map_wr_io_u64_case(val__, vaddr_iomem__))

-:44: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#44: FILE: include/linux/iosys-map.h:362:
+	u8: writeb(val__, vaddr_iomem__),					\
 	  ^

-:44: WARNING:INDENTED_LABEL: labels should not be indented
#44: FILE: include/linux/iosys-map.h:362:
+	u8: writeb(val__, vaddr_iomem__),					\

-:45: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#45: FILE: include/linux/iosys-map.h:363:
+	u16: writew(val__, vaddr_iomem__),					\
 	   ^

-:45: WARNING:INDENTED_LABEL: labels should not be indented
#45: FILE: include/linux/iosys-map.h:363:
+	u16: writew(val__, vaddr_iomem__),					\

-:46: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#46: FILE: include/linux/iosys-map.h:364:
+	u32: writel(val__, vaddr_iomem__),					\
 	   ^

-:46: WARNING:INDENTED_LABEL: labels should not be indented
#46: FILE: include/linux/iosys-map.h:364:
+	u32: writel(val__, vaddr_iomem__),					\

-:49: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'type__' may be better as '(type__)' to avoid precedence issues
#49: FILE: include/linux/iosys-map.h:367:
+#define __iosys_map_wr_sys(val__, vaddr__, type__) ({				\
+	compiletime_assert(sizeof(type__) <= sizeof(u64),			\
+			   "Unsupported access size for __iosys_map_wr_sys()"); \
+	WRITE_ONCE(*((type__ *)vaddr__), val__);				\
+})

-:55: CHECK:LINE_SPACING: Please don't use multiple blank lines
#55: FILE: include/linux/iosys-map.h:373:
+
+

-:72: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'map__' - possible side-effects?
#72: FILE: include/linux/iosys-map.h:410:
+#define iosys_map_wr(map__, offset__, type__, val__) ({				\
+	type__ val = (val__);							\
+	if ((map__)->is_iomem) {						\
+		__iosys_map_wr_io(val, (map__)->vaddr_iomem + (offset__), type__);\
+	} else {								\
+		__iosys_map_wr_sys(val, (map__)->vaddr + (offset__), type__);	\
+	}									\
 })

-:72: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'offset__' - possible side-effects?
#72: FILE: include/linux/iosys-map.h:410:
+#define iosys_map_wr(map__, offset__, type__, val__) ({				\
+	type__ val = (val__);							\
+	if ((map__)->is_iomem) {						\
+		__iosys_map_wr_io(val, (map__)->vaddr_iomem + (offset__), type__);\
+	} else {								\
+		__iosys_map_wr_sys(val, (map__)->vaddr + (offset__), type__);	\
+	}									\
 })

-:72: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'type__' - possible side-effects?
#72: FILE: include/linux/iosys-map.h:410:
+#define iosys_map_wr(map__, offset__, type__, val__) ({				\
+	type__ val = (val__);							\
+	if ((map__)->is_iomem) {						\
+		__iosys_map_wr_io(val, (map__)->vaddr_iomem + (offset__), type__);\
+	} else {								\
+		__iosys_map_wr_sys(val, (map__)->vaddr + (offset__), type__);	\
+	}									\
 })

total: 5 errors, 5 warnings, 8 checks, 70 lines checked



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

* [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] iosys-map: Add per-word read
  2022-06-17  8:52 [Intel-gfx] [PATCH 1/2] iosys-map: Add per-word read Lucas De Marchi
  2022-06-17  8:52 ` [Intel-gfx] [PATCH 2/2] iosys-map: Add per-word write Lucas De Marchi
  2022-06-17 13:25 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] iosys-map: Add per-word read Patchwork
@ 2022-06-17 13:47 ` Patchwork
  2022-06-17 15:56 ` [Intel-gfx] [PATCH 1/2] " Lucas De Marchi
  2022-06-17 21:24 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/2] " Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2022-06-17 13:47 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 11257 bytes --]

== Series Details ==

Series: series starting with [1/2] iosys-map: Add per-word read
URL   : https://patchwork.freedesktop.org/series/105273/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11775 -> Patchwork_105273v1
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/index.html

Participating hosts (32 -> 35)
------------------------------

  Additional (4): fi-kbl-soraka fi-icl-u2 fi-tgl-dsi fi-pnv-d510 
  Missing    (1): fi-bdw-samus 

Known issues
------------

  Here are the changes found in Patchwork_105273v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_huc_copy@huc-copy:
    - fi-icl-u2:          NOTRUN -> [SKIP][1] ([i915#2190])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-icl-u2/igt@gem_huc_copy@huc-copy.html
    - fi-kbl-soraka:      NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#2190])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@basic:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#4613]) +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html

  * igt@gem_lmem_swapping@random-engines:
    - fi-icl-u2:          NOTRUN -> [SKIP][4] ([i915#4613]) +3 similar issues
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-icl-u2/igt@gem_lmem_swapping@random-engines.html

  * igt@i915_selftest@live@execlists:
    - fi-bsw-n3050:       [PASS][5] -> [INCOMPLETE][6] ([i915#5847])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/fi-bsw-n3050/igt@i915_selftest@live@execlists.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-bsw-n3050/igt@i915_selftest@live@execlists.html

  * igt@i915_selftest@live@gem:
    - fi-pnv-d510:        NOTRUN -> [DMESG-FAIL][7] ([i915#4528])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-pnv-d510/igt@i915_selftest@live@gem.html

  * igt@i915_selftest@live@gt_pm:
    - fi-kbl-soraka:      NOTRUN -> [DMESG-FAIL][8] ([i915#1886])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

  * igt@i915_selftest@live@hangcheck:
    - fi-hsw-4770:        [PASS][9] -> [INCOMPLETE][10] ([i915#4785])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html

  * igt@i915_suspend@basic-s3-without-i915:
    - fi-icl-u2:          NOTRUN -> [SKIP][11] ([i915#5903])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-icl-u2/igt@i915_suspend@basic-s3-without-i915.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-icl-u2:          NOTRUN -> [SKIP][12] ([fdo#111827]) +8 similar issues
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html
    - fi-kbl-soraka:      NOTRUN -> [SKIP][13] ([fdo#109271] / [fdo#111827]) +7 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-kbl-soraka/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][14] ([fdo#109271]) +9 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-kbl-soraka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-icl-u2:          NOTRUN -> [SKIP][15] ([fdo#109278] / [i915#4103]) +1 similar issue
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
    - fi-tgl-u2:          [PASS][16] -> [DMESG-WARN][17] ([i915#402])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/fi-tgl-u2/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-tgl-u2/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html

  * igt@kms_force_connector_basic@force-connector-state:
    - fi-icl-u2:          NOTRUN -> [WARN][18] ([i915#6008])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-icl-u2/igt@kms_force_connector_basic@force-connector-state.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-icl-u2:          NOTRUN -> [SKIP][19] ([fdo#109285])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-icl-u2/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - fi-icl-u2:          NOTRUN -> [SKIP][20] ([fdo#109278])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-icl-u2/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html
    - fi-kbl-soraka:      NOTRUN -> [SKIP][21] ([fdo#109271] / [i915#533])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-kbl-soraka/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_psr@primary_page_flip:
    - fi-pnv-d510:        NOTRUN -> [SKIP][22] ([fdo#109271]) +39 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-pnv-d510/igt@kms_psr@primary_page_flip.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - fi-icl-u2:          NOTRUN -> [SKIP][23] ([i915#3555])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-icl-u2/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-userptr:
    - fi-icl-u2:          NOTRUN -> [SKIP][24] ([fdo#109295] / [i915#3301])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-icl-u2/igt@prime_vgem@basic-userptr.html

  * igt@runner@aborted:
    - fi-hsw-4770:        NOTRUN -> [FAIL][25] ([fdo#109271] / [i915#4312] / [i915#5594])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-hsw-4770/igt@runner@aborted.html
    - fi-kbl-guc:         NOTRUN -> [FAIL][26] ([i915#4312] / [i915#5257])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-kbl-guc/igt@runner@aborted.html
    - fi-bsw-n3050:       NOTRUN -> [FAIL][27] ([fdo#109271] / [i915#3428] / [i915#4312])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-bsw-n3050/igt@runner@aborted.html
    - fi-pnv-d510:        NOTRUN -> [FAIL][28] ([fdo#109271] / [i915#2403] / [i915#4312])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-pnv-d510/igt@runner@aborted.html
    - fi-rkl-guc:         NOTRUN -> [FAIL][29] ([i915#4312])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-rkl-guc/igt@runner@aborted.html
    - fi-skl-guc:         NOTRUN -> [FAIL][30] ([i915#4312] / [i915#5257])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-skl-guc/igt@runner@aborted.html
    - fi-adl-ddr5:        NOTRUN -> [FAIL][31] ([i915#4312])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-adl-ddr5/igt@runner@aborted.html
    - fi-cfl-guc:         NOTRUN -> [FAIL][32] ([i915#4312] / [i915#5257])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-cfl-guc/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@i915_pm_rpm@module-reload:
    - fi-bsw-n3050:       [FAIL][33] ([i915#6042]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/fi-bsw-n3050/igt@i915_pm_rpm@module-reload.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-bsw-n3050/igt@i915_pm_rpm@module-reload.html

  * igt@kms_flip@basic-flip-vs-dpms@a-edp1:
    - fi-tgl-u2:          [DMESG-WARN][35] ([i915#402]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/fi-tgl-u2/igt@kms_flip@basic-flip-vs-dpms@a-edp1.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-tgl-u2/igt@kms_flip@basic-flip-vs-dpms@a-edp1.html

  
#### Warnings ####

  * igt@runner@aborted:
    - fi-apl-guc:         [FAIL][37] ([i915#4312]) -> [FAIL][38] ([i915#4312] / [i915#5257])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/fi-apl-guc/igt@runner@aborted.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/fi-apl-guc/igt@runner@aborted.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1759]: https://gitlab.freedesktop.org/drm/intel/issues/1759
  [i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2373]: https://gitlab.freedesktop.org/drm/intel/issues/2373
  [i915#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3428]: https://gitlab.freedesktop.org/drm/intel/issues/3428
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
  [i915#5257]: https://gitlab.freedesktop.org/drm/intel/issues/5257
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5594]: https://gitlab.freedesktop.org/drm/intel/issues/5594
  [i915#5847]: https://gitlab.freedesktop.org/drm/intel/issues/5847
  [i915#5903]: https://gitlab.freedesktop.org/drm/intel/issues/5903
  [i915#6008]: https://gitlab.freedesktop.org/drm/intel/issues/6008
  [i915#6042]: https://gitlab.freedesktop.org/drm/intel/issues/6042


Build changes
-------------

  * Linux: CI_DRM_11775 -> Patchwork_105273v1

  CI-20190529: 20190529
  CI_DRM_11775: 93bea5a783b94aa5336606ddee482f659ccd9804 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6534: 6137099c021e26b8593ddd832d6e3b3d3bc3b1d0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_105273v1: 93bea5a783b94aa5336606ddee482f659ccd9804 @ git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

c5b939423a58 iosys-map: Add per-word write
828cd3c6d0ac iosys-map: Add per-word read

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/index.html

[-- Attachment #2: Type: text/html, Size: 13950 bytes --]

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

* Re: [Intel-gfx] [PATCH 1/2] iosys-map: Add per-word read
  2022-06-17  8:52 [Intel-gfx] [PATCH 1/2] iosys-map: Add per-word read Lucas De Marchi
                   ` (2 preceding siblings ...)
  2022-06-17 13:47 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
@ 2022-06-17 15:56 ` Lucas De Marchi
  2022-06-17 21:24 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/2] " Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Lucas De Marchi @ 2022-06-17 15:56 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Daniel Vetter, christian.koenig, tzimmermann

On Fri, Jun 17, 2022 at 01:52:03AM -0700, Lucas De Marchi wrote:
>Instead of always falling back to memcpy_fromio() for any size, prefer
>using read{b,w,l}(). When reading struct members it's common to read
>individual integer variables individually. Going through memcpy_fromio()
>for each of them poses a high penalty.
>
>Employ a similar trick as __seqprop() by using _Generic() to generate
>only the specific call based on a type-compatible variable.
>
>For a pariticular i915 workload producing GPU context switches,
>__get_engine_usage_record() is particularly hot since the engine usage
>is read from device local memory with dgfx, possibly multiple times
>since it's racy. Test execution time for this test shows a ~12.5%
>improvement with DG2:
>
>Before:
>	nrepeats = 1000; min = 7.63243e+06; max = 1.01817e+07;
>	median = 9.52548e+06; var = 526149;
>After:
>	nrepeats = 1000; min = 7.03402e+06; max = 8.8832e+06;
>	median = 8.33955e+06; var = 333113;
>
>Other things attempted that didn't prove very useful:
>1) Change the _Generic() on x86 to just dereference the memory address
>2) Change __get_engine_usage_record() to do just 1 read per loop,
>   comparing with the previous value read
>3) Change __get_engine_usage_record() to access the fields directly as it
>   was before the conversion to iosys-map
>
>(3) did gave a small improvement (~3%), but doesn't seem to scale well
>to other similar cases in the driver.
>
>Additional test by Chris Wilson using gem_create from igt with some
>changes to track object creation time. This happens to accidentally
>stress this code path:
>
>	Pre iosys_map conversion of engine busyness:
>	lmem0: Creating    262144 4KiB objects took 59274.2ms
>
>	Unpatched:
>	lmem0: Creating    262144 4KiB objects took 108830.2ms
>
>	With readl (this patch):
>	lmem0: Creating    262144 4KiB objects took 61348.6ms
>
>	s/readl/READ_ONCE/
>	lmem0: Creating    262144 4KiB objects took 61333.2ms
>
>So we do take a little bit more time than before the conversion, but
>that is due to other factors: bringing the READ_ONCE back would be as
>good as just doing this conversion.
>
>v2:
>- Remove default from _Generic() - callers wanting to read more
>  than u64 should use iosys_map_memcpy_from()
>- Add READ_ONCE() cases dereferencing the pointer when using system
>  memory
>
>Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>Reviewed-by: Christian König <christian.koenig@amd.com> # v1
>---
> include/linux/iosys-map.h | 45 +++++++++++++++++++++++++++++++--------
> 1 file changed, 36 insertions(+), 9 deletions(-)
>
>diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
>index 4b8406ee8bc4..f59dd00ed202 100644
>--- a/include/linux/iosys-map.h
>+++ b/include/linux/iosys-map.h
>@@ -6,6 +6,7 @@
> #ifndef __IOSYS_MAP_H__
> #define __IOSYS_MAP_H__
>
>+#include <linux/compiler_types.h>
> #include <linux/io.h>
> #include <linux/string.h>
>
>@@ -333,6 +334,26 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
> 		memset(dst->vaddr + offset, value, len);
> }
>
>+#ifdef CONFIG_64BIT
>+#define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)				\
>+	u64: val_ = readq(vaddr_iomem_)
>+#else
>+#define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)				\
>+	u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))

I tested io/sys and forgot again to test it for 32-bit :(. This
should fix the build for 32-bits:

diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
index 580e14cd360c..f8bc052f8975 100644
--- a/include/linux/iosys-map.h
+++ b/include/linux/iosys-map.h
@@ -341,7 +341,7 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
  	u64: writeq(val_, vaddr_iomem_)
  #else
  #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)				\
-	u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
+	u64: memcpy_fromio(&(val_), vaddr_iomem_, sizeof(u64))
  #define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_)			\
  	u64: memcpy_toio(vaddr_iomem_, &(val_), sizeof(u64))
  #endif

Lucas De Marchi

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

* [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/2] iosys-map: Add per-word read
  2022-06-17  8:52 [Intel-gfx] [PATCH 1/2] iosys-map: Add per-word read Lucas De Marchi
                   ` (3 preceding siblings ...)
  2022-06-17 15:56 ` [Intel-gfx] [PATCH 1/2] " Lucas De Marchi
@ 2022-06-17 21:24 ` Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2022-06-17 21:24 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 30028 bytes --]

== Series Details ==

Series: series starting with [1/2] iosys-map: Add per-word read
URL   : https://patchwork.freedesktop.org/series/105273/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11775_full -> Patchwork_105273v1_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_105273v1_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_105273v1_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (13 -> 10)
------------------------------

  Missing    (3): shard-rkl shard-dg1 shard-tglu 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_105273v1_full:

### IGT changes ###

#### Possible regressions ####

  * igt@kms_async_flips@async-flip-with-page-flip-events@pipe-b-edp-1:
    - shard-skl:          [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl3/igt@kms_async_flips@async-flip-with-page-flip-events@pipe-b-edp-1.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl9/igt@kms_async_flips@async-flip-with-page-flip-events@pipe-b-edp-1.html

  
Known issues
------------

  Here are the changes found in Patchwork_105273v1_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_isolation@preservation-s3@vcs0:
    - shard-skl:          [PASS][3] -> [INCOMPLETE][4] ([i915#4793])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl10/igt@gem_ctx_isolation@preservation-s3@vcs0.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl1/igt@gem_ctx_isolation@preservation-s3@vcs0.html

  * igt@gem_eio@in-flight-suspend:
    - shard-apl:          [PASS][5] -> [DMESG-WARN][6] ([i915#180]) +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-apl8/igt@gem_eio@in-flight-suspend.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl6/igt@gem_eio@in-flight-suspend.html

  * igt@gem_exec_balancer@parallel-bb-first:
    - shard-iclb:         [PASS][7] -> [SKIP][8] ([i915#4525])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb2/igt@gem_exec_balancer@parallel-bb-first.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb6/igt@gem_exec_balancer@parallel-bb-first.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-apl:          [PASS][9] -> [FAIL][10] ([i915#2842])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-apl7/igt@gem_exec_fair@basic-none-solo@rcs0.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl6/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
    - shard-kbl:          [PASS][11] -> [FAIL][12] ([i915#2842])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl6/igt@gem_exec_fair@basic-pace@rcs0.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl3/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-iclb:         [PASS][13] -> [FAIL][14] ([i915#2849])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb5/igt@gem_exec_fair@basic-throttle@rcs0.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb7/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_huc_copy@huc-copy:
    - shard-apl:          NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#2190])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl3/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@heavy-verify-random:
    - shard-kbl:          NOTRUN -> [SKIP][16] ([fdo#109271] / [i915#4613]) +1 similar issue
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl4/igt@gem_lmem_swapping@heavy-verify-random.html
    - shard-skl:          NOTRUN -> [SKIP][17] ([fdo#109271] / [i915#4613]) +1 similar issue
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl7/igt@gem_lmem_swapping@heavy-verify-random.html

  * igt@gem_lmem_swapping@verify:
    - shard-apl:          NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#4613]) +1 similar issue
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl3/igt@gem_lmem_swapping@verify.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-skl:          NOTRUN -> [WARN][19] ([i915#2658])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl7/igt@gem_pwrite@basic-exhaustion.html

  * igt@gen9_exec_parse@allowed-all:
    - shard-glk:          [PASS][20] -> [DMESG-WARN][21] ([i915#5566] / [i915#716])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-glk5/igt@gen9_exec_parse@allowed-all.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-glk5/igt@gen9_exec_parse@allowed-all.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-skl:          [PASS][22] -> [DMESG-WARN][23] ([i915#5566] / [i915#716])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl4/igt@gen9_exec_parse@allowed-single.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl1/igt@gen9_exec_parse@allowed-single.html
    - shard-apl:          [PASS][24] -> [DMESG-WARN][25] ([i915#5566] / [i915#716])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-apl8/igt@gen9_exec_parse@allowed-single.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl1/igt@gen9_exec_parse@allowed-single.html

  * igt@i915_module_load@load:
    - shard-skl:          NOTRUN -> [SKIP][26] ([fdo#109271] / [i915#6227])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl7/igt@i915_module_load@load.html

  * igt@i915_pm_dc@dc6-psr:
    - shard-iclb:         [PASS][27] -> [FAIL][28] ([i915#454])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb6/igt@i915_pm_dc@dc6-psr.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb3/igt@i915_pm_dc@dc6-psr.html

  * igt@i915_suspend@debugfs-reader:
    - shard-kbl:          [PASS][29] -> [DMESG-WARN][30] ([i915#180]) +4 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl7/igt@i915_suspend@debugfs-reader.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl6/igt@i915_suspend@debugfs-reader.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0-hflip:
    - shard-apl:          NOTRUN -> [SKIP][31] ([fdo#109271]) +43 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl2/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0-hflip.html

  * igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc:
    - shard-skl:          NOTRUN -> [SKIP][32] ([fdo#109271] / [i915#3886]) +1 similar issue
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl7/igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc:
    - shard-apl:          NOTRUN -> [SKIP][33] ([fdo#109271] / [i915#3886]) +1 similar issue
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl3/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:
    - shard-kbl:          NOTRUN -> [SKIP][34] ([fdo#109271] / [i915#3886]) +3 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl4/igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_chamelium@dp-audio-edid:
    - shard-apl:          NOTRUN -> [SKIP][35] ([fdo#109271] / [fdo#111827]) +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl2/igt@kms_chamelium@dp-audio-edid.html

  * igt@kms_chamelium@vga-edid-read:
    - shard-kbl:          NOTRUN -> [SKIP][36] ([fdo#109271] / [fdo#111827]) +3 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl4/igt@kms_chamelium@vga-edid-read.html

  * igt@kms_color_chamelium@pipe-a-ctm-limited-range:
    - shard-skl:          NOTRUN -> [SKIP][37] ([fdo#109271] / [fdo#111827]) +3 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl7/igt@kms_color_chamelium@pipe-a-ctm-limited-range.html

  * igt@kms_cursor_legacy@pipe-d-torture-bo:
    - shard-apl:          NOTRUN -> [SKIP][38] ([fdo#109271] / [i915#533])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl2/igt@kms_cursor_legacy@pipe-d-torture-bo.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-render:
    - shard-kbl:          NOTRUN -> [SKIP][39] ([fdo#109271]) +71 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@fbcpsr-suspend:
    - shard-skl:          NOTRUN -> [SKIP][40] ([fdo#109271]) +57 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl10/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html

  * igt@kms_hdr@bpc-switch@pipe-a-dp-1:
    - shard-kbl:          [PASS][41] -> [FAIL][42] ([i915#1188])
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl3/igt@kms_hdr@bpc-switch@pipe-a-dp-1.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl3/igt@kms_hdr@bpc-switch@pipe-a-dp-1.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - shard-kbl:          NOTRUN -> [SKIP][43] ([fdo#109271] / [i915#533])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl1/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
    - shard-skl:          [PASS][44] -> [FAIL][45] ([fdo#108145] / [i915#265])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl3/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl9/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
    - shard-apl:          NOTRUN -> [FAIL][46] ([fdo#108145] / [i915#265])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl3/igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb.html

  * igt@kms_psr2_su@page_flip-xrgb8888:
    - shard-kbl:          NOTRUN -> [SKIP][47] ([fdo#109271] / [i915#658])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl3/igt@kms_psr2_su@page_flip-xrgb8888.html

  * igt@kms_psr@psr2_primary_mmap_cpu:
    - shard-iclb:         [PASS][48] -> [SKIP][49] ([fdo#109441]) +1 similar issue
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb1/igt@kms_psr@psr2_primary_mmap_cpu.html

  * igt@kms_psr_stress_test@invalidate-primary-flip-overlay:
    - shard-iclb:         [PASS][50] -> [SKIP][51] ([i915#5519])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb3/igt@kms_psr_stress_test@invalidate-primary-flip-overlay.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb6/igt@kms_psr_stress_test@invalidate-primary-flip-overlay.html

  * igt@sw_sync@sync_merge_same:
    - shard-skl:          NOTRUN -> [FAIL][52] ([i915#6140])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl7/igt@sw_sync@sync_merge_same.html
    - shard-kbl:          NOTRUN -> [FAIL][53] ([i915#6140])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl4/igt@sw_sync@sync_merge_same.html

  * igt@sysfs_clients@pidname:
    - shard-skl:          NOTRUN -> [SKIP][54] ([fdo#109271] / [i915#2994]) +1 similar issue
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl7/igt@sysfs_clients@pidname.html
    - shard-kbl:          NOTRUN -> [SKIP][55] ([fdo#109271] / [i915#2994])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl4/igt@sysfs_clients@pidname.html

  
#### Possible fixes ####

  * igt@feature_discovery@psr2:
    - shard-iclb:         [SKIP][56] ([i915#658]) -> [PASS][57]
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb3/igt@feature_discovery@psr2.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb2/igt@feature_discovery@psr2.html

  * igt@gem_eio@unwedge-stress:
    - shard-iclb:         [TIMEOUT][58] ([i915#3070]) -> [PASS][59]
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb1/igt@gem_eio@unwedge-stress.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb7/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_balancer@parallel-keep-in-fence:
    - shard-iclb:         [SKIP][60] ([i915#4525]) -> [PASS][61] +1 similar issue
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb3/igt@gem_exec_balancer@parallel-keep-in-fence.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb2/igt@gem_exec_balancer@parallel-keep-in-fence.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-glk:          [FAIL][62] ([i915#2842]) -> [PASS][63]
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-glk2/igt@gem_exec_fair@basic-none-share@rcs0.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-glk5/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
    - shard-kbl:          [SKIP][64] ([fdo#109271]) -> [PASS][65]
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl6/igt@gem_exec_fair@basic-pace@vcs0.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl3/igt@gem_exec_fair@basic-pace@vcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-kbl:          [FAIL][66] ([i915#2842]) -> [PASS][67] +1 similar issue
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl6/igt@gem_exec_fair@basic-pace@vecs0.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl3/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_softpin@reverse:
    - shard-skl:          [DMESG-WARN][68] ([i915#1982]) -> [PASS][69]
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl1/igt@gem_softpin@reverse.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl6/igt@gem_softpin@reverse.html

  * igt@i915_suspend@forcewake:
    - shard-kbl:          [DMESG-WARN][70] ([i915#180]) -> [PASS][71] +2 similar issues
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl7/igt@i915_suspend@forcewake.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl4/igt@i915_suspend@forcewake.html

  * igt@kms_async_flips@alternate-sync-async-flip@pipe-c-edp-1:
    - shard-skl:          [FAIL][72] ([i915#2521]) -> [PASS][73]
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl7/igt@kms_async_flips@alternate-sync-async-flip@pipe-c-edp-1.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl10/igt@kms_async_flips@alternate-sync-async-flip@pipe-c-edp-1.html

  * igt@kms_big_fb@linear-max-hw-stride-64bpp-rotate-0:
    - shard-glk:          [FAIL][74] ([i915#1888] / [i915#5138]) -> [PASS][75]
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-glk4/igt@kms_big_fb@linear-max-hw-stride-64bpp-rotate-0.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-glk1/igt@kms_big_fb@linear-max-hw-stride-64bpp-rotate-0.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-apl:          [DMESG-WARN][76] ([i915#180]) -> [PASS][77] +2 similar issues
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-apl7/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-apl6/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_dither@fb-8bpc-vs-panel-8bpc@pipe-a-hdmi-a-1:
    - shard-glk:          [SKIP][78] ([fdo#109271]) -> [PASS][79]
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-glk8/igt@kms_dither@fb-8bpc-vs-panel-8bpc@pipe-a-hdmi-a-1.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-glk2/igt@kms_dither@fb-8bpc-vs-panel-8bpc@pipe-a-hdmi-a-1.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a2:
    - shard-glk:          [FAIL][80] ([i915#79]) -> [PASS][81]
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-glk7/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a2.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-glk8/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a2.html

  * igt@kms_flip@flip-vs-expired-vblank@a-edp1:
    - shard-skl:          [FAIL][82] ([i915#79]) -> [PASS][83]
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl10/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl10/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html

  * igt@kms_flip@plain-flip-fb-recreate@a-edp1:
    - shard-skl:          [FAIL][84] ([i915#2122]) -> [PASS][85]
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl9/igt@kms_flip@plain-flip-fb-recreate@a-edp1.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl9/igt@kms_flip@plain-flip-fb-recreate@a-edp1.html

  * igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-5@pipe-c-edp-1:
    - shard-iclb:         [SKIP][86] ([i915#5235]) -> [PASS][87] +5 similar issues
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb2/igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-5@pipe-c-edp-1.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb6/igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-5@pipe-c-edp-1.html

  * igt@kms_psr@psr2_sprite_plane_onoff:
    - shard-iclb:         [SKIP][88] ([fdo#109441]) -> [PASS][89] +1 similar issue
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb4/igt@kms_psr@psr2_sprite_plane_onoff.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb2/igt@kms_psr@psr2_sprite_plane_onoff.html

  * igt@kms_vblank@pipe-b-accuracy-idle:
    - shard-skl:          [FAIL][90] ([i915#43]) -> [PASS][91]
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl3/igt@kms_vblank@pipe-b-accuracy-idle.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl9/igt@kms_vblank@pipe-b-accuracy-idle.html

  
#### Warnings ####

  * igt@gem_exec_fair@basic-pace@vcs1:
    - shard-kbl:          [FAIL][92] ([i915#2842]) -> [SKIP][93] ([fdo#109271])
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl6/igt@gem_exec_fair@basic-pace@vcs1.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl3/igt@gem_exec_fair@basic-pace@vcs1.html

  * igt@kms_chamelium@hdmi-audio:
    - shard-skl:          [SKIP][94] ([fdo#109271] / [fdo#111827] / [i915#1888]) -> [SKIP][95] ([fdo#109271] / [fdo#111827])
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl4/igt@kms_chamelium@hdmi-audio.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl4/igt@kms_chamelium@hdmi-audio.html

  * igt@kms_cursor_crc@pipe-d-cursor-128x42-random:
    - shard-skl:          [SKIP][96] ([fdo#109271] / [i915#1888]) -> [SKIP][97] ([fdo#109271]) +2 similar issues
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-skl3/igt@kms_cursor_crc@pipe-d-cursor-128x42-random.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-skl10/igt@kms_cursor_crc@pipe-d-cursor-128x42-random.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-kbl:          [INCOMPLETE][98] ([i915#180]) -> [FAIL][99] ([i915#4767])
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl6/igt@kms_fbcon_fbt@fbc-suspend.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl3/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-sf:
    - shard-iclb:         [SKIP][100] ([i915#658]) -> [SKIP][101] ([i915#2920])
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb4/igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-sf.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb2/igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-sf.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area:
    - shard-iclb:         [SKIP][102] ([fdo#111068] / [i915#658]) -> [SKIP][103] ([i915#2920])
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb3/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb2/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb:
    - shard-iclb:         [SKIP][104] ([i915#2920]) -> [SKIP][105] ([i915#658]) +1 similar issue
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-iclb2/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-iclb6/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb.html

  * igt@runner@aborted:
    - shard-tglb:         ([FAIL][106], [FAIL][107]) ([i915#3002] / [i915#4312] / [i915#5257]) -> ([FAIL][108], [FAIL][109], [FAIL][110], [FAIL][111], [FAIL][112], [FAIL][113], [FAIL][114], [FAIL][115], [FAIL][116], [FAIL][117], [FAIL][118], [FAIL][119], [FAIL][120], [FAIL][121], [FAIL][122], [FAIL][123], [FAIL][124], [FAIL][125], [FAIL][126], [FAIL][127], [FAIL][128], [FAIL][129]) ([i915#5257])
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-tglb6/igt@runner@aborted.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-tglb7/igt@runner@aborted.html
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb8/igt@runner@aborted.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb8/igt@runner@aborted.html
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb8/igt@runner@aborted.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb8/igt@runner@aborted.html
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb8/igt@runner@aborted.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb8/igt@runner@aborted.html
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb8/igt@runner@aborted.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb5/igt@runner@aborted.html
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb5/igt@runner@aborted.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb5/igt@runner@aborted.html
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb5/igt@runner@aborted.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb1/igt@runner@aborted.html
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb1/igt@runner@aborted.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb3/igt@runner@aborted.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb3/igt@runner@aborted.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb3/igt@runner@aborted.html
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb1/igt@runner@aborted.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb2/igt@runner@aborted.html
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb1/igt@runner@aborted.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb2/igt@runner@aborted.html
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb2/igt@runner@aborted.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-tglb3/igt@runner@aborted.html
    - shard-kbl:          ([FAIL][130], [FAIL][131], [FAIL][132], [FAIL][133], [FAIL][134], [FAIL][135], [FAIL][136]) ([i915#180] / [i915#3002] / [i915#4312] / [i915#5257] / [i915#92]) -> ([FAIL][137], [FAIL][138], [FAIL][139], [FAIL][140], [FAIL][141], [FAIL][142]) ([i915#180] / [i915#3002] / [i915#4312] / [i915#5257])
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl6/igt@runner@aborted.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl7/igt@runner@aborted.html
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl4/igt@runner@aborted.html
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl7/igt@runner@aborted.html
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl6/igt@runner@aborted.html
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl1/igt@runner@aborted.html
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11775/shard-kbl6/igt@runner@aborted.html
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl6/igt@runner@aborted.html
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl6/igt@runner@aborted.html
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl3/igt@runner@aborted.html
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl7/igt@runner@aborted.html
   [141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl6/igt@runner@aborted.html
   [142]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/shard-kbl7/igt@runner@aborted.html

  
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2849]: https://gitlab.freedesktop.org/drm/intel/issues/2849
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
  [i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
  [i915#3070]: https://gitlab.freedesktop.org/drm/intel/issues/3070
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#43]: https://gitlab.freedesktop.org/drm/intel/issues/43
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
  [i915#4793]: https://gitlab.freedesktop.org/drm/intel/issues/4793
  [i915#5138]: https://gitlab.freedesktop.org/drm/intel/issues/5138
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5257]: https://gitlab.freedesktop.org/drm/intel/issues/5257
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5519]: https://gitlab.freedesktop.org/drm/intel/issues/5519
  [i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
  [i915#6140]: https://gitlab.freedesktop.org/drm/intel/issues/6140
  [i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92


Build changes
-------------

  * Linux: CI_DRM_11775 -> Patchwork_105273v1

  CI-20190529: 20190529
  CI_DRM_11775: 93bea5a783b94aa5336606ddee482f659ccd9804 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6534: 6137099c021e26b8593ddd832d6e3b3d3bc3b1d0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_105273v1: 93bea5a783b94aa5336606ddee482f659ccd9804 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105273v1/index.html

[-- Attachment #2: Type: text/html, Size: 37196 bytes --]

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

* Re: [Intel-gfx] [PATCH 2/2] iosys-map: Add per-word write
  2022-06-17  8:52 ` [Intel-gfx] [PATCH 2/2] iosys-map: Add per-word write Lucas De Marchi
@ 2022-06-26 21:01   ` Lucas De Marchi
  2022-06-27  7:03     ` Thomas Zimmermann
  0 siblings, 1 reply; 8+ messages in thread
From: Lucas De Marchi @ 2022-06-26 21:01 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Daniel Vetter, christian.koenig, tzimmermann

On Fri, Jun 17, 2022 at 01:52:04AM -0700, Lucas De Marchi wrote:
>Like was done for read, provide the equivalent for write. Even if
>current users are not in the hot path, this should future-proof it.
>
>v2:
>  - Remove default from _Generic() - callers wanting to write more
>    than u64 should use iosys_map_memcpy_to()
>  - Add WRITE_ONCE() cases dereferencing the pointer when using system
>    memory

Thomas, do you have any additional concern on this patch regarding your
previous review?

thanks
Lucas De Marchi

>
>Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>Reviewed-by: Reviewed-by: Christian König <christian.koenig@amd.com> # v1
>---
> include/linux/iosys-map.h | 42 ++++++++++++++++++++++++++++++---------
> 1 file changed, 33 insertions(+), 9 deletions(-)
>
>diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
>index f59dd00ed202..580e14cd360c 100644
>--- a/include/linux/iosys-map.h
>+++ b/include/linux/iosys-map.h
>@@ -337,9 +337,13 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
> #ifdef CONFIG_64BIT
> #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)				\
> 	u64: val_ = readq(vaddr_iomem_)
>+#define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_)			\
>+	u64: writeq(val_, vaddr_iomem_)
> #else
> #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)				\
> 	u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
>+#define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_)			\
>+	u64: memcpy_toio(vaddr_iomem_, &(val_), sizeof(u64))
> #endif
>
> #define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,		\
>@@ -354,6 +358,19 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
> 	val__ = READ_ONCE(*((type__ *)vaddr__));				\
> })
>
>+#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) _Generic(val__,		\
>+	u8: writeb(val__, vaddr_iomem__),					\
>+	u16: writew(val__, vaddr_iomem__),					\
>+	u32: writel(val__, vaddr_iomem__),					\
>+	__iosys_map_wr_io_u64_case(val__, vaddr_iomem__))
>+
>+#define __iosys_map_wr_sys(val__, vaddr__, type__) ({				\
>+	compiletime_assert(sizeof(type__) <= sizeof(u64),			\
>+			   "Unsupported access size for __iosys_map_wr_sys()"); \
>+	WRITE_ONCE(*((type__ *)vaddr__), val__);				\
>+})
>+
>+
> /**
>  * iosys_map_rd - Read a C-type value from the iosys_map
>  *
>@@ -386,12 +403,17 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
>  * @type__:	Type of the value being written
>  * @val__:	Value to write
>  *
>- * Write a C-type value to the iosys_map, handling possible un-aligned accesses
>- * to the mapping.
>+ * Write a C type value (u8, u16, u32 and u64) to the iosys_map. For other types
>+ * or if pointer may be unaligned (and problematic for the architecture
>+ * supported), use iosys_map_memcpy_to()
>  */
>-#define iosys_map_wr(map__, offset__, type__, val__) ({			\
>-	type__ val = (val__);						\
>-	iosys_map_memcpy_to(map__, offset__, &val, sizeof(val));	\
>+#define iosys_map_wr(map__, offset__, type__, val__) ({				\
>+	type__ val = (val__);							\
>+	if ((map__)->is_iomem) {						\
>+		__iosys_map_wr_io(val, (map__)->vaddr_iomem + (offset__), type__);\
>+	} else {								\
>+		__iosys_map_wr_sys(val, (map__)->vaddr + (offset__), type__);	\
>+	}									\
> })
>
> /**
>@@ -472,10 +494,12 @@ static inline void iosys_map_memset(struct iosys_map *dst, size_t offset,
>  * @field__:		Member of the struct to read
>  * @val__:		Value to write
>  *
>- * Write a value to the iosys_map considering its layout is described by a C struct
>- * starting at @struct_offset__. The field offset and size is calculated and the
>- * @val__ is written handling possible un-aligned memory accesses. Refer to
>- * iosys_map_rd_field() for expected usage and memory layout.
>+ * Write a value to the iosys_map considering its layout is described by a C
>+ * struct starting at @struct_offset__. The field offset and size is calculated
>+ * and the @val__ is written. If the field access would incur in un-aligned
>+ * access, then either iosys_map_memcpy_to() needs to be used or the
>+ * architecture must support it. Refer to iosys_map_rd_field() for expected
>+ * usage and memory layout.
>  */
> #define iosys_map_wr_field(map__, struct_offset__, struct_type__, field__, val__) ({	\
> 	struct_type__ *s;								\
>-- 
>2.36.1
>

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

* Re: [Intel-gfx] [PATCH 2/2] iosys-map: Add per-word write
  2022-06-26 21:01   ` Lucas De Marchi
@ 2022-06-27  7:03     ` Thomas Zimmermann
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Zimmermann @ 2022-06-27  7:03 UTC (permalink / raw)
  To: Lucas De Marchi, intel-gfx, dri-devel; +Cc: Daniel Vetter, christian.koenig


[-- Attachment #1.1: Type: text/plain, Size: 6059 bytes --]

Hi Lucas

Am 26.06.22 um 23:01 schrieb Lucas De Marchi:
> On Fri, Jun 17, 2022 at 01:52:04AM -0700, Lucas De Marchi wrote:
>> Like was done for read, provide the equivalent for write. Even if
>> current users are not in the hot path, this should future-proof it.
>>
>> v2:
>>  - Remove default from _Generic() - callers wanting to write more
>>    than u64 should use iosys_map_memcpy_to()
>>  - Add WRITE_ONCE() cases dereferencing the pointer when using system
>>    memory
> 
> Thomas, do you have any additional concern on this patch regarding your
> previous review?

Sorry, your patches simply fell through the cracks. For the patchset:

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

Thanks for the effort you put into this.

Best regards
Thomas

> 
> thanks
> Lucas De Marchi
> 
>>
>> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>> Reviewed-by: Reviewed-by: Christian König <christian.koenig@amd.com> # v1
>> ---
>> include/linux/iosys-map.h | 42 ++++++++++++++++++++++++++++++---------
>> 1 file changed, 33 insertions(+), 9 deletions(-)
>>
>> diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
>> index f59dd00ed202..580e14cd360c 100644
>> --- a/include/linux/iosys-map.h
>> +++ b/include/linux/iosys-map.h
>> @@ -337,9 +337,13 @@ static inline void iosys_map_memset(struct 
>> iosys_map *dst, size_t offset,
>> #ifdef CONFIG_64BIT
>> #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)                \
>>     u64: val_ = readq(vaddr_iomem_)
>> +#define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_)            \
>> +    u64: writeq(val_, vaddr_iomem_)
>> #else
>> #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_)                \
>>     u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
>> +#define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_)            \
>> +    u64: memcpy_toio(vaddr_iomem_, &(val_), sizeof(u64))
>> #endif
>>
>> #define __iosys_map_rd_io(val__, vaddr_iomem__, type__) 
>> _Generic(val__,        \
>> @@ -354,6 +358,19 @@ static inline void iosys_map_memset(struct 
>> iosys_map *dst, size_t offset,
>>     val__ = READ_ONCE(*((type__ *)vaddr__));                \
>> })
>>
>> +#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) 
>> _Generic(val__,        \
>> +    u8: writeb(val__, vaddr_iomem__),                    \
>> +    u16: writew(val__, vaddr_iomem__),                    \
>> +    u32: writel(val__, vaddr_iomem__),                    \
>> +    __iosys_map_wr_io_u64_case(val__, vaddr_iomem__))
>> +
>> +#define __iosys_map_wr_sys(val__, vaddr__, type__) ({                \
>> +    compiletime_assert(sizeof(type__) <= sizeof(u64),            \
>> +               "Unsupported access size for __iosys_map_wr_sys()"); \
>> +    WRITE_ONCE(*((type__ *)vaddr__), val__);                \
>> +})
>> +
>> +
>> /**
>>  * iosys_map_rd - Read a C-type value from the iosys_map
>>  *
>> @@ -386,12 +403,17 @@ static inline void iosys_map_memset(struct 
>> iosys_map *dst, size_t offset,
>>  * @type__:    Type of the value being written
>>  * @val__:    Value to write
>>  *
>> - * Write a C-type value to the iosys_map, handling possible 
>> un-aligned accesses
>> - * to the mapping.
>> + * Write a C type value (u8, u16, u32 and u64) to the iosys_map. For 
>> other types
>> + * or if pointer may be unaligned (and problematic for the architecture
>> + * supported), use iosys_map_memcpy_to()
>>  */
>> -#define iosys_map_wr(map__, offset__, type__, val__) ({            \
>> -    type__ val = (val__);                        \
>> -    iosys_map_memcpy_to(map__, offset__, &val, sizeof(val));    \
>> +#define iosys_map_wr(map__, offset__, type__, val__) ({                \
>> +    type__ val = (val__);                            \
>> +    if ((map__)->is_iomem) {                        \
>> +        __iosys_map_wr_io(val, (map__)->vaddr_iomem + (offset__), 
>> type__);\
>> +    } else {                                \
>> +        __iosys_map_wr_sys(val, (map__)->vaddr + (offset__), 
>> type__);    \
>> +    }                                    \
>> })
>>
>> /**
>> @@ -472,10 +494,12 @@ static inline void iosys_map_memset(struct 
>> iosys_map *dst, size_t offset,
>>  * @field__:        Member of the struct to read
>>  * @val__:        Value to write
>>  *
>> - * Write a value to the iosys_map considering its layout is described 
>> by a C struct
>> - * starting at @struct_offset__. The field offset and size is 
>> calculated and the
>> - * @val__ is written handling possible un-aligned memory accesses. 
>> Refer to
>> - * iosys_map_rd_field() for expected usage and memory layout.
>> + * Write a value to the iosys_map considering its layout is described 
>> by a C
>> + * struct starting at @struct_offset__. The field offset and size is 
>> calculated
>> + * and the @val__ is written. If the field access would incur in 
>> un-aligned
>> + * access, then either iosys_map_memcpy_to() needs to be used or the
>> + * architecture must support it. Refer to iosys_map_rd_field() for 
>> expected
>> + * usage and memory layout.
>>  */
>> #define iosys_map_wr_field(map__, struct_offset__, struct_type__, 
>> field__, val__) ({    \
>>     struct_type__ *s;                                \
>> -- 
>> 2.36.1
>>

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

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

end of thread, other threads:[~2022-06-27  7:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-17  8:52 [Intel-gfx] [PATCH 1/2] iosys-map: Add per-word read Lucas De Marchi
2022-06-17  8:52 ` [Intel-gfx] [PATCH 2/2] iosys-map: Add per-word write Lucas De Marchi
2022-06-26 21:01   ` Lucas De Marchi
2022-06-27  7:03     ` Thomas Zimmermann
2022-06-17 13:25 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] iosys-map: Add per-word read Patchwork
2022-06-17 13:47 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-06-17 15:56 ` [Intel-gfx] [PATCH 1/2] " Lucas De Marchi
2022-06-17 21:24 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/2] " Patchwork

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