mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: remove dead code for get gr runlist_id
nvgpu_engine_get_gr_runlist_id gets the first instance of active GR engine using nvgpu_engine_get_ids. Therefore the engine_id is already known to be valid. Remove call to nvgpu_engine_get_active_eng_info (which iterates all engines), and fetch f->engine_info[engine_id] instead. Also remove non-NULL test for engine_info, which could not be true. Jira NVGPU-4511 Change-Id: Ifcc0851e3d14d862e2ed7b21ea57f17a66eca9dd Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2263617 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
ca17622b7e
commit
2088dc5d85
@@ -661,6 +661,7 @@ u32 nvgpu_engine_get_fast_ce_runlist_id(struct gk20a *g)
|
||||
|
||||
u32 nvgpu_engine_get_gr_runlist_id(struct gk20a *g)
|
||||
{
|
||||
struct nvgpu_fifo *f = &g->fifo;
|
||||
u32 gr_engine_cnt = 0;
|
||||
u32 gr_engine_id = NVGPU_INVALID_ENG_ID;
|
||||
struct nvgpu_engine_info *engine_info;
|
||||
@@ -676,15 +677,8 @@ u32 nvgpu_engine_get_gr_runlist_id(struct gk20a *g)
|
||||
goto end;
|
||||
}
|
||||
|
||||
engine_info = nvgpu_engine_get_active_eng_info(g, gr_engine_id);
|
||||
|
||||
if (engine_info != NULL) {
|
||||
gr_runlist_id = engine_info->runlist_id;
|
||||
} else {
|
||||
nvgpu_err(g,
|
||||
"gr_engine_id: %d is not in active list/invalid",
|
||||
gr_engine_id);
|
||||
}
|
||||
engine_info = &f->engine_info[gr_engine_id];
|
||||
gr_runlist_id = engine_info->runlist_id;
|
||||
|
||||
end:
|
||||
return gr_runlist_id;
|
||||
|
||||
Reference in New Issue
Block a user