From b4c63fdbc21a0963e0a32d8e42dbadcd46629f58 Mon Sep 17 00:00:00 2001 From: Herman Chen Date: Fri, 10 Dec 2021 11:12:07 +0800 Subject: [PATCH] video: rockchip: mpp: rkvdec2: change irq print The rkvdec2 link mode irq print should print both link status and core status. Signed-off-by: Herman Chen Change-Id: I2fffc0935260e6f3dcb788dffc1a467e6be5a7cb --- drivers/video/rockchip/mpp/mpp_debug.h | 6 +++--- drivers/video/rockchip/mpp/mpp_rkvdec2_link.c | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/video/rockchip/mpp/mpp_debug.h b/drivers/video/rockchip/mpp/mpp_debug.h index 6d49fb758524..9e42adfe1571 100644 --- a/drivers/video/rockchip/mpp/mpp_debug.h +++ b/drivers/video/rockchip/mpp/mpp_debug.h @@ -56,18 +56,18 @@ extern unsigned int mpp_dev_debug; #define mpp_debug_unlikely(type) \ - (unlikely(mpp_dev_debug & type)) + (unlikely(mpp_dev_debug & (type))) #define mpp_debug_func(type, fmt, args...) \ do { \ - if (unlikely(mpp_dev_debug & type)) { \ + if (unlikely(mpp_dev_debug & (type))) { \ pr_info("%s:%d: " fmt, \ __func__, __LINE__, ##args); \ } \ } while (0) #define mpp_debug(type, fmt, args...) \ do { \ - if (unlikely(mpp_dev_debug & type)) { \ + if (unlikely(mpp_dev_debug & (type))) { \ pr_info(fmt, ##args); \ } \ } while (0) diff --git a/drivers/video/rockchip/mpp/mpp_rkvdec2_link.c b/drivers/video/rockchip/mpp/mpp_rkvdec2_link.c index ffff22b7a07b..d113df287835 100644 --- a/drivers/video/rockchip/mpp/mpp_rkvdec2_link.c +++ b/drivers/video/rockchip/mpp/mpp_rkvdec2_link.c @@ -694,9 +694,6 @@ static int rkvdec2_link_irq(struct mpp_dev *mpp) irq_status = readl(link_dec->reg_base + RKVDEC_LINK_IRQ_BASE); - mpp_debug(DEBUG_IRQ_STATUS, "irq_status: %08x\n", irq_status); - mpp_dbg_link_flow("link irq %08x\n", irq_status); - if (irq_status & RKVDEC_LINK_BIT_IRQ_RAW) { u32 enabled = readl(link_dec->reg_base + RKVDEC_LINK_EN_BASE); @@ -710,11 +707,13 @@ static int rkvdec2_link_irq(struct mpp_dev *mpp) link_dec->irq_status = irq_status; mpp->irq_status = mpp_read_relaxed(mpp, RKVDEC_REG_INT_EN); - mpp_dbg_link_flow("core irq %08x\n", mpp->irq_status); writel_relaxed(0, link_dec->reg_base + RKVDEC_LINK_IRQ_BASE); } + mpp_debug(DEBUG_IRQ_STATUS | DEBUG_LINK_TABLE, "irq_status: %08x : %08x\n", + irq_status, mpp->irq_status); + return 0; }