mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: gsp: enable gsp scheduler debug prints
Changes: - created gsp debug info mask enabled with GSP flag. - defined a macro to display gsp debug info instead of using nvgpu_log_fn. - replaced nvgpu_log_fn with gsp_dbg_info inside gsp_scheduler. NVGPU-8529 Change-Id: I98f0e470d7f056958a64579fa64c76de5691aefb Signed-off-by: vivekku <vivekku@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2727812 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
48257490be
commit
1116d90d32
@@ -39,7 +39,7 @@ static void gsp_handle_cmd_ack(struct gk20a *g, struct nv_flcn_msg_gsp *msg,
|
|||||||
{
|
{
|
||||||
bool *command_ack = param;
|
bool *command_ack = param;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
switch (msg->hdr.unit_id) {
|
switch (msg->hdr.unit_id) {
|
||||||
case NV_GSP_UNIT_NULL:
|
case NV_GSP_UNIT_NULL:
|
||||||
@@ -89,7 +89,7 @@ int nvgpu_gsp_runlist_submit(struct gk20a *g, struct nvgpu_runlist *runlist)
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
size_t tmp_size;
|
size_t tmp_size;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
(void) memset(&cmd, 0, sizeof(struct nv_flcn_cmd_gsp));
|
(void) memset(&cmd, 0, sizeof(struct nv_flcn_cmd_gsp));
|
||||||
cmd.hdr.unit_id = NV_GSP_UNIT_SUBMIT_RUNLIST;
|
cmd.hdr.unit_id = NV_GSP_UNIT_SUBMIT_RUNLIST;
|
||||||
@@ -146,7 +146,7 @@ int nvgpu_gsp_send_devices_info(struct gk20a *g)
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
size_t tmp_size;
|
size_t tmp_size;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
(void) memset(&cmd, 0, sizeof(struct nv_flcn_cmd_gsp));
|
(void) memset(&cmd, 0, sizeof(struct nv_flcn_cmd_gsp));
|
||||||
cmd.hdr.unit_id = NV_GSP_UNIT_DEVICES_INFO;
|
cmd.hdr.unit_id = NV_GSP_UNIT_DEVICES_INFO;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
static void gsp_sched_get_file_names(struct gk20a *g, struct gsp_fw *gsp_ucode)
|
static void gsp_sched_get_file_names(struct gk20a *g, struct gsp_fw *gsp_ucode)
|
||||||
{
|
{
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
gsp_ucode->code_name = GSP_DBG_RISCV_FW_CODE;
|
gsp_ucode->code_name = GSP_DBG_RISCV_FW_CODE;
|
||||||
gsp_ucode->data_name = GSP_DBG_RISCV_FW_DATA;
|
gsp_ucode->data_name = GSP_DBG_RISCV_FW_DATA;
|
||||||
@@ -46,7 +46,7 @@ void nvgpu_gsp_sched_suspend(struct gk20a *g, struct nvgpu_gsp_sched *gsp_sched)
|
|||||||
{
|
{
|
||||||
struct nvgpu_gsp *gsp = gsp_sched->gsp;
|
struct nvgpu_gsp *gsp = gsp_sched->gsp;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
if (gsp == NULL) {
|
if (gsp == NULL) {
|
||||||
nvgpu_info(g, "GSP not initialized");
|
nvgpu_info(g, "GSP not initialized");
|
||||||
@@ -69,7 +69,7 @@ void nvgpu_gsp_sched_sw_deinit(struct gk20a *g)
|
|||||||
{
|
{
|
||||||
struct nvgpu_gsp_sched *gsp_sched = g->gsp_sched;
|
struct nvgpu_gsp_sched *gsp_sched = g->gsp_sched;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
if (gsp_sched == NULL) {
|
if (gsp_sched == NULL) {
|
||||||
return;
|
return;
|
||||||
@@ -93,7 +93,7 @@ void nvgpu_gsp_sched_sw_deinit(struct gk20a *g)
|
|||||||
static int gsp_sched_wait_for_init(struct gk20a *g,
|
static int gsp_sched_wait_for_init(struct gk20a *g,
|
||||||
struct nvgpu_gsp_sched *gsp_sched, signed int timeoutms)
|
struct nvgpu_gsp_sched *gsp_sched, signed int timeoutms)
|
||||||
{
|
{
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (gsp_sched->gsp_ready) {
|
if (gsp_sched->gsp_ready) {
|
||||||
@@ -118,7 +118,7 @@ int nvgpu_gsp_sched_sw_init(struct gk20a *g)
|
|||||||
struct nvgpu_gsp_sched *gsp_sched;
|
struct nvgpu_gsp_sched *gsp_sched;
|
||||||
struct nvgpu_gsp *gsp;
|
struct nvgpu_gsp *gsp;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
if (g->gsp_sched != NULL) {
|
if (g->gsp_sched != NULL) {
|
||||||
/*
|
/*
|
||||||
@@ -161,7 +161,7 @@ int nvgpu_gsp_sched_sw_init(struct gk20a *g)
|
|||||||
goto de_init;
|
goto de_init;
|
||||||
}
|
}
|
||||||
|
|
||||||
nvgpu_log_fn(g, " Done ");
|
nvgpu_gsp_dbg(g, " Done ");
|
||||||
return err;
|
return err;
|
||||||
de_init:
|
de_init:
|
||||||
nvgpu_gsp_sched_sw_deinit(g);
|
nvgpu_gsp_sched_sw_deinit(g);
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ static int gsp_write_cmd(struct nvgpu_gsp_sched *gsp_sched,
|
|||||||
struct nvgpu_gsp *gsp = gsp_sched->gsp;
|
struct nvgpu_gsp *gsp = gsp_sched->gsp;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
nvgpu_timeout_init_cpu_timer(g, &timeout, timeout_ms);
|
nvgpu_timeout_init_cpu_timer(g, &timeout, timeout_ms);
|
||||||
|
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ int nvgpu_gsp_process_message(struct gk20a *g)
|
|||||||
bool read_msg;
|
bool read_msg;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
if (unlikely(!gsp_sched->gsp_ready)) {
|
if (unlikely(!gsp_sched->gsp_ready)) {
|
||||||
status = gsp_process_init_msg(gsp_sched, &msg);
|
status = gsp_process_init_msg(gsp_sched, &msg);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ static void gsp_sequences_init(struct gk20a *g,
|
|||||||
{
|
{
|
||||||
u16 i = 0;
|
u16 i = 0;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
(void) memset(sequences->seq, 0,
|
(void) memset(sequences->seq, 0,
|
||||||
sizeof(*sequences->seq) * GSP_MAX_NUM_SEQUENCES);
|
sizeof(*sequences->seq) * GSP_MAX_NUM_SEQUENCES);
|
||||||
@@ -52,7 +52,7 @@ int nvgpu_gsp_sequences_init(struct gk20a *g, struct nvgpu_gsp_sched *gsp_sched)
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
struct gsp_sequences *seqs;
|
struct gsp_sequences *seqs;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
seqs = (struct gsp_sequences *) nvgpu_kzalloc(g, sizeof(*seqs->seq));
|
seqs = (struct gsp_sequences *) nvgpu_kzalloc(g, sizeof(*seqs->seq));
|
||||||
if (seqs == NULL) {
|
if (seqs == NULL) {
|
||||||
@@ -95,7 +95,7 @@ int nvgpu_gsp_seq_acquire(struct gk20a *g,
|
|||||||
u32 index = 0;
|
u32 index = 0;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
nvgpu_mutex_acquire(&sequences->gsp_seq_lock);
|
nvgpu_mutex_acquire(&sequences->gsp_seq_lock);
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ int nvgpu_gsp_seq_response_handle(struct gk20a *g,
|
|||||||
{
|
{
|
||||||
struct gsp_sequence *seq;
|
struct gsp_sequence *seq;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_gsp_dbg(g, " ");
|
||||||
|
|
||||||
/* get the sequence info data associated with this message */
|
/* get the sequence info data associated with this message */
|
||||||
seq = &sequences->seq[seq_id];
|
seq = &sequences->seq[seq_id];
|
||||||
|
|||||||
@@ -24,6 +24,10 @@
|
|||||||
#define NVGPU_GSP
|
#define NVGPU_GSP
|
||||||
#include <nvgpu/lock.h>
|
#include <nvgpu/lock.h>
|
||||||
#include <nvgpu/nvgpu_mem.h>
|
#include <nvgpu/nvgpu_mem.h>
|
||||||
|
|
||||||
|
/* macro is used to log debug messages when the gpu_dbg_gsp is enabled */
|
||||||
|
#define nvgpu_gsp_dbg(g, fmt, arg...) nvgpu_log(g, gpu_dbg_gsp, fmt, ##arg)
|
||||||
|
|
||||||
struct gk20a;
|
struct gk20a;
|
||||||
struct nvgpu_gsp;
|
struct nvgpu_gsp;
|
||||||
struct nvgpu_runlist;
|
struct nvgpu_runlist;
|
||||||
|
|||||||
@@ -88,5 +88,5 @@ enum nvgpu_log_type {
|
|||||||
#define gpu_dbg_nvs BIT(45) /* NvGPU's NVS logging. */
|
#define gpu_dbg_nvs BIT(45) /* NvGPU's NVS logging. */
|
||||||
#define gpu_dbg_nvs_internal BIT(46) /* Internal NVS logging. */
|
#define gpu_dbg_nvs_internal BIT(46) /* Internal NVS logging. */
|
||||||
#endif
|
#endif
|
||||||
|
#define gpu_dbg_gsp BIT(47) /* GSP Scheduler debugging */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user