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 bus_space_write_4, not i...



details:   https://anonhg.NetBSD.org/src/rev/49b944484af6
branches:  trunk
changeset: 365957:49b944484af6
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:23:50 2018 +0000

description:
bus_space_write_4, not iowrite32.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 33c43ab32e68 -r 49b944484af6 sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c   Mon Aug 27 07:23:37 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c   Mon Aug 27 07:23:50 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_lrc.c,v 1.2 2018/08/27 04:58:24 riastradh Exp $  */
+/*     $NetBSD: intel_lrc.c,v 1.3 2018/08/27 07:23:50 riastradh Exp $  */
 
 /*
  * Copyright © 2014 Intel Corporation
@@ -135,7 +135,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_lrc.c,v 1.2 2018/08/27 04:58:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_lrc.c,v 1.3 2018/08/27 07:23:50 riastradh Exp $");
 
 #include <drm/drmP.h>
 #include <drm/i915_drm.h>
@@ -745,6 +745,15 @@
 
 static void __wrap_ring_buffer(struct intel_ringbuffer *ringbuf)
 {
+#ifdef __NetBSD__
+       bus_size_t tail;
+       int rem = ringbuf->size - ringbuf->tail;
+
+       tail = ringbuf->tail;
+       rem /= 4;
+       while (rem--)
+               bus_space_write_4(ringbuf->bst, ringbuf->bsh, tail++, MI_NOOP);
+#else
        uint32_t __iomem *virt;
        int rem = ringbuf->size - ringbuf->tail;
 
@@ -752,6 +761,7 @@
        rem /= 4;
        while (rem--)
                iowrite32(MI_NOOP, virt++);
+#endif
 
        ringbuf->tail = 0;
        intel_ring_update_space(ringbuf);



Home | Main Index | Thread Index | Old Index