Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 Use bus_space_read/write...



details:   https://anonhg.NetBSD.org/src/rev/16143f8e18b1
branches:  trunk
changeset: 364382:16143f8e18b1
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:15:50 2018 +0000

description:
Use bus_space_read/write_4 instead of readl/writel.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_drv.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 7d083b45a1f6 -r 16143f8e18b1 sys/external/bsd/drm2/dist/drm/i915/i915_drv.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h    Mon Aug 27 07:15:39 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h    Mon Aug 27 07:15:50 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_drv.h,v 1.16 2018/08/27 07:02:41 riastradh Exp $  */
+/*     $NetBSD: i915_drv.h,v 1.17 2018/08/27 07:15:50 riastradh Exp $  */
 
 /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-
  */
@@ -3579,8 +3579,13 @@
  * Note: Should only be used between intel_uncore_forcewake_irqlock() and
  * intel_uncore_forcewake_irqunlock().
  */
+#ifdef __NetBSD__
+#define I915_READ_FW(reg__) bus_space_read_4(dev_priv->regs_bst, dev_priv->regs_bsh, (reg__))
+#define I915_WRITE_FW(reg__, val__) bus_space_write_4(dev_priv->regs_bst, dev_priv->regs_bsh, (reg__), (val__))
+#else
 #define I915_READ_FW(reg__) readl(dev_priv->regs + (reg__))
 #define I915_WRITE_FW(reg__, val__) writel(val__, dev_priv->regs + (reg__))
+#endif
 #define POSTING_READ_FW(reg__) (void)I915_READ_FW(reg__)
 
 /* "Broadcast RGB" property */



Home | Main Index | Thread Index | Old Index