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/cda2552dcbaa
branches:  trunk
changeset: 365914:cda2552dcbaa
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 54e7d27a2b53 -r cda2552dcbaa 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