void ipc_setmode_and_imgsize(ipc_source ipc_src, ipc_destination ipc_dst, ipc_controlvariable ipc_convar) { u32 v_ratio, h_ratio; ipc_field_id_control(IPC_BOTTOM_FIELD); ipc_field_id_mode(CAM_FIELD_SIG, AUTO); ipc_2d_enable(ipc_convar.modeval); // Enalbed : 2D IPC , Disabled : Horizon Double Scailing writel(S3C_IPC_SRC_WIDTH_SET(ipc_src.srchsz), s3c_ipc->regs + S3C_IPC_SRC_WIDTH); writel(S3C_IPC_SRC_HEIGHT_SET(ipc_src.srcvsz), s3c_ipc->regs + S3C_IPC_SRC_HEIGHT); writel(S3C_IPC_DST_WIDTH_SET(ipc_dst.dsthsz), s3c_ipc->regs + S3C_IPC_DST_WIDTH); writel(S3C_IPC_DST_HEIGHT_SET(ipc_dst.dstvsz), s3c_ipc->regs + S3C_IPC_DST_HEIGHT); if (1 == ipc_convar.modeval) h_ratio = IPC_2D_ENABLE; else h_ratio = IPC_HOR_SCALING_ENABLE; writel(h_ratio, s3c_ipc->regs + S3C_IPC_H_RATIO); v_ratio = IPC_2D_ENABLE; writel(v_ratio, s3c_ipc->regs + S3C_IPC_V_RATIO); shadow_update(); }
void ipc_set_mode(struct ipc_controlvariable con_var) { u32 cfg = 0; /* Enalbed : 2D IPC , Disabled : Horizon Double Scailing */ ipc_field_id_control(IPC_BOTTOM_FIELD); ipc_field_id_mode(CAM_FIELD_SIG, AUTO); ipc_2d_enable(con_var.modeval); if (con_var.modeval == IPC_2D) cfg = IPC_2D_ENABLE; else cfg = IPC_HOR_SCALING_ENABLE; writel(cfg, ipc->regs + S3C_IPC_H_RATIO); cfg = IPC_2D_ENABLE; writel(cfg, ipc->regs + S3C_IPC_V_RATIO); shadow_update(); }