mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
IEP: re-caculate the uv address when 4k video input in iommu enable case.
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>
This commit is contained in:
committed by
Gerrit Code Review
parent
0eb015892d
commit
44a10edbee
@@ -1494,6 +1494,8 @@ static int iep_reg_address_translate(iep_service_info *pservice, struct iep_reg
|
||||
void iep_config(iep_session *session, struct IEP_MSG *iep_msg)
|
||||
{
|
||||
struct iep_reg *reg = kzalloc(sizeof(struct iep_reg), GFP_KERNEL);
|
||||
int w;
|
||||
int h;
|
||||
|
||||
reg->session = session;
|
||||
iep_msg->base = reg->reg;
|
||||
@@ -1567,6 +1569,16 @@ void iep_config(iep_session *session, struct IEP_MSG *iep_msg)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* 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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user