mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Fetch perf change sequence script offset from SSMD
Fetch perf change sequence script offset from SSMD using member NV_PMU_SUPER_SURFACE_MEMBER_CHANGE_SEQ_GRP JIRA - NVGPU-1874 Change-Id: If2f19ee10d30552934052b9212947e408d4e7057 Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2000861 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit 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
mobile promotions
parent
9dda177510
commit
56d14ac403
@@ -34,6 +34,10 @@
|
||||
|
||||
#include "change_seq.h"
|
||||
|
||||
#define SEQ_SCRIPT_CURR 0x0U
|
||||
#define SEQ_SCRIPT_LAST 0x1U
|
||||
#define SEQ_SCRIPT_QUERY 0x2U
|
||||
|
||||
static int perf_change_seq_sw_setup_super(struct gk20a *g,
|
||||
struct change_seq *p_change_seq)
|
||||
{
|
||||
@@ -111,8 +115,10 @@ static void build_change_seq_boot (struct gk20a *g)
|
||||
nvgpu_log_fn(g, " ");
|
||||
|
||||
script_last->super_surface_offset =
|
||||
(u32) offsetof(struct nv_pmu_super_surface,
|
||||
change_seq.script_last);
|
||||
nvgpu_pmu_get_ss_member_set_offset(pmu,
|
||||
NV_PMU_SUPER_SURFACE_MEMBER_CHANGE_SEQ_GRP) +
|
||||
(u32)(sizeof(struct perf_change_seq_pmu_script) *
|
||||
SEQ_SCRIPT_LAST);
|
||||
|
||||
nvgpu_mem_rd_n(g, &pmu->super_surface_buf,
|
||||
script_last->super_surface_offset,
|
||||
@@ -211,8 +217,10 @@ int nvgpu_perf_change_seq_pmu_setup(struct gk20a *g)
|
||||
perf_change_seq_pmu->b_lock;
|
||||
|
||||
perf_change_seq_pmu->script_last.super_surface_offset =
|
||||
(u32) offsetof(struct nv_pmu_super_surface,
|
||||
change_seq.script_last);
|
||||
nvgpu_pmu_get_ss_member_set_offset(pmu,
|
||||
NV_PMU_SUPER_SURFACE_MEMBER_CHANGE_SEQ_GRP) +
|
||||
(u32)(sizeof(struct perf_change_seq_pmu_script) *
|
||||
SEQ_SCRIPT_LAST);
|
||||
|
||||
nvgpu_mem_rd_n(g, &pmu->super_surface_buf,
|
||||
perf_change_seq_pmu->script_last.super_surface_offset,
|
||||
|
||||
Reference in New Issue
Block a user