mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
video: rockchip: mpp: Fix for !CONFIG_ROCKCHIP_SIP or CONFIG_ROCKCHIP_SIP=m
1. Fix following warning:
drivers/video/rockchip/mpp/mpp_rkvdec.c:1672:21: warning: unused variable 'dec' [-Wunused-variable]
struct rkvdec_dev *dec = to_rkvdec_dev(mpp);
^
2. Use IS_REACHABLE instead of IS_ENABLED.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I13ce1e51af12b4041790e8854429be45cd3042ed
This commit is contained in:
@@ -1669,18 +1669,18 @@ static int rkvdec_reset(struct mpp_dev *mpp)
|
||||
|
||||
static int rkvdec_sip_reset(struct mpp_dev *mpp)
|
||||
{
|
||||
struct rkvdec_dev *dec = to_rkvdec_dev(mpp);
|
||||
if (IS_REACHABLE(CONFIG_ROCKCHIP_SIP)) {
|
||||
/* The reset flow in arm trustzone firmware */
|
||||
struct rkvdec_dev *dec = to_rkvdec_dev(mpp);
|
||||
|
||||
/* The reset flow in arm trustzone firmware */
|
||||
#if IS_ENABLED(CONFIG_ROCKCHIP_SIP)
|
||||
mutex_lock(&dec->sip_reset_lock);
|
||||
sip_smc_vpu_reset(0, 0, 0);
|
||||
mutex_unlock(&dec->sip_reset_lock);
|
||||
mutex_lock(&dec->sip_reset_lock);
|
||||
sip_smc_vpu_reset(0, 0, 0);
|
||||
mutex_unlock(&dec->sip_reset_lock);
|
||||
|
||||
return 0;
|
||||
#else
|
||||
return rkvdec_reset(mpp);
|
||||
#endif
|
||||
return 0;
|
||||
} else {
|
||||
return rkvdec_reset(mpp);
|
||||
}
|
||||
}
|
||||
|
||||
static struct mpp_hw_ops rkvdec_v1_hw_ops = {
|
||||
|
||||
@@ -1752,14 +1752,14 @@ static int rkvdec2_soft_ccu_reset(struct mpp_taskqueue *queue,
|
||||
if (!(val & RKVDEC_BIT_BUS_IDLE))
|
||||
mpp_err("bus busy\n");
|
||||
|
||||
#if IS_ENABLED(CONFIG_ROCKCHIP_SIP)
|
||||
/* sip reset */
|
||||
rockchip_dmcfreq_lock();
|
||||
sip_smc_vpu_reset(i, 0, 0);
|
||||
rockchip_dmcfreq_unlock();
|
||||
#else
|
||||
rkvdec2_reset(mpp);
|
||||
#endif
|
||||
if (IS_REACHABLE(CONFIG_ROCKCHIP_SIP)) {
|
||||
/* sip reset */
|
||||
rockchip_dmcfreq_lock();
|
||||
sip_smc_vpu_reset(i, 0, 0);
|
||||
rockchip_dmcfreq_unlock();
|
||||
} else {
|
||||
rkvdec2_reset(mpp);
|
||||
}
|
||||
/* clear error mask */
|
||||
writel(dec->core_mask & RKVDEC_CCU_CORE_RW_MASK,
|
||||
ccu->reg_base + RKVDEC_CCU_CORE_ERR_BASE);
|
||||
|
||||
Reference in New Issue
Block a user