From 0ccb0bfc8790dffd583ec744fc4cb7d110812575 Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Mon, 26 Mar 2018 15:18:34 -0700 Subject: gpu: nvgpu: initialize ctxsw state for golden context creation If golden context creation happens before any gpu railgate then channel creation is always fine. If gpu railgate happens after gpu finalize poweon, but before golden context creation, then golden context creation is failing during first channel creation with watchdog timeout from ctxsw because of invalid ctxsw state. To Fix this issue, if the golden context is not created, then during finalize power on always query ctxsw image sizes, which is making ctxsw hw in correct state before golden context creation. Bug 2051863 Change-Id: I81d221100a099b12bad3adc2d252de4621c335a5 Signed-off-by: seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/1682265 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index ceb606e4..c6a58fec 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -2467,7 +2467,8 @@ int gr_gk20a_init_ctx_state(struct gk20a *g) }; gk20a_dbg_fn(""); - if (!g->gr.ctx_vars.golden_image_size) { + /* query ctxsw image sizes, if golden context is not created */ + if (!g->gr.ctx_vars.golden_image_initialized) { op.method.addr = gr_fecs_method_push_adr_discover_image_size_v(); op.mailbox.ret = &g->gr.ctx_vars.golden_image_size; -- cgit v1.2.2