/* * DT_ID is a two bit bitfield that is concatenated with * the four least significant bits of the five bit VC * bitfield to generate an internal CID value. * * CSID_RDI_CFG0(vc) * DT_ID : 28:27 * VC : 26:22 * DT : 21:16 * * CID : VC 3:0 << 2 | DT_ID 1:0
*/
u8 dt_id = vc & 0x03;
val = RDI_CFG0_TIMESTAMP_EN;
val |= RDI_CFG0_TIMESTAMP_STB_SEL; /* note: for non-RDI path, this should be format->decode_format */
val |= DECODE_FORMAT_PAYLOAD_ONLY << RDI_CFG0_DECODE_FORMAT;
val |= vc << RDI_CFG0_VC;
val |= format->data_type << RDI_CFG0_DT;
val |= dt_id << RDI_CFG0_DT_ID;
writel(val, csid->base + CSID_RDI_CFG0(vc));
val = RDI_CFG1_PACKING_FORMAT_MIPI;
val |= RDI_CFG1_PIX_STORE;
val |= RDI_CFG1_DROP_H_EN;
val |= RDI_CFG1_DROP_V_EN;
val |= RDI_CFG1_CROP_H_EN;
val |= RDI_CFG1_CROP_V_EN;
writel(val, csid->base + CSID_RDI_CFG1(vc));
val = 0;
writel(val, csid->base + CSID_RDI_IRQ_SUBSAMPLE_PERIOD(vc));
val = 1;
writel(val, csid->base + CSID_RDI_IRQ_SUBSAMPLE_PATTERN(vc));
val = 0;
writel(val, csid->base + CSID_RDI_CTRL(vc));
val = readl(csid->base + CSID_RDI_CFG0(vc));
if (enable)
val |= RDI_CFG0_EN;
writel(val, csid->base + CSID_RDI_CFG0(vc));
}
/* Loop through all enabled VCs and configure stream for each */ for (i = 0; i < MSM_CSID_MAX_SRC_STREAMS; i++) if (csid->phy.en_vc & BIT(i)) {
__csid_configure_rdi_stream(csid, enable, i);
__csid_configure_rx(csid, &csid->phy, i);
__csid_ctrl_rdi(csid, enable, i);
}
}
/* Read and clear IRQ status for each enabled RDI channel */ for (i = 0; i < MSM_CSID_MAX_SRC_STREAMS; i++) if (csid->phy.en_vc & BIT(i)) {
val = readl(csid->base + CSID_CSI2_RDIN_IRQ_STATUS(i));
writel(val, csid->base + CSID_CSI2_RDIN_IRQ_CLEAR(i));
if (val & RUP_DONE_IRQ_STATUS) /* clear the reg update bit */
csid_subdev_reg_update(csid, i, true);
if (buf_done_val & BIT(BUF_DONE_IRQ_STATUS_RDI_OFFSET + i)) { /* * For Titan 780, bus done and RUP IRQ have been moved to * CSID from VFE. Once CSID received bus done, need notify * VFE of this event. Trigger VFE to handle bus done process.
*/
camss_buf_done(csid->camss, csid->id, i);
}
}
val = IRQ_CMD_CLEAR;
writel(val, csid->base + CSID_IRQ_CMD);
if (reset_done)
complete(&csid->reset_complete);
return IRQ_HANDLED;
}
/* * csid_reset - Trigger reset on CSID module and wait to complete * @csid: CSID device * * Return 0 on success or a negative error code otherwise
*/ staticint csid_reset(struct csid_device *csid)
{ unsignedlong time;
u32 val; int i;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.