mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: move fifo init/deinit code to common
Add fifo sub-unit to common.fifo to handle init/deinit code and global support functions. Split init into: - nvgpu_channel_setup_sw - nvgpu_tsg_setup_sw - nvgpu_fifo_setup_sw - nvgpu_runlist_setup_sw - nvgpu_engine_setup_sw - nvgpu_userd_setup_sw - nvgpu_pbdma_setup_sw Split de-init into - nvgpu_channel_cleanup_sw - nvgpu_tsg_cleanup_sw - nvgpu_fifo_cleanup_sw - nvgpu_runlist_cleanup_sw - nvgpu_engine_cleanup_sw - nvgpu_userd_cleanup_sw - nvgpu_pbdma_cleanup_sw Added the following HALs - runlist.length_max - fifo.init_pbdma_info - fifo.userd_entry_size Last 2 HALs should be moved resp. to pbdma and userd sub-units, when available. Added vgpu implementation of above hals - vgpu_runlist_length_max - vgpu_userd_entry_size - vgpu_channel_count Use hals in vgpu_fifo_setup_sw. Jira NVGPU-1306 Change-Id: I954f56be724eee280d7b5f171b1790d33c810470 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2029620 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
f087ec0826
commit
ffed5095db
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -90,8 +90,8 @@ struct nvgpu_channel_linux {
|
||||
};
|
||||
|
||||
u32 nvgpu_submit_gpfifo_user_flags_to_common_flags(u32 user_flags);
|
||||
int nvgpu_init_channel_support_linux(struct nvgpu_os_linux *l);
|
||||
void nvgpu_remove_channel_support_linux(struct nvgpu_os_linux *l);
|
||||
int nvgpu_channel_init_support_linux(struct nvgpu_os_linux *l);
|
||||
void nvgpu_channel_remove_support_linux(struct nvgpu_os_linux *l);
|
||||
|
||||
struct channel_gk20a *gk20a_open_new_channel_with_cb(struct gk20a *g,
|
||||
void (*update_fn)(struct channel_gk20a *, void *),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2018, NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2017-2019, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -526,7 +526,7 @@ free_gpfifo:
|
||||
return err;
|
||||
}
|
||||
|
||||
int nvgpu_init_channel_support_linux(struct nvgpu_os_linux *l)
|
||||
int nvgpu_channel_init_support_linux(struct nvgpu_os_linux *l)
|
||||
{
|
||||
struct gk20a *g = &l->g;
|
||||
struct fifo_gk20a *f = &g->fifo;
|
||||
@@ -577,7 +577,7 @@ err_clean:
|
||||
return err;
|
||||
}
|
||||
|
||||
void nvgpu_remove_channel_support_linux(struct nvgpu_os_linux *l)
|
||||
void nvgpu_channel_remove_support_linux(struct nvgpu_os_linux *l)
|
||||
{
|
||||
struct gk20a *g = &l->g;
|
||||
struct fifo_gk20a *f = &g->fifo;
|
||||
|
||||
@@ -204,7 +204,7 @@ int nvgpu_finalize_poweron_linux(struct nvgpu_os_linux *l)
|
||||
if (l->init_done)
|
||||
return 0;
|
||||
|
||||
err = nvgpu_init_channel_support_linux(l);
|
||||
err = nvgpu_channel_init_support_linux(l);
|
||||
if (err) {
|
||||
nvgpu_err(g, "failed to init linux channel support");
|
||||
return err;
|
||||
@@ -751,7 +751,7 @@ void gk20a_remove_support(struct gk20a *g)
|
||||
|
||||
nvgpu_kfree(g, g->dbg_regops_tmp_buf);
|
||||
|
||||
nvgpu_remove_channel_support_linux(l);
|
||||
nvgpu_channel_remove_support_linux(l);
|
||||
|
||||
if (g->pmu.remove_support)
|
||||
g->pmu.remove_support(&g->pmu);
|
||||
|
||||
Reference in New Issue
Block a user