mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
video: rockchip: rga3: debugger support dump pid info
Signed-off-by: Li Huang <putin.li@rock-chips.com> Change-Id: I4ee2f64e31e33fa95ea85d0db07d55d8d3626142
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#ifndef __LINUX_RKRGA_COMMON_H_
|
||||
#define __LINUX_RKRGA_COMMON_H_
|
||||
|
||||
#include "rga_drv.h"
|
||||
|
||||
#define RGA_GET_PAGE_COUNT(size) (((size) >> PAGE_SHIFT) + (((size) & (~PAGE_MASK)) ? 1 : 0))
|
||||
|
||||
bool rga_is_rgb_format(uint32_t format);
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <linux/wait.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/sched/mm.h>
|
||||
#include <linux/string_helpers.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
@@ -210,6 +211,8 @@ struct rga_session {
|
||||
int id;
|
||||
|
||||
pid_t tgid;
|
||||
|
||||
char *pname;
|
||||
};
|
||||
|
||||
struct rga_job_buffer {
|
||||
|
||||
@@ -166,11 +166,16 @@ static int rga_version_show(struct seq_file *m, void *data)
|
||||
static int rga_load_show(struct seq_file *m, void *data)
|
||||
{
|
||||
struct rga_scheduler_t *scheduler = NULL;
|
||||
struct rga_session_manager *session_manager = NULL;
|
||||
struct rga_session *session = NULL;
|
||||
unsigned long flags;
|
||||
int id = 0;
|
||||
int i;
|
||||
int load;
|
||||
u32 busy_time_total;
|
||||
|
||||
session_manager = rga_drvdata->session_manager;
|
||||
|
||||
seq_printf(m, "num of scheduler = %d\n", rga_drvdata->num_of_scheduler);
|
||||
seq_printf(m, "================= load ==================\n");
|
||||
|
||||
@@ -193,6 +198,15 @@ static int rga_load_show(struct seq_file *m, void *data)
|
||||
seq_printf(m, "\t load = %d%%\n", load);
|
||||
seq_printf(m, "-----------------------------------\n");
|
||||
}
|
||||
|
||||
mutex_lock(&session_manager->lock);
|
||||
|
||||
idr_for_each_entry(&session_manager->ctx_id_idr, session, id)
|
||||
seq_printf(m, "\t process %d: pid = %d, name: %s\n", id,
|
||||
session->tgid, session->pname);
|
||||
|
||||
mutex_unlock(&session_manager->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "rga2_mmu_info.h"
|
||||
#include "rga_debugger.h"
|
||||
#include "rga_common.h"
|
||||
|
||||
struct rga_drvdata_t *rga_drvdata;
|
||||
|
||||
@@ -499,6 +500,7 @@ static struct rga_session *rga_session_init(void)
|
||||
mutex_unlock(&session_manager->lock);
|
||||
|
||||
session->tgid = current->tgid;
|
||||
session->pname = kstrdup_quotable_cmdline(current, GFP_KERNEL);
|
||||
|
||||
return session;
|
||||
}
|
||||
@@ -531,6 +533,8 @@ static int rga_session_deinit(struct rga_session *session)
|
||||
rga_mm_session_release_buffer(session);
|
||||
|
||||
rga_session_free_remove_idr(session);
|
||||
|
||||
kfree(session->pname);
|
||||
kfree(session);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user