mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: separate API to issue preempt
Export separate API gk20a_fifo_issue_preempt() to issue preempt request to a channel or TSG Bug 200156699 Change-Id: Ib3b097ef66a6411d75c1fe213cdbe8b1d08d3418 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/935771 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Terje Bergstrom
parent
595fa71585
commit
04f4f2334e
@@ -1810,6 +1810,18 @@ void gk20a_fifo_nonstall_isr(struct gk20a *g)
|
||||
return;
|
||||
}
|
||||
|
||||
void gk20a_fifo_issue_preempt(struct gk20a *g, u32 id, bool is_tsg)
|
||||
{
|
||||
if (is_tsg)
|
||||
gk20a_writel(g, fifo_preempt_r(),
|
||||
fifo_preempt_id_f(id) |
|
||||
fifo_preempt_type_tsg_f());
|
||||
else
|
||||
gk20a_writel(g, fifo_preempt_r(),
|
||||
fifo_preempt_chid_f(id) |
|
||||
fifo_preempt_type_channel_f());
|
||||
}
|
||||
|
||||
static int __locked_fifo_preempt(struct gk20a *g, u32 id, bool is_tsg)
|
||||
{
|
||||
u32 delay = GR_IDLE_CHECK_DEFAULT;
|
||||
@@ -1820,14 +1832,7 @@ static int __locked_fifo_preempt(struct gk20a *g, u32 id, bool is_tsg)
|
||||
gk20a_dbg_fn("%d", id);
|
||||
|
||||
/* issue preempt */
|
||||
if (is_tsg)
|
||||
gk20a_writel(g, fifo_preempt_r(),
|
||||
fifo_preempt_id_f(id) |
|
||||
fifo_preempt_type_tsg_f());
|
||||
else
|
||||
gk20a_writel(g, fifo_preempt_r(),
|
||||
fifo_preempt_chid_f(id) |
|
||||
fifo_preempt_type_channel_f());
|
||||
gk20a_fifo_issue_preempt(g, id, is_tsg);
|
||||
|
||||
gk20a_dbg_fn("%d", id);
|
||||
/* wait for preempt */
|
||||
|
||||
@@ -196,4 +196,6 @@ bool gk20a_fifo_set_ctx_mmu_error_ch(struct gk20a *g,
|
||||
|
||||
struct channel_gk20a *gk20a_fifo_channel_from_hw_chid(struct gk20a *g,
|
||||
u32 hw_chid);
|
||||
|
||||
void gk20a_fifo_issue_preempt(struct gk20a *g, u32 id, bool is_tsg);
|
||||
#endif /*__GR_GK20A_H__*/
|
||||
|
||||
Reference in New Issue
Block a user