mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: rename fifo_eng_timeout_us
Rename fifo_eng_timeout_us to ctxsw_timeout_period_ms for clarity. JIRA NVGPU-1312 Change-Id: I23faff3df7160c1193f797ac03769ef2ecf4449e Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2076776 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
9393e2a90a
commit
fe2a599700
@@ -1461,8 +1461,7 @@ bool nvgpu_channel_check_ctxsw_timeout(struct channel_gk20a *ch,
|
|||||||
struct gk20a *g = ch->g;
|
struct gk20a *g = ch->g;
|
||||||
|
|
||||||
recover = nvgpu_channel_update_and_check_ctxsw_timeout(ch,
|
recover = nvgpu_channel_update_and_check_ctxsw_timeout(ch,
|
||||||
g->fifo_eng_timeout_us / 1000U,
|
g->ctxsw_timeout_period_ms, &progress);
|
||||||
&progress);
|
|
||||||
*verbose = ch->ctxsw_timeout_debug_dump;
|
*verbose = ch->ctxsw_timeout_debug_dump;
|
||||||
*ms = ch->ctxsw_timeout_accumulated_ms;
|
*ms = ch->ctxsw_timeout_accumulated_ms;
|
||||||
if (recover) {
|
if (recover) {
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ bool nvgpu_tsg_check_ctxsw_timeout(struct tsg_gk20a *tsg,
|
|||||||
struct gk20a *g = tsg->g;
|
struct gk20a *g = tsg->g;
|
||||||
|
|
||||||
*verbose = false;
|
*verbose = false;
|
||||||
*ms = g->fifo_eng_timeout_us / 1000U;
|
*ms = g->ctxsw_timeout_period_ms;
|
||||||
|
|
||||||
nvgpu_rwsem_down_read(&tsg->ch_list_lock);
|
nvgpu_rwsem_down_read(&tsg->ch_list_lock);
|
||||||
|
|
||||||
@@ -463,7 +463,7 @@ bool nvgpu_tsg_check_ctxsw_timeout(struct tsg_gk20a *tsg,
|
|||||||
nvgpu_log_info(g, "progress on tsg=%d ch=%d",
|
nvgpu_log_info(g, "progress on tsg=%d ch=%d",
|
||||||
tsg->tsgid, ch->chid);
|
tsg->tsgid, ch->chid);
|
||||||
gk20a_channel_put(ch);
|
gk20a_channel_put(ch);
|
||||||
*ms = g->fifo_eng_timeout_us / 1000U;
|
*ms = g->ctxsw_timeout_period_ms;
|
||||||
nvgpu_tsg_set_ctxsw_timeout_accumulated_ms(tsg, *ms);
|
nvgpu_tsg_set_ctxsw_timeout_accumulated_ms(tsg, *ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1392,10 +1392,10 @@ static u32 gk20a_fifo_get_preempt_timeout(struct gk20a *g)
|
|||||||
/* Use fifo_eng_timeout converted to ms for preempt
|
/* Use fifo_eng_timeout converted to ms for preempt
|
||||||
* polling. gr_idle_timeout i.e 3000 ms is and not appropriate
|
* polling. gr_idle_timeout i.e 3000 ms is and not appropriate
|
||||||
* for polling preempt done as context switch timeout gets
|
* for polling preempt done as context switch timeout gets
|
||||||
* triggered every 100 ms and context switch recovery
|
* triggered every ctxsw_timeout_period_ms.
|
||||||
* happens every 3000 ms */
|
*/
|
||||||
|
|
||||||
return g->fifo_eng_timeout_us / 1000U;
|
return g->ctxsw_timeout_period_ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
int gk20a_fifo_is_preempt_pending(struct gk20a *g, u32 id,
|
int gk20a_fifo_is_preempt_pending(struct gk20a *g, u32 id,
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ struct tsg_gk20a;
|
|||||||
#define RC_YES 1U
|
#define RC_YES 1U
|
||||||
#define RC_NO 0U
|
#define RC_NO 0U
|
||||||
|
|
||||||
#define GRFIFO_TIMEOUT_CHECK_PERIOD_US 100000U
|
|
||||||
|
|
||||||
#define NVGPU_FIFO_DEFAULT_TIMESLICE_TIMEOUT 128UL
|
#define NVGPU_FIFO_DEFAULT_TIMESLICE_TIMEOUT 128UL
|
||||||
#define NVGPU_FIFO_DEFAULT_TIMESLICE_SCALE 3UL
|
#define NVGPU_FIFO_DEFAULT_TIMESLICE_SCALE 3UL
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
u32 gv100_fifo_get_preempt_timeout(struct gk20a *g)
|
u32 gv100_fifo_get_preempt_timeout(struct gk20a *g)
|
||||||
{
|
{
|
||||||
return g->fifo_eng_timeout_us / 1000U;
|
return g->ctxsw_timeout_period_ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gv100_apply_ctxsw_timeout_intr(struct gk20a *g)
|
void gv100_apply_ctxsw_timeout_intr(struct gk20a *g)
|
||||||
|
|||||||
@@ -254,10 +254,10 @@ u32 gv11b_fifo_get_preempt_timeout(struct gk20a *g)
|
|||||||
{
|
{
|
||||||
/* using gr_idle_timeout for polling pdma/eng/runlist
|
/* using gr_idle_timeout for polling pdma/eng/runlist
|
||||||
* might kick in timeout handler in the cases where
|
* might kick in timeout handler in the cases where
|
||||||
* preempt is stuck. Use fifo_eng_timeout converted to ms
|
* preempt is stuck. Use ctxsw_timeout_period_ms
|
||||||
* for preempt polling */
|
* for preempt polling */
|
||||||
|
|
||||||
return g->fifo_eng_timeout_us / 1000U ;
|
return g->ctxsw_timeout_period_ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int gv11b_fifo_poll_pbdma_chan_status(struct gk20a *g, u32 id,
|
static int gv11b_fifo_poll_pbdma_chan_status(struct gk20a *g, u32 id,
|
||||||
|
|||||||
@@ -78,7 +78,8 @@ void gk20a_fifo_intr_0_enable(struct gk20a *g, bool enable)
|
|||||||
if (g->ops.fifo.apply_ctxsw_timeout_intr != NULL) {
|
if (g->ops.fifo.apply_ctxsw_timeout_intr != NULL) {
|
||||||
g->ops.fifo.apply_ctxsw_timeout_intr(g);
|
g->ops.fifo.apply_ctxsw_timeout_intr(g);
|
||||||
} else {
|
} else {
|
||||||
timeout = g->fifo_eng_timeout_us;
|
/* timeout is in us. Enable ctxsw timeout */
|
||||||
|
timeout = g->ctxsw_timeout_period_ms * 1000U;
|
||||||
timeout = scale_ptimer(timeout,
|
timeout = scale_ptimer(timeout,
|
||||||
ptimer_scalingfactor10x(g->ptimer_src_freq));
|
ptimer_scalingfactor10x(g->ptimer_src_freq));
|
||||||
timeout |= fifo_eng_timeout_detection_enabled_f();
|
timeout |= fifo_eng_timeout_detection_enabled_f();
|
||||||
|
|||||||
@@ -95,8 +95,8 @@ void gv11b_fifo_intr_0_enable(struct gk20a *g, bool enable)
|
|||||||
nvgpu_writel(g, fifo_intr_ctxsw_timeout_r(), ~U32(0U));
|
nvgpu_writel(g, fifo_intr_ctxsw_timeout_r(), ~U32(0U));
|
||||||
|
|
||||||
if (nvgpu_platform_is_silicon(g)) {
|
if (nvgpu_platform_is_silicon(g)) {
|
||||||
/* enable ctxsw timeout */
|
/* timeout is in us. Enable ctxsw timeout */
|
||||||
timeout = g->fifo_eng_timeout_us;
|
timeout = g->ctxsw_timeout_period_ms * 1000U;
|
||||||
timeout = scale_ptimer(timeout,
|
timeout = scale_ptimer(timeout,
|
||||||
ptimer_scalingfactor10x(g->ptimer_src_freq));
|
ptimer_scalingfactor10x(g->ptimer_src_freq));
|
||||||
timeout |= fifo_eng_ctxsw_timeout_detection_enabled_f();
|
timeout |= fifo_eng_ctxsw_timeout_detection_enabled_f();
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
|
|
||||||
#define INVAL_ID (~U32(0U))
|
#define INVAL_ID (~U32(0U))
|
||||||
|
|
||||||
|
#define CTXSW_TIMEOUT_PERIOD_MS 100U
|
||||||
|
|
||||||
struct gk20a;
|
struct gk20a;
|
||||||
|
|
||||||
struct nvgpu_channel_hw_state {
|
struct nvgpu_channel_hw_state {
|
||||||
|
|||||||
@@ -1884,8 +1884,9 @@ struct gk20a {
|
|||||||
#endif
|
#endif
|
||||||
u32 gr_idle_timeout_default;
|
u32 gr_idle_timeout_default;
|
||||||
bool timeouts_disabled_by_user;
|
bool timeouts_disabled_by_user;
|
||||||
|
|
||||||
unsigned int ch_wdt_init_limit_ms;
|
unsigned int ch_wdt_init_limit_ms;
|
||||||
u32 fifo_eng_timeout_us;
|
u32 ctxsw_timeout_period_ms;
|
||||||
|
|
||||||
struct nvgpu_mutex power_lock;
|
struct nvgpu_mutex power_lock;
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ static void nvgpu_init_timeout(struct gk20a *g)
|
|||||||
g->gr_idle_timeout_default = (u32)ULONG_MAX;
|
g->gr_idle_timeout_default = (u32)ULONG_MAX;
|
||||||
}
|
}
|
||||||
g->ch_wdt_init_limit_ms = platform->ch_wdt_init_limit_ms;
|
g->ch_wdt_init_limit_ms = platform->ch_wdt_init_limit_ms;
|
||||||
g->fifo_eng_timeout_us = GRFIFO_TIMEOUT_CHECK_PERIOD_US;
|
g->ctxsw_timeout_period_ms = CTXSW_TIMEOUT_PERIOD_MS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nvgpu_init_timeslice(struct gk20a *g)
|
static void nvgpu_init_timeslice(struct gk20a *g)
|
||||||
|
|||||||
Reference in New Issue
Block a user