mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: move cyclestats_snapshot data to struct gk20a
cyclestats_snapshot data and lock is right now stored in struct nvgpu_gr Use case itself is not specific to GR engine but in general it applies to other units outside of GR too. Hence it makes sense to move both data and lock to struct gk20a instead of keeping them in struct nvgpu_gr Update all cyclestats_snapshot code to refer data/lock from struct gk20a Remove gr_priv.h header include from cyclestats_snapshot.c Some of the functions were mistakenly declared in gr_gk20a.h. Move them to cyclestats_snapshot.h and rename them to form nvgpu_css_*() Jira NVGPU-1103 Change-Id: I3fb32fe96f0ca6613f4640c8bd227b9e0e02dca3 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2104848 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
11110465df
commit
1533951567
@@ -175,7 +175,7 @@ int gk20a_flush_cycle_stats_snapshot(struct channel_gk20a *ch)
|
||||
|
||||
nvgpu_mutex_acquire(&ch->cs_client_mutex);
|
||||
if (ch->cs_client)
|
||||
ret = gr_gk20a_css_flush(ch, ch->cs_client);
|
||||
ret = nvgpu_css_flush(ch, ch->cs_client);
|
||||
else
|
||||
ret = -EBADF;
|
||||
nvgpu_mutex_release(&ch->cs_client_mutex);
|
||||
@@ -229,7 +229,7 @@ int gk20a_attach_cycle_stats_snapshot(struct channel_gk20a *ch,
|
||||
|
||||
ch->cs_client = client;
|
||||
|
||||
ret = gr_gk20a_css_attach(ch,
|
||||
ret = nvgpu_css_attach(ch,
|
||||
perfmon_id_count,
|
||||
perfmon_id_start,
|
||||
ch->cs_client);
|
||||
@@ -262,7 +262,7 @@ int gk20a_channel_free_cycle_stats_snapshot(struct channel_gk20a *ch)
|
||||
struct gk20a_cs_snapshot_client_linux,
|
||||
cs_client);
|
||||
|
||||
ret = gr_gk20a_css_detach(ch, ch->cs_client);
|
||||
ret = nvgpu_css_detach(ch, ch->cs_client);
|
||||
|
||||
if (client_linux->dma_handler) {
|
||||
if (ch->cs_client->snapshot)
|
||||
|
||||
Reference in New Issue
Block a user