mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: fix patch write error check in update_ctxsw_preemption_mode
Don't attempt to access memory if the patch context can't be mapped, but print an error message instead. Change-Id: I374dc94d13674e0bd9d081b790f7c0dac834e868 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1157828 GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Deepak Nibade
parent
4e321eb1c8
commit
11e9ba82de
@@ -1118,6 +1118,11 @@ static void gr_gp10b_update_ctxsw_preemption_mode(struct gk20a *g,
|
||||
gr_ctx->t18x.preempt_ctxsw_buffer.gpu_va >> 8);
|
||||
|
||||
err = gr_gk20a_ctx_patch_write_begin(g, ch_ctx);
|
||||
if (err) {
|
||||
gk20a_err(dev_from_gk20a(g),
|
||||
"can't map patch context");
|
||||
goto out;
|
||||
}
|
||||
|
||||
addr = (u64_lo32(gr_ctx->t18x.betacb_ctxsw_buffer.gpu_va) >>
|
||||
gr_gpcs_setup_attrib_cb_base_addr_39_12_align_bits_v()) |
|
||||
@@ -1169,6 +1174,7 @@ static void gr_gp10b_update_ctxsw_preemption_mode(struct gk20a *g,
|
||||
gr_gk20a_ctx_patch_write_end(g, ch_ctx);
|
||||
}
|
||||
|
||||
out:
|
||||
gk20a_dbg_fn("done");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user