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/amd/amdgpu amdgpu: Fix indexi...



details:   https://anonhg.NetBSD.org/src/rev/3339b78b32c4
branches:  trunk
changeset: 1028971:3339b78b32c4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:36:41 2021 +0000

description:
amdgpu: Fix indexing for 64-bit doorbells.

diffstat:

 sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r c03da8ef0537 -r 3339b78b32c4 sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c
--- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c Sun Dec 19 12:36:31 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c Sun Dec 19 12:36:41 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdgpu_device.c,v 1.11 2021/12/19 12:31:45 riastradh Exp $     */
+/*     $NetBSD: amdgpu_device.c,v 1.12 2021/12/19 12:36:41 riastradh Exp $     */
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *          Jerome Glisse
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_device.c,v 1.11 2021/12/19 12:31:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_device.c,v 1.12 2021/12/19 12:36:41 riastradh Exp $");
 
 #include <linux/power_supply.h>
 #include <linux/kthread.h>
@@ -484,7 +484,7 @@
        if (index < adev->doorbell.num_doorbells) {
 #ifdef __NetBSD__
                return bus_space_read_8(adev->doorbell.bst, adev->doorbell.bsh,
-                   4*index);
+                   8*index);
 #else
                return atomic64_read((atomic64_t *)(adev->doorbell.ptr + index));
 #endif
@@ -509,7 +509,7 @@
        if (index < adev->doorbell.num_doorbells) {
 #ifdef __NetBSD__
                bus_space_write_8(adev->doorbell.bst, adev->doorbell.bsh,
-                   4*index, v);
+                   8*index, v);
 #else
                atomic64_set((atomic64_t *)(adev->doorbell.ptr + index), v);
 #endif



Home | Main Index | Thread Index | Old Index