gpu: nvgpu: move preempt code to common/fifo and hal/fifo

Move chip specific preempt code to hal/fifo
Move non-chip specific preempt code to common/fifo

Remove fifo.get_preempt_timeout

Rename gk20a_fifo_get_preempt_timeout -> nvgpu_preempt_get_timeout
Rename gk20a_fifo_preempt -> nvgpu_preempt_channel

Add fifo.preempt_trigger hal for issuing preempt
Add fifo.preempt_runlists_for_rc hal for preempting runlists during rc
Add fifo.preempt_poll_pbdma hal

Add nvgpu_preempt_poll_tsg_on_pbdma to be called from rc

JIRA NVGPU-3144

Change-Id: Idb089acaa0c6ca08de17487c3496459a61f0bcd4
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2100819
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Seema Khowala
2019-04-18 12:02:35 -07:00
committed by mobile promotions
parent edaddb9bb2
commit bdfc26af8b
27 changed files with 889 additions and 645 deletions

View File

@@ -42,6 +42,7 @@
#include <nvgpu/gr/ctx.h>
#include <nvgpu/gr/obj_ctx.h>
#include <nvgpu/fence.h>
#include <nvgpu/preempt.h>
#include "platform_gk20a.h"
#include "ioctl_channel.h"
@@ -1309,7 +1310,7 @@ long gk20a_channel_ioctl(struct file *filp,
__func__, cmd);
break;
}
err = gk20a_fifo_preempt(ch->g, ch);
err = nvgpu_preempt_channel(ch->g, ch);
gk20a_idle(ch->g);
break;
case NVGPU_IOCTL_CHANNEL_RESCHEDULE_RUNLIST: