diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 21 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 2 |
2 files changed, 15 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 42e48901..337a9584 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -1810,6 +1810,18 @@ void gk20a_fifo_nonstall_isr(struct gk20a *g) | |||
1810 | return; | 1810 | return; |
1811 | } | 1811 | } |
1812 | 1812 | ||
1813 | void gk20a_fifo_issue_preempt(struct gk20a *g, u32 id, bool is_tsg) | ||
1814 | { | ||
1815 | if (is_tsg) | ||
1816 | gk20a_writel(g, fifo_preempt_r(), | ||
1817 | fifo_preempt_id_f(id) | | ||
1818 | fifo_preempt_type_tsg_f()); | ||
1819 | else | ||
1820 | gk20a_writel(g, fifo_preempt_r(), | ||
1821 | fifo_preempt_chid_f(id) | | ||
1822 | fifo_preempt_type_channel_f()); | ||
1823 | } | ||
1824 | |||
1813 | static int __locked_fifo_preempt(struct gk20a *g, u32 id, bool is_tsg) | 1825 | static int __locked_fifo_preempt(struct gk20a *g, u32 id, bool is_tsg) |
1814 | { | 1826 | { |
1815 | u32 delay = GR_IDLE_CHECK_DEFAULT; | 1827 | u32 delay = GR_IDLE_CHECK_DEFAULT; |
@@ -1820,14 +1832,7 @@ static int __locked_fifo_preempt(struct gk20a *g, u32 id, bool is_tsg) | |||
1820 | gk20a_dbg_fn("%d", id); | 1832 | gk20a_dbg_fn("%d", id); |
1821 | 1833 | ||
1822 | /* issue preempt */ | 1834 | /* issue preempt */ |
1823 | if (is_tsg) | 1835 | gk20a_fifo_issue_preempt(g, id, is_tsg); |
1824 | gk20a_writel(g, fifo_preempt_r(), | ||
1825 | fifo_preempt_id_f(id) | | ||
1826 | fifo_preempt_type_tsg_f()); | ||
1827 | else | ||
1828 | gk20a_writel(g, fifo_preempt_r(), | ||
1829 | fifo_preempt_chid_f(id) | | ||
1830 | fifo_preempt_type_channel_f()); | ||
1831 | 1836 | ||
1832 | gk20a_dbg_fn("%d", id); | 1837 | gk20a_dbg_fn("%d", id); |
1833 | /* wait for preempt */ | 1838 | /* wait for preempt */ |
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index 5305d007..ee4e7328 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |||
@@ -196,4 +196,6 @@ bool gk20a_fifo_set_ctx_mmu_error_ch(struct gk20a *g, | |||
196 | 196 | ||
197 | struct channel_gk20a *gk20a_fifo_channel_from_hw_chid(struct gk20a *g, | 197 | struct channel_gk20a *gk20a_fifo_channel_from_hw_chid(struct gk20a *g, |
198 | u32 hw_chid); | 198 | u32 hw_chid); |
199 | |||
200 | void gk20a_fifo_issue_preempt(struct gk20a *g, u32 id, bool is_tsg); | ||
199 | #endif /*__GR_GK20A_H__*/ | 201 | #endif /*__GR_GK20A_H__*/ |