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