diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-02-08 21:25:47 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-02-27 19:03:34 -0500 |
commit | 71f53272b28b1086b3f34e5e255815c37504ac2c (patch) | |
tree | 3eb55c03773459f1ccd5b422197555bac5b22b41 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | a885f682d6cf2476c0cee695942b5f4c2718aa70 (diff) |
gpu: nvgpu: FIFO sched fixes
Miscellaneous fixes for the sched code:
1. Make sure get_addr() on an SGL respects the use phys flag since
the runlist needs physical addresses when NVLINK is in use.
2. Ensure the runlist is contiguous. Since the runlist memory is
not virtually addressed the buffer must be physically contiguous.
3. Use all 64 bits of the runlist address in the runlist base addr
register (and related fields).
JIRA EVLR-2333
Change-Id: Id4fd5ba4665d3e35ff1d6ca78dea6b58894a9a9a
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1654667
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
Tested-by: Thomas Fleury <tfleury@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index fea46a0e..dd0b78c0 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <nvgpu/dma.h> | 28 | #include <nvgpu/dma.h> |
29 | #include <nvgpu/timers.h> | 29 | #include <nvgpu/timers.h> |
30 | #include <nvgpu/semaphore.h> | 30 | #include <nvgpu/semaphore.h> |
31 | #include <nvgpu/enabled.h> | ||
31 | #include <nvgpu/kmem.h> | 32 | #include <nvgpu/kmem.h> |
32 | #include <nvgpu/log.h> | 33 | #include <nvgpu/log.h> |
33 | #include <nvgpu/soc.h> | 34 | #include <nvgpu/soc.h> |
@@ -666,11 +667,13 @@ static void fifo_engine_exception_status(struct gk20a *g, | |||
666 | static int init_runlist(struct gk20a *g, struct fifo_gk20a *f) | 667 | static int init_runlist(struct gk20a *g, struct fifo_gk20a *f) |
667 | { | 668 | { |
668 | struct fifo_runlist_info_gk20a *runlist; | 669 | struct fifo_runlist_info_gk20a *runlist; |
670 | struct fifo_engine_info_gk20a *engine_info; | ||
669 | unsigned int runlist_id; | 671 | unsigned int runlist_id; |
670 | u32 i; | 672 | u32 i; |
671 | size_t runlist_size; | 673 | size_t runlist_size; |
672 | u32 active_engine_id, pbdma_id, engine_id; | 674 | u32 active_engine_id, pbdma_id, engine_id; |
673 | struct fifo_engine_info_gk20a *engine_info; | 675 | int flags = nvgpu_is_enabled(g, NVGPU_MM_USE_PHYSICAL_SG) ? |
676 | NVGPU_DMA_FORCE_CONTIGUOUS : 0; | ||
674 | 677 | ||
675 | nvgpu_log_fn(g, " "); | 678 | nvgpu_log_fn(g, " "); |
676 | 679 | ||
@@ -705,8 +708,9 @@ static int init_runlist(struct gk20a *g, struct fifo_gk20a *f) | |||
705 | f->num_runlist_entries, runlist_size); | 708 | f->num_runlist_entries, runlist_size); |
706 | 709 | ||
707 | for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) { | 710 | for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) { |
708 | int err = nvgpu_dma_alloc_sys(g, runlist_size, | 711 | int err = nvgpu_dma_alloc_flags_sys(g, flags, |
709 | &runlist->mem[i]); | 712 | runlist_size, |
713 | &runlist->mem[i]); | ||
710 | if (err) { | 714 | if (err) { |
711 | nvgpu_err(g, "memory allocation failed"); | 715 | nvgpu_err(g, "memory allocation failed"); |
712 | goto clean_up_runlist; | 716 | goto clean_up_runlist; |