mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: cde: cancel delayed_work during suspend
During gpu suspend, cancel all pending delayed cde work to avoid issues of scheduling this delayed work during suspend/resume when gpu is not ready. Bug 1574000 Change-Id: I2b6bfa489435a781dc576a077f9af01b1e1628ce Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/593557 Reviewed-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com> Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
c3661adef8
commit
797e4dd319
@@ -144,6 +144,26 @@ void gk20a_cde_destroy(struct gk20a *g)
|
||||
mutex_unlock(&cde_app->mutex);
|
||||
}
|
||||
|
||||
void gk20a_cde_suspend(struct gk20a *g)
|
||||
{
|
||||
|
||||
struct gk20a_cde_app *cde_app = &g->cde_app;
|
||||
struct gk20a_cde_ctx *cde_ctx, *cde_ctx_save;
|
||||
|
||||
if (!cde_app->initialised)
|
||||
return;
|
||||
|
||||
list_for_each_entry_safe(cde_ctx, cde_ctx_save,
|
||||
&cde_app->cde_ctx_lru, list) {
|
||||
if (cde_ctx->is_temporary) {
|
||||
mutex_lock(&cde_app->mutex);
|
||||
cancel_delayed_work(&cde_ctx->ctx_deleter_work);
|
||||
mutex_unlock(&cde_app->mutex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static int gk20a_cde_allocate_contexts(struct gk20a *g)
|
||||
{
|
||||
struct gk20a_cde_app *cde_app = &g->cde_app;
|
||||
|
||||
@@ -262,6 +262,7 @@ struct gk20a_cde_app {
|
||||
};
|
||||
|
||||
void gk20a_cde_destroy(struct gk20a *g);
|
||||
void gk20a_cde_suspend(struct gk20a *g);
|
||||
int gk20a_init_cde_support(struct gk20a *g);
|
||||
int gk20a_cde_reload(struct gk20a *g);
|
||||
int gk20a_cde_convert(struct gk20a *g, struct dma_buf *dst,
|
||||
|
||||
@@ -679,6 +679,9 @@ static int gk20a_pm_prepare_poweroff(struct device *dev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* cancel any pending cde work */
|
||||
gk20a_cde_suspend(g);
|
||||
|
||||
/*
|
||||
* After this point, gk20a interrupts should not get
|
||||
* serviced.
|
||||
|
||||
Reference in New Issue
Block a user