Lines Matching full:cfg
141 u32 cfg; in fimc_sw_reset() local
144 cfg = fimc_read(ctx, EXYNOS_CISTATUS); in fimc_sw_reset()
145 if (EXYNOS_CISTATUS_GET_ENVID_STATUS(cfg)) in fimc_sw_reset()
166 u32 cfg; in fimc_set_type_ctrl() local
168 cfg = fimc_read(ctx, EXYNOS_CIGCTRL); in fimc_set_type_ctrl()
169 cfg &= ~(EXYNOS_CIGCTRL_TESTPATTERN_MASK | in fimc_set_type_ctrl()
176 cfg |= (EXYNOS_CIGCTRL_SELCAM_ITU_A | in fimc_set_type_ctrl()
181 fimc_write(ctx, cfg, EXYNOS_CIGCTRL); in fimc_set_type_ctrl()
186 u32 cfg; in fimc_handle_jpeg() local
190 cfg = fimc_read(ctx, EXYNOS_CIGCTRL); in fimc_handle_jpeg()
192 cfg |= EXYNOS_CIGCTRL_CAM_JPEG; in fimc_handle_jpeg()
194 cfg &= ~EXYNOS_CIGCTRL_CAM_JPEG; in fimc_handle_jpeg()
196 fimc_write(ctx, cfg, EXYNOS_CIGCTRL); in fimc_handle_jpeg()
201 u32 cfg; in fimc_mask_irq() local
205 cfg = fimc_read(ctx, EXYNOS_CIGCTRL); in fimc_mask_irq()
207 cfg &= ~EXYNOS_CIGCTRL_IRQ_OVFEN; in fimc_mask_irq()
208 cfg |= EXYNOS_CIGCTRL_IRQ_ENABLE | EXYNOS_CIGCTRL_IRQ_LEVEL; in fimc_mask_irq()
210 cfg &= ~EXYNOS_CIGCTRL_IRQ_ENABLE; in fimc_mask_irq()
211 fimc_write(ctx, cfg, EXYNOS_CIGCTRL); in fimc_mask_irq()
245 u32 cfg; in fimc_check_frame_end() local
247 cfg = fimc_read(ctx, EXYNOS_CISTATUS); in fimc_check_frame_end()
249 DRM_DEV_DEBUG_KMS(ctx->dev, "cfg[0x%x]\n", cfg); in fimc_check_frame_end()
251 if (!(cfg & EXYNOS_CISTATUS_FRAMEEND)) in fimc_check_frame_end()
254 cfg &= ~(EXYNOS_CISTATUS_FRAMEEND); in fimc_check_frame_end()
255 fimc_write(ctx, cfg, EXYNOS_CISTATUS); in fimc_check_frame_end()
262 u32 cfg; in fimc_get_buf_id() local
265 cfg = fimc_read(ctx, EXYNOS_CISTATUS2); in fimc_get_buf_id()
266 frame_cnt = EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg); in fimc_get_buf_id()
269 frame_cnt = EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg); in fimc_get_buf_id()
272 EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg), in fimc_get_buf_id()
273 EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg)); in fimc_get_buf_id()
288 u32 cfg; in fimc_handle_lastend() local
292 cfg = fimc_read(ctx, EXYNOS_CIOCTRL); in fimc_handle_lastend()
294 cfg |= EXYNOS_CIOCTRL_LASTENDEN; in fimc_handle_lastend()
296 cfg &= ~EXYNOS_CIOCTRL_LASTENDEN; in fimc_handle_lastend()
298 fimc_write(ctx, cfg, EXYNOS_CIOCTRL); in fimc_handle_lastend()
303 u32 cfg; in fimc_src_set_fmt_order() local
308 cfg = fimc_read(ctx, EXYNOS_CISCCTRL); in fimc_src_set_fmt_order()
309 cfg &= ~EXYNOS_CISCCTRL_INRGB_FMT_RGB_MASK; in fimc_src_set_fmt_order()
313 cfg |= EXYNOS_CISCCTRL_INRGB_FMT_RGB565; in fimc_src_set_fmt_order()
314 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_src_set_fmt_order()
318 cfg |= EXYNOS_CISCCTRL_INRGB_FMT_RGB888; in fimc_src_set_fmt_order()
319 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_src_set_fmt_order()
327 cfg = fimc_read(ctx, EXYNOS_MSCTRL); in fimc_src_set_fmt_order()
328 cfg &= ~(EXYNOS_MSCTRL_ORDER2P_SHIFT_MASK | in fimc_src_set_fmt_order()
334 cfg |= EXYNOS_MSCTRL_ORDER422_YCBYCR; in fimc_src_set_fmt_order()
337 cfg |= EXYNOS_MSCTRL_ORDER422_YCRYCB; in fimc_src_set_fmt_order()
340 cfg |= EXYNOS_MSCTRL_ORDER422_CBYCRY; in fimc_src_set_fmt_order()
344 cfg |= EXYNOS_MSCTRL_ORDER422_CRYCBY; in fimc_src_set_fmt_order()
348 cfg |= (EXYNOS_MSCTRL_ORDER2P_LSB_CRCB | in fimc_src_set_fmt_order()
354 cfg |= EXYNOS_MSCTRL_C_INT_IN_3PLANE; in fimc_src_set_fmt_order()
358 cfg |= (EXYNOS_MSCTRL_ORDER2P_LSB_CBCR | in fimc_src_set_fmt_order()
363 fimc_write(ctx, cfg, EXYNOS_MSCTRL); in fimc_src_set_fmt_order()
368 u32 cfg; in fimc_src_set_fmt() local
372 cfg = fimc_read(ctx, EXYNOS_MSCTRL); in fimc_src_set_fmt()
373 cfg &= ~EXYNOS_MSCTRL_INFORMAT_RGB; in fimc_src_set_fmt()
379 cfg |= EXYNOS_MSCTRL_INFORMAT_RGB; in fimc_src_set_fmt()
382 cfg |= EXYNOS_MSCTRL_INFORMAT_YCBCR420; in fimc_src_set_fmt()
388 cfg |= EXYNOS_MSCTRL_INFORMAT_YCBCR422_1PLANE; in fimc_src_set_fmt()
393 cfg |= EXYNOS_MSCTRL_INFORMAT_YCBCR422; in fimc_src_set_fmt()
399 cfg |= EXYNOS_MSCTRL_INFORMAT_YCBCR420; in fimc_src_set_fmt()
403 fimc_write(ctx, cfg, EXYNOS_MSCTRL); in fimc_src_set_fmt()
405 cfg = fimc_read(ctx, EXYNOS_CIDMAPARAM); in fimc_src_set_fmt()
406 cfg &= ~EXYNOS_CIDMAPARAM_R_MODE_MASK; in fimc_src_set_fmt()
409 cfg |= EXYNOS_CIDMAPARAM_R_MODE_64X32; in fimc_src_set_fmt()
411 cfg |= EXYNOS_CIDMAPARAM_R_MODE_LINEAR; in fimc_src_set_fmt()
413 fimc_write(ctx, cfg, EXYNOS_CIDMAPARAM); in fimc_src_set_fmt()
473 u32 cfg, h1, h2, v1, v2; in fimc_set_window() local
491 cfg = fimc_read(ctx, EXYNOS_CIWDOFST); in fimc_set_window()
492 cfg &= ~(EXYNOS_CIWDOFST_WINHOROFST_MASK | in fimc_set_window()
494 cfg |= (EXYNOS_CIWDOFST_WINHOROFST(h1) | in fimc_set_window()
496 cfg |= EXYNOS_CIWDOFST_WINOFSEN; in fimc_set_window()
497 fimc_write(ctx, cfg, EXYNOS_CIWDOFST); in fimc_set_window()
499 cfg = (EXYNOS_CIWDOFST2_WINHOROFST2(h2) | in fimc_set_window()
501 fimc_write(ctx, cfg, EXYNOS_CIWDOFST2); in fimc_set_window()
508 u32 cfg; in fimc_src_set_size() local
514 cfg = (EXYNOS_ORGISIZE_HORIZONTAL(real_width) | in fimc_src_set_size()
517 fimc_write(ctx, cfg, EXYNOS_ORGISIZE); in fimc_src_set_size()
523 cfg = fimc_read(ctx, EXYNOS_CIREAL_ISIZE); in fimc_src_set_size()
524 cfg &= ~(EXYNOS_CIREAL_ISIZE_HEIGHT_MASK | in fimc_src_set_size()
526 cfg |= (EXYNOS_CIREAL_ISIZE_WIDTH(buf->rect.w) | in fimc_src_set_size()
528 fimc_write(ctx, cfg, EXYNOS_CIREAL_ISIZE); in fimc_src_set_size()
534 cfg = (EXYNOS_CISRCFMT_ITU601_8BIT | in fimc_src_set_size()
537 fimc_write(ctx, cfg, EXYNOS_CISRCFMT); in fimc_src_set_size()
540 cfg = (EXYNOS_CIIYOFF_HORIZONTAL(buf->rect.x) | in fimc_src_set_size()
542 fimc_write(ctx, cfg, EXYNOS_CIIYOFF); in fimc_src_set_size()
543 cfg = (EXYNOS_CIICBOFF_HORIZONTAL(buf->rect.x) | in fimc_src_set_size()
545 fimc_write(ctx, cfg, EXYNOS_CIICBOFF); in fimc_src_set_size()
546 cfg = (EXYNOS_CIICROFF_HORIZONTAL(buf->rect.x) | in fimc_src_set_size()
548 fimc_write(ctx, cfg, EXYNOS_CIICROFF); in fimc_src_set_size()
563 u32 cfg; in fimc_dst_set_fmt_order() local
568 cfg = fimc_read(ctx, EXYNOS_CISCCTRL); in fimc_dst_set_fmt_order()
569 cfg &= ~EXYNOS_CISCCTRL_OUTRGB_FMT_RGB_MASK; in fimc_dst_set_fmt_order()
573 cfg |= EXYNOS_CISCCTRL_OUTRGB_FMT_RGB565; in fimc_dst_set_fmt_order()
574 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_dst_set_fmt_order()
577 cfg |= EXYNOS_CISCCTRL_OUTRGB_FMT_RGB888; in fimc_dst_set_fmt_order()
578 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_dst_set_fmt_order()
581 cfg |= (EXYNOS_CISCCTRL_OUTRGB_FMT_RGB888 | in fimc_dst_set_fmt_order()
583 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_dst_set_fmt_order()
591 cfg = fimc_read(ctx, EXYNOS_CIOCTRL); in fimc_dst_set_fmt_order()
592 cfg &= ~(EXYNOS_CIOCTRL_ORDER2P_MASK | in fimc_dst_set_fmt_order()
598 cfg |= EXYNOS_CIOCTRL_ALPHA_OUT; in fimc_dst_set_fmt_order()
601 cfg |= EXYNOS_CIOCTRL_ORDER422_YCBYCR; in fimc_dst_set_fmt_order()
604 cfg |= EXYNOS_CIOCTRL_ORDER422_YCRYCB; in fimc_dst_set_fmt_order()
607 cfg |= EXYNOS_CIOCTRL_ORDER422_CBYCRY; in fimc_dst_set_fmt_order()
610 cfg |= EXYNOS_CIOCTRL_ORDER422_CRYCBY; in fimc_dst_set_fmt_order()
614 cfg |= EXYNOS_CIOCTRL_ORDER2P_LSB_CRCB; in fimc_dst_set_fmt_order()
615 cfg |= EXYNOS_CIOCTRL_YCBCR_2PLANE; in fimc_dst_set_fmt_order()
620 cfg |= EXYNOS_CIOCTRL_YCBCR_3PLANE; in fimc_dst_set_fmt_order()
624 cfg |= EXYNOS_CIOCTRL_ORDER2P_LSB_CBCR; in fimc_dst_set_fmt_order()
625 cfg |= EXYNOS_CIOCTRL_YCBCR_2PLANE; in fimc_dst_set_fmt_order()
629 fimc_write(ctx, cfg, EXYNOS_CIOCTRL); in fimc_dst_set_fmt_order()
634 u32 cfg; in fimc_dst_set_fmt() local
638 cfg = fimc_read(ctx, EXYNOS_CIEXTEN); in fimc_dst_set_fmt()
641 cfg |= EXYNOS_CIEXTEN_YUV444_OUT; in fimc_dst_set_fmt()
642 fimc_write(ctx, cfg, EXYNOS_CIEXTEN); in fimc_dst_set_fmt()
644 cfg &= ~EXYNOS_CIEXTEN_YUV444_OUT; in fimc_dst_set_fmt()
645 fimc_write(ctx, cfg, EXYNOS_CIEXTEN); in fimc_dst_set_fmt()
647 cfg = fimc_read(ctx, EXYNOS_CITRGFMT); in fimc_dst_set_fmt()
648 cfg &= ~EXYNOS_CITRGFMT_OUTFORMAT_MASK; in fimc_dst_set_fmt()
654 cfg |= EXYNOS_CITRGFMT_OUTFORMAT_RGB; in fimc_dst_set_fmt()
660 cfg |= EXYNOS_CITRGFMT_OUTFORMAT_YCBCR422_1PLANE; in fimc_dst_set_fmt()
665 cfg |= EXYNOS_CITRGFMT_OUTFORMAT_YCBCR422; in fimc_dst_set_fmt()
671 cfg |= EXYNOS_CITRGFMT_OUTFORMAT_YCBCR420; in fimc_dst_set_fmt()
675 fimc_write(ctx, cfg, EXYNOS_CITRGFMT); in fimc_dst_set_fmt()
678 cfg = fimc_read(ctx, EXYNOS_CIDMAPARAM); in fimc_dst_set_fmt()
679 cfg &= ~EXYNOS_CIDMAPARAM_W_MODE_MASK; in fimc_dst_set_fmt()
682 cfg |= EXYNOS_CIDMAPARAM_W_MODE_64X32; in fimc_dst_set_fmt()
684 cfg |= EXYNOS_CIDMAPARAM_W_MODE_LINEAR; in fimc_dst_set_fmt()
686 fimc_write(ctx, cfg, EXYNOS_CIDMAPARAM); in fimc_dst_set_fmt()
694 u32 cfg; in fimc_dst_set_transf() local
698 cfg = fimc_read(ctx, EXYNOS_CITRGFMT); in fimc_dst_set_transf()
699 cfg &= ~EXYNOS_CITRGFMT_FLIP_MASK; in fimc_dst_set_transf()
700 cfg &= ~EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE; in fimc_dst_set_transf()
705 cfg |= EXYNOS_CITRGFMT_FLIP_X_MIRROR; in fimc_dst_set_transf()
707 cfg |= EXYNOS_CITRGFMT_FLIP_Y_MIRROR; in fimc_dst_set_transf()
710 cfg |= EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE; in fimc_dst_set_transf()
712 cfg |= EXYNOS_CITRGFMT_FLIP_X_MIRROR; in fimc_dst_set_transf()
714 cfg |= EXYNOS_CITRGFMT_FLIP_Y_MIRROR; in fimc_dst_set_transf()
717 cfg |= (EXYNOS_CITRGFMT_FLIP_X_MIRROR | in fimc_dst_set_transf()
720 cfg &= ~EXYNOS_CITRGFMT_FLIP_X_MIRROR; in fimc_dst_set_transf()
722 cfg &= ~EXYNOS_CITRGFMT_FLIP_Y_MIRROR; in fimc_dst_set_transf()
725 cfg |= (EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE | in fimc_dst_set_transf()
729 cfg &= ~EXYNOS_CITRGFMT_FLIP_X_MIRROR; in fimc_dst_set_transf()
731 cfg &= ~EXYNOS_CITRGFMT_FLIP_Y_MIRROR; in fimc_dst_set_transf()
735 fimc_write(ctx, cfg, EXYNOS_CITRGFMT); in fimc_dst_set_transf()
742 u32 cfg, cfg_ext, shfactor; in fimc_set_prescaler() local
795 cfg = (EXYNOS_CISCPRERATIO_SHFACTOR(shfactor) | in fimc_set_prescaler()
798 fimc_write(ctx, cfg, EXYNOS_CISCPRERATIO); in fimc_set_prescaler()
800 cfg = (EXYNOS_CISCPREDST_PREDSTWIDTH(pre_dst_width) | in fimc_set_prescaler()
802 fimc_write(ctx, cfg, EXYNOS_CISCPREDST); in fimc_set_prescaler()
809 u32 cfg, cfg_ext; in fimc_set_scaler() local
816 cfg = fimc_read(ctx, EXYNOS_CISCCTRL); in fimc_set_scaler()
817 cfg &= ~(EXYNOS_CISCCTRL_SCALERBYPASS | in fimc_set_scaler()
825 cfg |= (EXYNOS_CISCCTRL_CSCR2Y_WIDE | in fimc_set_scaler()
828 cfg |= EXYNOS_CISCCTRL_SCALERBYPASS; in fimc_set_scaler()
830 cfg |= EXYNOS_CISCCTRL_SCALEUP_H; in fimc_set_scaler()
832 cfg |= EXYNOS_CISCCTRL_SCALEUP_V; in fimc_set_scaler()
834 cfg |= (EXYNOS_CISCCTRL_MAINHORRATIO((sc->hratio >> 6)) | in fimc_set_scaler()
836 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_set_scaler()
850 u32 cfg, cfg_ext; in fimc_dst_set_size() local
856 cfg = (EXYNOS_ORGOSIZE_HORIZONTAL(real_width) | in fimc_dst_set_size()
859 fimc_write(ctx, cfg, EXYNOS_ORGOSIZE); in fimc_dst_set_size()
866 cfg = fimc_read(ctx, EXYNOS_CIGCTRL); in fimc_dst_set_size()
867 cfg &= ~EXYNOS_CIGCTRL_CSC_MASK; in fimc_dst_set_size()
870 cfg |= EXYNOS_CIGCTRL_CSC_ITU709; in fimc_dst_set_size()
872 cfg |= EXYNOS_CIGCTRL_CSC_ITU601; in fimc_dst_set_size()
874 fimc_write(ctx, cfg, EXYNOS_CIGCTRL); in fimc_dst_set_size()
879 cfg = fimc_read(ctx, EXYNOS_CITRGFMT); in fimc_dst_set_size()
880 cfg &= ~(EXYNOS_CITRGFMT_TARGETH_MASK | in fimc_dst_set_size()
883 cfg |= (EXYNOS_CITRGFMT_TARGETHSIZE(buf->rect.h) | in fimc_dst_set_size()
886 cfg |= (EXYNOS_CITRGFMT_TARGETHSIZE(buf->rect.w) | in fimc_dst_set_size()
888 fimc_write(ctx, cfg, EXYNOS_CITRGFMT); in fimc_dst_set_size()
891 cfg = EXYNOS_CITAREA_TARGET_AREA(buf->rect.w * buf->rect.h); in fimc_dst_set_size()
892 fimc_write(ctx, cfg, EXYNOS_CITAREA); in fimc_dst_set_size()
895 cfg = (EXYNOS_CIOYOFF_HORIZONTAL(buf->rect.x) | in fimc_dst_set_size()
897 fimc_write(ctx, cfg, EXYNOS_CIOYOFF); in fimc_dst_set_size()
898 cfg = (EXYNOS_CIOCBOFF_HORIZONTAL(buf->rect.x) | in fimc_dst_set_size()
900 fimc_write(ctx, cfg, EXYNOS_CIOCBOFF); in fimc_dst_set_size()
901 cfg = (EXYNOS_CIOCROFF_HORIZONTAL(buf->rect.x) | in fimc_dst_set_size()
903 fimc_write(ctx, cfg, EXYNOS_CIOCROFF); in fimc_dst_set_size()
911 u32 cfg; in fimc_dst_set_buf_seq() local
917 cfg = fimc_read(ctx, EXYNOS_CIFCNTSEQ); in fimc_dst_set_buf_seq()
920 cfg |= (1 << buf_id); in fimc_dst_set_buf_seq()
922 cfg &= ~(1 << buf_id); in fimc_dst_set_buf_seq()
924 fimc_write(ctx, cfg, EXYNOS_CIFCNTSEQ); in fimc_dst_set_buf_seq()
926 buf_num = hweight32(cfg); in fimc_dst_set_buf_seq()
1059 u32 cfg; in fimc_stop() local
1062 cfg = fimc_read(ctx, EXYNOS_MSCTRL); in fimc_stop()
1063 cfg &= ~EXYNOS_MSCTRL_INPUT_MASK; in fimc_stop()
1064 cfg &= ~EXYNOS_MSCTRL_ENVID; in fimc_stop()
1065 fimc_write(ctx, cfg, EXYNOS_MSCTRL); in fimc_stop()