Files
linux-nvgpu/drivers/gpu/nvgpu/pmu_perf/change_seq.h
Mahantesh Kumbar 7672890f48 gpu:nvgpu: Add Change Sequencer
Add change sequencer for PS3.5
Add HAL to select if change sequencer is neeeded.
Add calls from pstate.c to change sequence sw and pmu setup.

JIRA NVGPU-1157

Change-Id: I0722c4bf875577ba04f56f49f21cb1a149b1d37b
Reviewed-on: https://git-master.nvidia.com/r/1929788
Signed-off-by: Vaikundanathan S <vaikuns@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1950409
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2018-11-24 00:34:04 -08:00

64 lines
2.2 KiB
C

/*
* general clock structures & definitions
*
* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef NVGPU_CHANGE_SEQ_H
#define NVGPU_CHANGE_SEQ_H
#include <nvgpu/boardobjgrpmask.h>
struct change_seq_pmu_script {
struct perf_change_seq_pmu_script buf;
u32 super_surface_offset;
};
struct change_seq {
u8 version;
bool b_enabled_pmu_support;
u32 thread_seq_id_last;
u64 thread_carry_over_timens;
struct ctrl_perf_change_seq_change last_pstate_values;
struct boardobjgrpmask_e32 clk_domains_exclusion_mask;
struct boardobjgrpmask_e32 clk_domains_inclusion_mask;
u32 client_lock_mask;
};
struct change_seq_pmu {
struct change_seq super;
bool b_lock;
bool b_vf_point_check_ignore;
u32 cpu_adverised_step_id_mask;
u32 cpu_step_id_mask;
u32 event_mask_pending;
u32 event_mask_received;
u32 last_completed_change_Seq_id;
struct change_seq_pmu_script script_curr;
struct change_seq_pmu_script script_last;
struct change_seq_pmu_script script_query;
};
int nvgpu_perf_change_seq_sw_setup(struct gk20a *g);
int nvgpu_perf_change_seq_pmu_setup(struct gk20a *g);
#endif /* NVGPU_CHANGE_SEQ_H */