diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-04-03 10:31:11 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-04-03 10:31:11 +0000 |
commit | 242524c6278fa0c8d7644637c288f589e084a3f7 (patch) | |
tree | df82498b03470bec796bd7eba25e89c1968cd713 /sys/dev/pci | |
parent | c3acb1e4d83cf76ad5b330ec9566e54b14871954 (diff) |
Correct access to doorbell. In radeondrm this is only present and used
with gfx7/sea islands hardware. Fixes ring 2 test failure on
carrizo-l/mullins.
Problem found by kettenis@ in a different part of the drm 4.19 tree.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/radeon/cik.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/radeon/cik.c b/sys/dev/pci/drm/radeon/cik.c index 515a033f156..bd5983471dc 100644 --- a/sys/dev/pci/drm/radeon/cik.c +++ b/sys/dev/pci/drm/radeon/cik.c @@ -1733,7 +1733,7 @@ u32 cik_get_xclk(struct radeon_device *rdev) u32 cik_mm_rdoorbell(struct radeon_device *rdev, u32 index) { if (index < rdev->doorbell.num_doorbells) { - return bus_space_read_4(rdev->memt, rdev->doorbell.bsh, index); + return bus_space_read_4(rdev->memt, rdev->doorbell.bsh, index * 4); } else { DRM_ERROR("reading beyond doorbell aperture: 0x%08x!\n", index); return 0; @@ -1753,7 +1753,7 @@ u32 cik_mm_rdoorbell(struct radeon_device *rdev, u32 index) void cik_mm_wdoorbell(struct radeon_device *rdev, u32 index, u32 v) { if (index < rdev->doorbell.num_doorbells) { - bus_space_write_4(rdev->memt, rdev->doorbell.bsh, index, v); + bus_space_write_4(rdev->memt, rdev->doorbell.bsh, index * 4, v); } else { DRM_ERROR("writing beyond doorbell aperture: 0x%08x!\n", index); } |