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 bus_space_read/write_4...



details:   https://anonhg.NetBSD.org/src/rev/442c874258d0
branches:  trunk
changeset: 992789:442c874258d0
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:48:20 2018 +0000

description:
bus_space_read/write_4, not readl/writel.

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/radeon_kfd.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 772c5d6d72dd -r 442c874258d0 sys/external/bsd/drm2/dist/drm/radeon/radeon_kfd.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_kfd.c        Mon Aug 27 07:48:07 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_kfd.c        Mon Aug 27 07:48:20 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_kfd.c,v 1.5 2018/08/27 07:48:07 riastradh Exp $ */
+/*     $NetBSD: radeon_kfd.c,v 1.6 2018/08/27 07:48:20 riastradh Exp $ */
 
 /*
  * Copyright 2014 Advanced Micro Devices, Inc.
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_kfd.c,v 1.5 2018/08/27 07:48:07 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_kfd.c,v 1.6 2018/08/27 07:48:20 riastradh Exp $");
 
 #include <linux/module.h>
 #include <linux/fdtable.h>
@@ -342,14 +342,22 @@
 {
        struct radeon_device *rdev = get_radeon_device(kgd);
 
+#ifdef __NetBSD__
+       bus_space_write_4(rdev->rmmio_bst, rdev->rmmio_bsh, offset, value);
+#else
        writel(value, (void __iomem *)(rdev->rmmio + offset));
+#endif
 }
 
 static uint32_t read_register(struct kgd_dev *kgd, uint32_t offset)
 {
        struct radeon_device *rdev = get_radeon_device(kgd);
 
+#ifdef __NetBSD__
+       return bus_space_read_4(rdev->rmmio_bst, rdev->rmmio_bsh, offset);
+#else
        return readl((void __iomem *)(rdev->rmmio + offset));
+#endif
 }
 
 static void lock_srbm(struct kgd_dev *kgd, uint32_t mec, uint32_t pipe,



Home | Main Index | Thread Index | Old Index