All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	linux-fsdevel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH 3/4] drm/xe: Add wrapper for iosys_map_read_from
Date: Sun, 12 May 2024 17:36:05 +0200	[thread overview]
Message-ID: <20240512153606.1996-4-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20240512153606.1996-1-michal.wajdeczko@intel.com>

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@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
---
Cc: linux-fsdevel@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 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


  parent reply	other threads:[~2024-05-12 15:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-12 15:36 [PATCH 0/4] Expose raw access to GuC log over debugfs Michal Wajdeczko
2024-05-12 15:36 ` [PATCH 1/4] libfs: add simple_read_from_iomem() Michal Wajdeczko
2024-05-12 15:36 ` [PATCH 2/4] iosys-map: add iosys_map_read_from() helper Michal Wajdeczko
2024-05-12 15:36 ` Michal Wajdeczko [this message]
2024-05-12 15:36 ` [PATCH 4/4] drm/xe/guc: Expose raw access to GuC log over debugfs Michal Wajdeczko
2024-05-13 16:53   ` John Harrison
2024-05-14 14:58     ` Michal Wajdeczko
2024-05-14 18:13       ` John Harrison
2024-05-14 20:31         ` Matthew Brost
2024-05-14 21:15           ` Michal Wajdeczko
2024-05-14 21:54             ` John Harrison
2024-05-14 22:31             ` Matthew Brost
2024-05-14 20:41         ` Michal Wajdeczko
2024-05-14 22:15           ` John Harrison
2024-05-13  8:03 ` ✓ CI.Patch_applied: success for " Patchwork
2024-05-13  8:03 ` ✗ CI.checkpatch: warning " Patchwork
2024-05-13  8:04 ` ✗ CI.KUnit: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240512153606.1996-4-michal.wajdeczko@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.