video: driver: buffer tracing changes
1. Introduce new v4l2 control to get HAL session id and print the same in driver to have unqiue session id between HAL and driver 2. Copy input buffer timestamp into input meta buffer to track input meta buffer done at HAL side. Required specially for fence use case. Change-Id: I146b153fa0baea3b684a482de5da19e736df3736 Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
#define MIN_CHROMA_QP_OFFSET -12
|
||||
#define MAX_CHROMA_QP_OFFSET 0
|
||||
#define INVALID_FD -1
|
||||
#define INVALID_CLIENT_ID -1
|
||||
|
||||
#define DCVS_WINDOW 16
|
||||
#define ENC_FPS_WINDOW 3
|
||||
@@ -414,6 +415,7 @@ enum msm_vidc_inst_capability_type {
|
||||
MB_CYCLES_LP,
|
||||
MB_CYCLES_FW,
|
||||
MB_CYCLES_FW_VPP,
|
||||
CLIENT_ID,
|
||||
SECURE_MODE,
|
||||
FENCE_ID,
|
||||
FENCE_FD,
|
||||
|
@@ -1077,6 +1077,12 @@ static int msm_vidc_update_static_property(struct msm_vidc_inst *inst,
|
||||
/* update value to db */
|
||||
msm_vidc_update_cap_value(inst, cap_id, ctrl->val, __func__);
|
||||
|
||||
if (ctrl->id == V4L2_CID_MPEG_VIDC_CLIENT_ID) {
|
||||
rc = msm_vidc_update_debug_str(inst);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (ctrl->id == V4L2_CID_MPEG_VIDC_SECURE) {
|
||||
if (ctrl->val) {
|
||||
rc = msm_vidc_allow_secure_session(inst);
|
||||
|
@@ -112,6 +112,7 @@ static const struct msm_vidc_cap_name cap_name_arr[] = {
|
||||
{MB_CYCLES_LP, "MB_CYCLES_LP" },
|
||||
{MB_CYCLES_FW, "MB_CYCLES_FW" },
|
||||
{MB_CYCLES_FW_VPP, "MB_CYCLES_FW_VPP" },
|
||||
{CLIENT_ID, "CLIENT_ID" },
|
||||
{SECURE_MODE, "SECURE_MODE" },
|
||||
{FENCE_ID, "FENCE_ID" },
|
||||
{FENCE_FD, "FENCE_FD" },
|
||||
@@ -5859,8 +5860,8 @@ void msm_vidc_schedule_core_deinit(struct msm_vidc_core *core)
|
||||
static const char *get_codec_str(enum msm_vidc_codec_type type)
|
||||
{
|
||||
switch (type) {
|
||||
case MSM_VIDC_H264: return "h264";
|
||||
case MSM_VIDC_HEVC: return "h265";
|
||||
case MSM_VIDC_H264: return " avc";
|
||||
case MSM_VIDC_HEVC: return "hevc";
|
||||
case MSM_VIDC_VP9: return " vp9";
|
||||
case MSM_VIDC_AV1: return " av1";
|
||||
case MSM_VIDC_HEIC: return "heic";
|
||||
@@ -5872,8 +5873,8 @@ static const char *get_codec_str(enum msm_vidc_codec_type type)
|
||||
static const char *get_domain_str(enum msm_vidc_domain_type type)
|
||||
{
|
||||
switch (type) {
|
||||
case MSM_VIDC_ENCODER: return "e";
|
||||
case MSM_VIDC_DECODER: return "d";
|
||||
case MSM_VIDC_ENCODER: return "E";
|
||||
case MSM_VIDC_DECODER: return "D";
|
||||
}
|
||||
|
||||
return ".";
|
||||
@@ -5882,6 +5883,7 @@ static const char *get_domain_str(enum msm_vidc_domain_type type)
|
||||
int msm_vidc_update_debug_str(struct msm_vidc_inst *inst)
|
||||
{
|
||||
u32 sid;
|
||||
int client_id = INVALID_CLIENT_ID;
|
||||
const char *codec;
|
||||
const char *domain;
|
||||
|
||||
@@ -5889,10 +5891,20 @@ int msm_vidc_update_debug_str(struct msm_vidc_inst *inst)
|
||||
d_vpr_e("%s: Invalid params\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (inst->capabilities)
|
||||
client_id = inst->capabilities->cap[CLIENT_ID].value;
|
||||
|
||||
sid = inst->session_id;
|
||||
codec = get_codec_str(inst->codec);
|
||||
domain = get_domain_str(inst->domain);
|
||||
snprintf(inst->debug_str, sizeof(inst->debug_str), "%08x: %s%s", sid, codec, domain);
|
||||
if (client_id != INVALID_CLIENT_ID) {
|
||||
snprintf(inst->debug_str, sizeof(inst->debug_str), "%08x: %s%s_%d",
|
||||
sid, codec, domain, client_id);
|
||||
} else {
|
||||
snprintf(inst->debug_str, sizeof(inst->debug_str), "%08x: %s%s",
|
||||
sid, codec, domain);
|
||||
}
|
||||
d_vpr_h("%s: sid: %08x, codec: %s, domain: %s, final: %s\n",
|
||||
__func__, sid, codec, domain, inst->debug_str);
|
||||
|
||||
|
Reference in New Issue
Block a user