[PATCH 3/4] drm/xe: Add wrapper for iosys_map_read_from

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is preferable to use the xe_map layer instead of directly
accessing iosys_map, so add a wrapper for the recently added
iosys_map_read_from() function.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
Cc: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
---
Cc: linux-fsdevel@xxxxxxxxxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
---
 drivers/gpu/drm/xe/xe_map.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_map.h b/drivers/gpu/drm/xe/xe_map.h
index f62e0c8b67ab..1db1d23c4f69 100644
--- a/drivers/gpu/drm/xe/xe_map.h
+++ b/drivers/gpu/drm/xe/xe_map.h
@@ -44,6 +44,15 @@ static inline void xe_map_memset(struct xe_device *xe,
 	iosys_map_memset(dst, offset, value, len);
 }
 
+static inline ssize_t xe_map_read_from(struct xe_device *xe, void __user *to,
+				       size_t count, loff_t *ppos,
+				       const struct iosys_map *map,
+				       size_t available)
+{
+	xe_device_assert_mem_access(xe);
+	return iosys_map_read_from(to, count, ppos, map, available);
+}
+
 /* FIXME: We likely should kill these two functions sooner or later */
 static inline u32 xe_map_read32(struct xe_device *xe, struct iosys_map *map)
 {
-- 
2.43.0





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux