In above case, old code will generate a fault address for
uv address if 4k video input or output.
Change-Id: I22e9793fbaa2da250097ba69a3fd4fdf58585b78
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
void iep_config(iep_session *session, struct IEP_MSG *iep_msg)
{
struct iep_reg *reg = kzalloc(sizeof(struct iep_reg), GFP_KERNEL);
void iep_config(iep_session *session, struct IEP_MSG *iep_msg)
{
struct iep_reg *reg = kzalloc(sizeof(struct iep_reg), GFP_KERNEL);
reg->session = session;
iep_msg->base = reg->reg;
reg->session = session;
iep_msg->base = reg->reg;
+ /* workaround for iommu enable case when 4k video input */
+ w = (iep_msg->src.act_w + 15) & (0xfffffff0);
+ h = (iep_msg->src.act_h + 15) & (0xfffffff0);
+ if (w > 1920 && iep_msg->src.format == IEP_FORMAT_YCbCr_420_SP)
+ reg->reg[33] = reg->reg[32] + w * h;
+
+ w = (iep_msg->dst.act_w + 15) & (0xfffffff0);
+ h = (iep_msg->dst.act_h + 15) & (0xfffffff0);
+ if (w > 1920 && iep_msg->dst.format == IEP_FORMAT_YCbCr_420_SP)
+ reg->reg[45] = reg->reg[44] + w * h;
mutex_lock(&iep_service.lock);
mutex_lock(&iep_service.lock);