mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: make nvgpu_init_mutex return void
Make the nvgpu_init_mutex function return void. In linux case, this doesn't affect anything since mutex_init returns void. For posix, we assert() and die if pthread_mutex_init fails. This alleviates the need to error inject for _every_ nvgpu_mutex_init function in the driver. Jira NVGPU-3476 Change-Id: Ibc801116dc82cdfcedcba2c352785f2640b7d54f Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2130538 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
c74b89194d
commit
97762279b7
@@ -403,7 +403,6 @@ u32 nvgpu_ce_prepare_submit(u64 src_buf,
|
||||
int nvgpu_ce_init_support(struct gk20a *g)
|
||||
{
|
||||
struct nvgpu_ce_app *ce_app = g->ce_app;
|
||||
int err;
|
||||
u32 ce_reset_mask;
|
||||
|
||||
if (unlikely(ce_app == NULL)) {
|
||||
@@ -430,10 +429,7 @@ int nvgpu_ce_init_support(struct gk20a *g)
|
||||
|
||||
nvgpu_log(g, gpu_dbg_fn, "ce: init");
|
||||
|
||||
err = nvgpu_mutex_init(&ce_app->app_mutex);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
nvgpu_mutex_init(&ce_app->app_mutex);
|
||||
|
||||
nvgpu_mutex_acquire(&ce_app->app_mutex);
|
||||
|
||||
@@ -516,16 +512,10 @@ u32 nvgpu_ce_create_context(struct gk20a *g,
|
||||
return ctx_id;
|
||||
}
|
||||
|
||||
err = nvgpu_mutex_init(&ce_ctx->gpu_ctx_mutex);
|
||||
if (err != 0) {
|
||||
nvgpu_kfree(g, ce_ctx);
|
||||
return ctx_id;
|
||||
}
|
||||
nvgpu_mutex_init(&ce_ctx->gpu_ctx_mutex);
|
||||
|
||||
ce_ctx->g = g;
|
||||
|
||||
ce_ctx->cmd_buf_read_queue_offset = 0;
|
||||
|
||||
ce_ctx->vm = g->mm.ce.vm;
|
||||
|
||||
/* allocate a tsg if needed */
|
||||
|
||||
Reference in New Issue
Block a user