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 Reduce diff by going back to ...



details:   https://anonhg.NetBSD.org/src/rev/67c3f7b7b474
branches:  trunk
changeset: 364545:67c3f7b7b474
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:45:55 2018 +0000

description:
Reduce diff by going back to just using ACCESS_ONCE.

diffstat:

 sys/external/bsd/drm2/dist/drm/drm_atomic.c    |  7 +++----
 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c |  8 +++-----
 2 files changed, 6 insertions(+), 9 deletions(-)

diffs (64 lines):

diff -r c32d9476288b -r 67c3f7b7b474 sys/external/bsd/drm2/dist/drm/drm_atomic.c
--- a/sys/external/bsd/drm2/dist/drm/drm_atomic.c       Mon Aug 27 07:45:43 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_atomic.c       Mon Aug 27 07:45:55 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_atomic.c,v 1.6 2018/08/27 06:48:26 riastradh Exp $ */
+/*     $NetBSD: drm_atomic.c,v 1.7 2018/08/27 07:45:55 riastradh Exp $ */
 
 /*
  * Copyright (C) 2014 Red Hat
@@ -29,7 +29,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_atomic.c,v 1.6 2018/08/27 06:48:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_atomic.c,v 1.7 2018/08/27 07:45:55 riastradh Exp $");
 
 #include <linux/export.h>
 
@@ -73,8 +73,7 @@
         */
        state->allow_modeset = true;
 
-       state->num_connector = dev->mode_config.num_connector;
-       __insn_barrier();
+       state->num_connector = ACCESS_ONCE(dev->mode_config.num_connector);
 
        state->crtcs = kcalloc(dev->mode_config.num_crtc,
                               sizeof(*state->crtcs), GFP_KERNEL);
diff -r c32d9476288b -r 67c3f7b7b474 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c    Mon Aug 27 07:45:43 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c    Mon Aug 27 07:45:55 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem.c,v 1.45 2018/08/27 07:23:37 riastradh Exp $  */
+/*     $NetBSD: i915_gem.c,v 1.46 2018/08/27 07:45:55 riastradh Exp $  */
 
 /*
  * Copyright © 2008-2015 Intel Corporation
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem.c,v 1.45 2018/08/27 07:23:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem.c,v 1.46 2018/08/27 07:45:55 riastradh Exp $");
 
 #ifdef __NetBSD__
 #if 0                          /* XXX uvmhist option?  */
@@ -1392,7 +1392,7 @@
        struct drm_device *dev = ring->dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
        const bool irq_test_in_progress =
-           dev_priv->gpu_error.test_irq_rings & intel_ring_flag(ring);
+               ACCESS_ONCE(dev_priv->gpu_error.test_irq_rings) & intel_ring_flag(ring);
 #ifdef __NetBSD__
        int state = 0;
        bool wedged;
@@ -1404,8 +1404,6 @@
        s64 before, now;
        int ret;
 
-       __insn_barrier();       /* ACCESS_ONCE for irq_test_in_progress */
-
        WARN(!intel_irqs_enabled(dev_priv), "IRQs disabled");
 
        if (list_empty(&req->list))



Home | Main Index | Thread Index | Old Index