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 Fix ordering of bus_dm...
details: https://anonhg.NetBSD.org/src/rev/450255b749e0
branches: trunk
changeset: 991945:450255b749e0
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Aug 08 22:16:49 2018 +0000
description:
Fix ordering of bus_dmamap_sync.
The ordering is:
...
- driver writes to kernel pointer
- sync
- driver triggers device use of newly written data (*)
- sync
- driver writes to kernel pointer
- sync
...
The operation (*) is a DMA write. Hence the syncs should be:
...
- driver writes to kernel pointer
- bus_dmamap_sync(BUS_DMASYNC_PREWRITE)
- driver triggers device use of newly written data
- bus_dmamap_sync(BUS_DMASYNC_POSTWRITE)
- bus_dmamap_sync(BUS_DMASYNC_PREWRITE)
- driver writes to kernel pointer
- bus_dmamap_sync(BUS_DMASYNC_POSTWRITE)
- bus_dmamap_sync(BUS_DMASYNC_PREWRITE)
...
(Preemptive pullup from my DRM/KMS update branch in Git.)
XXX pullup-7
XXX pullup-8
diffstat:
sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r fdb9a3f8dd4c -r 450255b749e0 sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c Wed Aug 08 21:17:46 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c Wed Aug 08 22:16:49 2018 +0000
@@ -268,7 +268,7 @@
bus_dmamap_sync(rdev->ddev->dmat, rdev->gart.rg_table_map,
gpu_pgstart*entsize, gpu_npages*entsize,
- BUS_DMASYNC_PREWRITE);
+ BUS_DMASYNC_POSTWRITE);
}
}
@@ -284,7 +284,7 @@
bus_dmamap_sync(rdev->ddev->dmat, rdev->gart.rg_table_map,
gpu_pgstart*entsize, gpu_npages*entsize,
- BUS_DMASYNC_POSTWRITE);
+ BUS_DMASYNC_PREWRITE);
}
radeon_gart_tlb_flush(rdev);
}
Home |
Main Index |
Thread Index |
Old Index