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/radeon Expose fence wakeup su...



details:   https://anonhg.NetBSD.org/src/rev/bb4a897a5c65
branches:  trunk
changeset: 365759:bb4a897a5c65
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 06:38:36 2018 +0000

description:
Expose fence wakeup subroutine to cik.c.

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/cik.c          |  11 +++++++++--
 sys/external/bsd/drm2/dist/drm/radeon/radeon.h       |   3 ++-
 sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c |   8 ++++----
 3 files changed, 15 insertions(+), 7 deletions(-)

diffs (80 lines):

diff -r 70fbc283ae6e -r bb4a897a5c65 sys/external/bsd/drm2/dist/drm/radeon/cik.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/cik.c       Mon Aug 27 06:38:22 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/cik.c       Mon Aug 27 06:38:36 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cik.c,v 1.4 2018/08/27 04:58:35 riastradh Exp $        */
+/*     $NetBSD: cik.c,v 1.5 2018/08/27 06:38:36 riastradh Exp $        */
 
 /*
  * Copyright 2012 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
  * Authors: Alex Deucher
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cik.c,v 1.4 2018/08/27 04:58:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cik.c,v 1.5 2018/08/27 06:38:36 riastradh Exp $");
 
 #include <linux/firmware.h>
 #include <linux/slab.h>
@@ -8508,8 +8508,15 @@
        if (queue_hotplug)
                schedule_delayed_work(&rdev->hotplug_work, 0);
        if (queue_reset) {
+#ifdef __NetBSD__
+               spin_lock(&rdev->fence_lock);
+               rdev->needs_reset = true;
+               radeon_fence_wakeup_locked(rdev);
+               spin_unlock(&rdev->fence_lock);
+#else
                rdev->needs_reset = true;
                wake_up_all(&rdev->fence_queue);
+#endif
        }
        if (queue_thermal)
                schedule_work(&rdev->pm.dpm.thermal.work);
diff -r 70fbc283ae6e -r bb4a897a5c65 sys/external/bsd/drm2/dist/drm/radeon/radeon.h
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon.h    Mon Aug 27 06:38:22 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon.h    Mon Aug 27 06:38:36 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon.h,v 1.4 2018/08/27 04:58:36 riastradh Exp $     */
+/*     $NetBSD: radeon.h,v 1.5 2018/08/27 06:38:36 riastradh Exp $     */
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -400,6 +400,7 @@
 void radeon_fence_driver_fini(struct radeon_device *rdev);
 void radeon_fence_driver_force_completion(struct radeon_device *rdev, int ring);
 int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence **fence, int ring);
+void radeon_fence_wakeup_locked(struct radeon_device *rdev);
 void radeon_fence_process(struct radeon_device *rdev, int ring);
 bool radeon_fence_signaled(struct radeon_fence *fence);
 int radeon_fence_wait(struct radeon_fence *fence, bool interruptible);
diff -r 70fbc283ae6e -r bb4a897a5c65 sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c      Mon Aug 27 06:38:22 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c      Mon Aug 27 06:38:36 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_fence.c,v 1.9 2018/08/27 04:58:36 riastradh Exp $       */
+/*     $NetBSD: radeon_fence.c,v 1.10 2018/08/27 06:38:36 riastradh Exp $      */
 
 /*
  * Copyright 2009 Jerome Glisse.
@@ -31,7 +31,7 @@
  *    Dave Airlie
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_fence.c,v 1.9 2018/08/27 04:58:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_fence.c,v 1.10 2018/08/27 06:38:36 riastradh Exp $");
 
 #include <linux/seq_file.h>
 #include <linux/atomic.h>
@@ -203,8 +203,8 @@
 }
 
 #ifdef __NetBSD__
-static void
-radeon_wakeup(struct radeon_device *rdev)
+void
+radeon_fence_wakeup_locked(struct radeon_device *rdev)
 {
        struct radeon_fence *fence, *next;
 



Home | Main Index | Thread Index | Old Index