Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: jani.nikula@intel.com, lucas.demarchi@intel.com
Subject: [Intel-xe] [PATCH 2/4] drm/xe/mmio: add xe_mmio_read16()
Date: Tue,  4 Jul 2023 18:32:41 +0300	[thread overview]
Message-ID: <20230704153243.2489821-3-jani.nikula@intel.com> (raw)
In-Reply-To: <20230704153243.2489821-1-jani.nikula@intel.com>

Little by little, make stuff feature complete.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/xe/xe_mmio.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_mmio.h b/drivers/gpu/drm/xe/xe_mmio.h
index 3c547d78afba..4953a9a3f1fb 100644
--- a/drivers/gpu/drm/xe/xe_mmio.h
+++ b/drivers/gpu/drm/xe/xe_mmio.h
@@ -31,6 +31,16 @@ static inline u8 xe_mmio_read8(struct xe_gt *gt, struct xe_reg reg)
 	return readb(tile->mmio.regs + reg.addr);
 }
 
+static inline u16 xe_mmio_read16(struct xe_gt *gt, struct xe_reg reg)
+{
+	struct xe_tile *tile = gt_to_tile(gt);
+
+	if (reg.addr < gt->mmio.adj_limit)
+		reg.addr += gt->mmio.adj_offset;
+
+	return readw(tile->mmio.regs + reg.addr);
+}
+
 static inline void xe_mmio_write32(struct xe_gt *gt,
 				   struct xe_reg reg, u32 val)
 {
-- 
2.39.2


  parent reply	other threads:[~2023-07-04 15:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04 15:32 [Intel-xe] [PATCH 0/4] drm/xe/display: reuse soc/ code from i915 Jani Nikula
2023-07-04 15:32 ` [Intel-xe] [PATCH 1/4] drm/i915/dram: replace __raw_uncore_read32() with intel_uncore_read_fw() Jani Nikula
2023-07-04 15:32 ` Jani Nikula [this message]
2023-07-04 18:34   ` [Intel-xe] [PATCH 2/4] drm/xe/mmio: add xe_mmio_read16() Lucas De Marchi
2023-07-04 15:32 ` [Intel-xe] [PATCH 3/4] fixup! drm/xe/display: Implement display support Jani Nikula
2023-07-04 15:32 ` [Intel-xe] [PATCH 4/4] " Jani Nikula
2023-07-04 17:28 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe/display: reuse soc/ code from i915 Patchwork
2023-07-04 17:28 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-07-04 17:29 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-07-04 17:33 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-07-04 17:33 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-07-04 17:35 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-07-04 17:54 ` [Intel-xe] [PATCH 0/4] " Lucas De Marchi
2023-07-04 18:20 ` [Intel-xe] ○ CI.BAT: info for " 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=20230704153243.2489821-3-jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-xe@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox