From e15131ed0b07615e18383a2c2a1988ed79327719 Mon Sep 17 00:00:00 2001 From: Shijie Qin Date: Mon, 19 Aug 2019 10:27:29 +0800 Subject: [PATCH] MLK-22206-2 VPU Decoder: modify vpu log print method Move LVL_WARN/LVL_EVENT/LVL_INFO one bit to the left to convenient for adjust log level, and leave 4th position to reserved. Signed-off-by: Shijie Qin Reviewed-by: ming_qian --- drivers/mxc/vpu_malone/vpu_b0.c | 33 ++++++++++++++++++++++----------- drivers/mxc/vpu_malone/vpu_b0.h | 6 +++--- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/drivers/mxc/vpu_malone/vpu_b0.c b/drivers/mxc/vpu_malone/vpu_b0.c index 29ededfd40c6..9958905c6f2a 100644 --- a/drivers/mxc/vpu_malone/vpu_b0.c +++ b/drivers/mxc/vpu_malone/vpu_b0.c @@ -4176,17 +4176,28 @@ static void vpu_api_event_handler(struct vpu_ctx *ctx, u_int32 uStrIdx, u_int32 calculate_frame_size(ctx); parse_frame_interval_from_seqinfo(ctx, &ctx->seqinfo); - vpu_dbg(LVL_BIT_FLOW, "ctx[%d] SEQINFO GET: uHorRes:%d uVerRes:%d uHorDecodeRes:%d uVerDecodeRes:%d uNumDPBFrms:%d, num:%d, uNumRefFrms:%d, uNumDFEAreas:%d\n", - ctx->str_index, - ctx->seqinfo.uHorRes, ctx->seqinfo.uVerRes, - ctx->seqinfo.uHorDecodeRes, ctx->seqinfo.uVerDecodeRes, - ctx->seqinfo.uNumDPBFrms, num, ctx->seqinfo.uNumRefFrms, ctx->seqinfo.uNumDFEAreas); - vpu_dbg(LVL_BIT_FLOW, "uColorDesc = %d, uTransferChars = %d, uMatrixCoeffs = %d, uVideoFullRangeFlag = %d, uVUIPresent = %d\n", - ctx->seqinfo.uColorDesc, - ctx->seqinfo.uTransferChars, - ctx->seqinfo.uMatrixCoeffs, - ctx->seqinfo.uVideoFullRangeFlag, - ctx->seqinfo.uVUIPresent); + vpu_dbg(LVL_BIT_FLOW, + "ctx[%d] SEQINFO GET: uHorRes:%d uVerRes:%d uHorDecodeRes:%d uVerDecodeRes:%d\n", + ctx->str_index, + ctx->seqinfo.uHorRes, + ctx->seqinfo.uVerRes, + ctx->seqinfo.uHorDecodeRes, + ctx->seqinfo.uVerDecodeRes); + vpu_dbg(LVL_BIT_FLOW, + "ctx[%d] SEQINFO GET: uNumDPBFrms:%d, num:%d, uNumRefFrms:%d, uNumDFEAreas:%d, scan lines: %s\n", + ctx->str_index, + ctx->seqinfo.uNumDPBFrms, + num, + ctx->seqinfo.uNumRefFrms, + ctx->seqinfo.uNumDFEAreas, + ctx->seqinfo.uProgressive ? "progressive" : "interlaced"); + vpu_dbg(LVL_BIT_FLOW, + "uColorDesc = %d, uTransferChars = %d, uMatrixCoeffs = %d, uVideoFullRangeFlag = %d, uVUIPresent = %d\n", + ctx->seqinfo.uColorDesc, + ctx->seqinfo.uTransferChars, + ctx->seqinfo.uMatrixCoeffs, + ctx->seqinfo.uVideoFullRangeFlag, + ctx->seqinfo.uVUIPresent); ctx->mbi_size = get_mbi_size(&ctx->q_data[V4L2_DST]); if (ctx->b_firstseq) { down(&ctx->q_data[V4L2_DST].drv_q_lock); diff --git a/drivers/mxc/vpu_malone/vpu_b0.h b/drivers/mxc/vpu_malone/vpu_b0.h index 1e472408d63a..8e6acb269975 100644 --- a/drivers/mxc/vpu_malone/vpu_b0.h +++ b/drivers/mxc/vpu_malone/vpu_b0.h @@ -408,9 +408,9 @@ struct vpu_ctx { u_int64 last_ready_time; }; -#define LVL_WARN (1 << 1) -#define LVL_EVENT (1 << 2) -#define LVL_INFO (1 << 3) +#define LVL_WARN (1 << 0) +#define LVL_EVENT (1 << 1) +#define LVL_INFO (1 << 2) #define LVL_BIT_CMD (1 << 4) #define LVL_BIT_EVT (1 << 5) #define LVL_BIT_TS (1 << 6) -- 2.17.1