Lines Matching refs:cfg

139 	u32 cfg;  in fimc_sw_reset()  local
142 cfg = fimc_read(ctx, EXYNOS_CISTATUS); in fimc_sw_reset()
143 if (EXYNOS_CISTATUS_GET_ENVID_STATUS(cfg)) in fimc_sw_reset()
164 u32 cfg; in fimc_set_type_ctrl() local
166 cfg = fimc_read(ctx, EXYNOS_CIGCTRL); in fimc_set_type_ctrl()
167 cfg &= ~(EXYNOS_CIGCTRL_TESTPATTERN_MASK | in fimc_set_type_ctrl()
174 cfg |= (EXYNOS_CIGCTRL_SELCAM_ITU_A | in fimc_set_type_ctrl()
179 fimc_write(ctx, cfg, EXYNOS_CIGCTRL); in fimc_set_type_ctrl()
184 u32 cfg; in fimc_handle_jpeg() local
188 cfg = fimc_read(ctx, EXYNOS_CIGCTRL); in fimc_handle_jpeg()
190 cfg |= EXYNOS_CIGCTRL_CAM_JPEG; in fimc_handle_jpeg()
192 cfg &= ~EXYNOS_CIGCTRL_CAM_JPEG; in fimc_handle_jpeg()
194 fimc_write(ctx, cfg, EXYNOS_CIGCTRL); in fimc_handle_jpeg()
199 u32 cfg; in fimc_mask_irq() local
203 cfg = fimc_read(ctx, EXYNOS_CIGCTRL); in fimc_mask_irq()
205 cfg &= ~EXYNOS_CIGCTRL_IRQ_OVFEN; in fimc_mask_irq()
206 cfg |= EXYNOS_CIGCTRL_IRQ_ENABLE | EXYNOS_CIGCTRL_IRQ_LEVEL; in fimc_mask_irq()
208 cfg &= ~EXYNOS_CIGCTRL_IRQ_ENABLE; in fimc_mask_irq()
209 fimc_write(ctx, cfg, EXYNOS_CIGCTRL); in fimc_mask_irq()
243 u32 cfg; in fimc_check_frame_end() local
245 cfg = fimc_read(ctx, EXYNOS_CISTATUS); in fimc_check_frame_end()
247 DRM_DEV_DEBUG_KMS(ctx->dev, "cfg[0x%x]\n", cfg); in fimc_check_frame_end()
249 if (!(cfg & EXYNOS_CISTATUS_FRAMEEND)) in fimc_check_frame_end()
252 cfg &= ~(EXYNOS_CISTATUS_FRAMEEND); in fimc_check_frame_end()
253 fimc_write(ctx, cfg, EXYNOS_CISTATUS); in fimc_check_frame_end()
260 u32 cfg; in fimc_get_buf_id() local
263 cfg = fimc_read(ctx, EXYNOS_CISTATUS2); in fimc_get_buf_id()
264 frame_cnt = EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg); in fimc_get_buf_id()
267 frame_cnt = EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg); in fimc_get_buf_id()
270 EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg), in fimc_get_buf_id()
271 EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg)); in fimc_get_buf_id()
286 u32 cfg; in fimc_handle_lastend() local
290 cfg = fimc_read(ctx, EXYNOS_CIOCTRL); in fimc_handle_lastend()
292 cfg |= EXYNOS_CIOCTRL_LASTENDEN; in fimc_handle_lastend()
294 cfg &= ~EXYNOS_CIOCTRL_LASTENDEN; in fimc_handle_lastend()
296 fimc_write(ctx, cfg, EXYNOS_CIOCTRL); in fimc_handle_lastend()
301 u32 cfg; in fimc_src_set_fmt_order() local
306 cfg = fimc_read(ctx, EXYNOS_CISCCTRL); in fimc_src_set_fmt_order()
307 cfg &= ~EXYNOS_CISCCTRL_INRGB_FMT_RGB_MASK; in fimc_src_set_fmt_order()
311 cfg |= EXYNOS_CISCCTRL_INRGB_FMT_RGB565; in fimc_src_set_fmt_order()
312 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_src_set_fmt_order()
316 cfg |= EXYNOS_CISCCTRL_INRGB_FMT_RGB888; in fimc_src_set_fmt_order()
317 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_src_set_fmt_order()
325 cfg = fimc_read(ctx, EXYNOS_MSCTRL); in fimc_src_set_fmt_order()
326 cfg &= ~(EXYNOS_MSCTRL_ORDER2P_SHIFT_MASK | in fimc_src_set_fmt_order()
332 cfg |= EXYNOS_MSCTRL_ORDER422_YCBYCR; in fimc_src_set_fmt_order()
335 cfg |= EXYNOS_MSCTRL_ORDER422_YCRYCB; in fimc_src_set_fmt_order()
338 cfg |= EXYNOS_MSCTRL_ORDER422_CBYCRY; in fimc_src_set_fmt_order()
342 cfg |= EXYNOS_MSCTRL_ORDER422_CRYCBY; in fimc_src_set_fmt_order()
346 cfg |= (EXYNOS_MSCTRL_ORDER2P_LSB_CRCB | in fimc_src_set_fmt_order()
352 cfg |= EXYNOS_MSCTRL_C_INT_IN_3PLANE; in fimc_src_set_fmt_order()
356 cfg |= (EXYNOS_MSCTRL_ORDER2P_LSB_CBCR | in fimc_src_set_fmt_order()
361 fimc_write(ctx, cfg, EXYNOS_MSCTRL); in fimc_src_set_fmt_order()
366 u32 cfg; in fimc_src_set_fmt() local
370 cfg = fimc_read(ctx, EXYNOS_MSCTRL); in fimc_src_set_fmt()
371 cfg &= ~EXYNOS_MSCTRL_INFORMAT_RGB; in fimc_src_set_fmt()
377 cfg |= EXYNOS_MSCTRL_INFORMAT_RGB; in fimc_src_set_fmt()
380 cfg |= EXYNOS_MSCTRL_INFORMAT_YCBCR420; in fimc_src_set_fmt()
386 cfg |= EXYNOS_MSCTRL_INFORMAT_YCBCR422_1PLANE; in fimc_src_set_fmt()
391 cfg |= EXYNOS_MSCTRL_INFORMAT_YCBCR422; in fimc_src_set_fmt()
397 cfg |= EXYNOS_MSCTRL_INFORMAT_YCBCR420; in fimc_src_set_fmt()
401 fimc_write(ctx, cfg, EXYNOS_MSCTRL); in fimc_src_set_fmt()
403 cfg = fimc_read(ctx, EXYNOS_CIDMAPARAM); in fimc_src_set_fmt()
404 cfg &= ~EXYNOS_CIDMAPARAM_R_MODE_MASK; in fimc_src_set_fmt()
407 cfg |= EXYNOS_CIDMAPARAM_R_MODE_64X32; in fimc_src_set_fmt()
409 cfg |= EXYNOS_CIDMAPARAM_R_MODE_LINEAR; in fimc_src_set_fmt()
411 fimc_write(ctx, cfg, EXYNOS_CIDMAPARAM); in fimc_src_set_fmt()
471 u32 cfg, h1, h2, v1, v2; in fimc_set_window() local
489 cfg = fimc_read(ctx, EXYNOS_CIWDOFST); in fimc_set_window()
490 cfg &= ~(EXYNOS_CIWDOFST_WINHOROFST_MASK | in fimc_set_window()
492 cfg |= (EXYNOS_CIWDOFST_WINHOROFST(h1) | in fimc_set_window()
494 cfg |= EXYNOS_CIWDOFST_WINOFSEN; in fimc_set_window()
495 fimc_write(ctx, cfg, EXYNOS_CIWDOFST); in fimc_set_window()
497 cfg = (EXYNOS_CIWDOFST2_WINHOROFST2(h2) | in fimc_set_window()
499 fimc_write(ctx, cfg, EXYNOS_CIWDOFST2); in fimc_set_window()
506 u32 cfg; in fimc_src_set_size() local
512 cfg = (EXYNOS_ORGISIZE_HORIZONTAL(real_width) | in fimc_src_set_size()
515 fimc_write(ctx, cfg, EXYNOS_ORGISIZE); in fimc_src_set_size()
521 cfg = fimc_read(ctx, EXYNOS_CIREAL_ISIZE); in fimc_src_set_size()
522 cfg &= ~(EXYNOS_CIREAL_ISIZE_HEIGHT_MASK | in fimc_src_set_size()
524 cfg |= (EXYNOS_CIREAL_ISIZE_WIDTH(buf->rect.w) | in fimc_src_set_size()
526 fimc_write(ctx, cfg, EXYNOS_CIREAL_ISIZE); in fimc_src_set_size()
532 cfg = (EXYNOS_CISRCFMT_ITU601_8BIT | in fimc_src_set_size()
535 fimc_write(ctx, cfg, EXYNOS_CISRCFMT); in fimc_src_set_size()
538 cfg = (EXYNOS_CIIYOFF_HORIZONTAL(buf->rect.x) | in fimc_src_set_size()
540 fimc_write(ctx, cfg, EXYNOS_CIIYOFF); in fimc_src_set_size()
541 cfg = (EXYNOS_CIICBOFF_HORIZONTAL(buf->rect.x) | in fimc_src_set_size()
543 fimc_write(ctx, cfg, EXYNOS_CIICBOFF); in fimc_src_set_size()
544 cfg = (EXYNOS_CIICROFF_HORIZONTAL(buf->rect.x) | in fimc_src_set_size()
546 fimc_write(ctx, cfg, EXYNOS_CIICROFF); in fimc_src_set_size()
561 u32 cfg; in fimc_dst_set_fmt_order() local
566 cfg = fimc_read(ctx, EXYNOS_CISCCTRL); in fimc_dst_set_fmt_order()
567 cfg &= ~EXYNOS_CISCCTRL_OUTRGB_FMT_RGB_MASK; in fimc_dst_set_fmt_order()
571 cfg |= EXYNOS_CISCCTRL_OUTRGB_FMT_RGB565; in fimc_dst_set_fmt_order()
572 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_dst_set_fmt_order()
575 cfg |= EXYNOS_CISCCTRL_OUTRGB_FMT_RGB888; in fimc_dst_set_fmt_order()
576 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_dst_set_fmt_order()
579 cfg |= (EXYNOS_CISCCTRL_OUTRGB_FMT_RGB888 | in fimc_dst_set_fmt_order()
581 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_dst_set_fmt_order()
589 cfg = fimc_read(ctx, EXYNOS_CIOCTRL); in fimc_dst_set_fmt_order()
590 cfg &= ~(EXYNOS_CIOCTRL_ORDER2P_MASK | in fimc_dst_set_fmt_order()
596 cfg |= EXYNOS_CIOCTRL_ALPHA_OUT; in fimc_dst_set_fmt_order()
599 cfg |= EXYNOS_CIOCTRL_ORDER422_YCBYCR; in fimc_dst_set_fmt_order()
602 cfg |= EXYNOS_CIOCTRL_ORDER422_YCRYCB; in fimc_dst_set_fmt_order()
605 cfg |= EXYNOS_CIOCTRL_ORDER422_CBYCRY; in fimc_dst_set_fmt_order()
608 cfg |= EXYNOS_CIOCTRL_ORDER422_CRYCBY; in fimc_dst_set_fmt_order()
612 cfg |= EXYNOS_CIOCTRL_ORDER2P_LSB_CRCB; in fimc_dst_set_fmt_order()
613 cfg |= EXYNOS_CIOCTRL_YCBCR_2PLANE; in fimc_dst_set_fmt_order()
618 cfg |= EXYNOS_CIOCTRL_YCBCR_3PLANE; in fimc_dst_set_fmt_order()
622 cfg |= EXYNOS_CIOCTRL_ORDER2P_LSB_CBCR; in fimc_dst_set_fmt_order()
623 cfg |= EXYNOS_CIOCTRL_YCBCR_2PLANE; in fimc_dst_set_fmt_order()
627 fimc_write(ctx, cfg, EXYNOS_CIOCTRL); in fimc_dst_set_fmt_order()
632 u32 cfg; in fimc_dst_set_fmt() local
636 cfg = fimc_read(ctx, EXYNOS_CIEXTEN); in fimc_dst_set_fmt()
639 cfg |= EXYNOS_CIEXTEN_YUV444_OUT; in fimc_dst_set_fmt()
640 fimc_write(ctx, cfg, EXYNOS_CIEXTEN); in fimc_dst_set_fmt()
642 cfg &= ~EXYNOS_CIEXTEN_YUV444_OUT; in fimc_dst_set_fmt()
643 fimc_write(ctx, cfg, EXYNOS_CIEXTEN); in fimc_dst_set_fmt()
645 cfg = fimc_read(ctx, EXYNOS_CITRGFMT); in fimc_dst_set_fmt()
646 cfg &= ~EXYNOS_CITRGFMT_OUTFORMAT_MASK; in fimc_dst_set_fmt()
652 cfg |= EXYNOS_CITRGFMT_OUTFORMAT_RGB; in fimc_dst_set_fmt()
658 cfg |= EXYNOS_CITRGFMT_OUTFORMAT_YCBCR422_1PLANE; in fimc_dst_set_fmt()
663 cfg |= EXYNOS_CITRGFMT_OUTFORMAT_YCBCR422; in fimc_dst_set_fmt()
669 cfg |= EXYNOS_CITRGFMT_OUTFORMAT_YCBCR420; in fimc_dst_set_fmt()
673 fimc_write(ctx, cfg, EXYNOS_CITRGFMT); in fimc_dst_set_fmt()
676 cfg = fimc_read(ctx, EXYNOS_CIDMAPARAM); in fimc_dst_set_fmt()
677 cfg &= ~EXYNOS_CIDMAPARAM_W_MODE_MASK; in fimc_dst_set_fmt()
680 cfg |= EXYNOS_CIDMAPARAM_W_MODE_64X32; in fimc_dst_set_fmt()
682 cfg |= EXYNOS_CIDMAPARAM_W_MODE_LINEAR; in fimc_dst_set_fmt()
684 fimc_write(ctx, cfg, EXYNOS_CIDMAPARAM); in fimc_dst_set_fmt()
692 u32 cfg; in fimc_dst_set_transf() local
696 cfg = fimc_read(ctx, EXYNOS_CITRGFMT); in fimc_dst_set_transf()
697 cfg &= ~EXYNOS_CITRGFMT_FLIP_MASK; in fimc_dst_set_transf()
698 cfg &= ~EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE; in fimc_dst_set_transf()
703 cfg |= EXYNOS_CITRGFMT_FLIP_X_MIRROR; in fimc_dst_set_transf()
705 cfg |= EXYNOS_CITRGFMT_FLIP_Y_MIRROR; in fimc_dst_set_transf()
708 cfg |= EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE; in fimc_dst_set_transf()
710 cfg |= EXYNOS_CITRGFMT_FLIP_X_MIRROR; in fimc_dst_set_transf()
712 cfg |= EXYNOS_CITRGFMT_FLIP_Y_MIRROR; in fimc_dst_set_transf()
715 cfg |= (EXYNOS_CITRGFMT_FLIP_X_MIRROR | in fimc_dst_set_transf()
718 cfg &= ~EXYNOS_CITRGFMT_FLIP_X_MIRROR; in fimc_dst_set_transf()
720 cfg &= ~EXYNOS_CITRGFMT_FLIP_Y_MIRROR; in fimc_dst_set_transf()
723 cfg |= (EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE | in fimc_dst_set_transf()
727 cfg &= ~EXYNOS_CITRGFMT_FLIP_X_MIRROR; in fimc_dst_set_transf()
729 cfg &= ~EXYNOS_CITRGFMT_FLIP_Y_MIRROR; in fimc_dst_set_transf()
733 fimc_write(ctx, cfg, EXYNOS_CITRGFMT); in fimc_dst_set_transf()
740 u32 cfg, cfg_ext, shfactor; in fimc_set_prescaler() local
793 cfg = (EXYNOS_CISCPRERATIO_SHFACTOR(shfactor) | in fimc_set_prescaler()
796 fimc_write(ctx, cfg, EXYNOS_CISCPRERATIO); in fimc_set_prescaler()
798 cfg = (EXYNOS_CISCPREDST_PREDSTWIDTH(pre_dst_width) | in fimc_set_prescaler()
800 fimc_write(ctx, cfg, EXYNOS_CISCPREDST); in fimc_set_prescaler()
807 u32 cfg, cfg_ext; in fimc_set_scaler() local
814 cfg = fimc_read(ctx, EXYNOS_CISCCTRL); in fimc_set_scaler()
815 cfg &= ~(EXYNOS_CISCCTRL_SCALERBYPASS | in fimc_set_scaler()
823 cfg |= (EXYNOS_CISCCTRL_CSCR2Y_WIDE | in fimc_set_scaler()
826 cfg |= EXYNOS_CISCCTRL_SCALERBYPASS; in fimc_set_scaler()
828 cfg |= EXYNOS_CISCCTRL_SCALEUP_H; in fimc_set_scaler()
830 cfg |= EXYNOS_CISCCTRL_SCALEUP_V; in fimc_set_scaler()
832 cfg |= (EXYNOS_CISCCTRL_MAINHORRATIO((sc->hratio >> 6)) | in fimc_set_scaler()
834 fimc_write(ctx, cfg, EXYNOS_CISCCTRL); in fimc_set_scaler()
848 u32 cfg, cfg_ext; in fimc_dst_set_size() local
854 cfg = (EXYNOS_ORGOSIZE_HORIZONTAL(real_width) | in fimc_dst_set_size()
857 fimc_write(ctx, cfg, EXYNOS_ORGOSIZE); in fimc_dst_set_size()
864 cfg = fimc_read(ctx, EXYNOS_CIGCTRL); in fimc_dst_set_size()
865 cfg &= ~EXYNOS_CIGCTRL_CSC_MASK; in fimc_dst_set_size()
868 cfg |= EXYNOS_CIGCTRL_CSC_ITU709; in fimc_dst_set_size()
870 cfg |= EXYNOS_CIGCTRL_CSC_ITU601; in fimc_dst_set_size()
872 fimc_write(ctx, cfg, EXYNOS_CIGCTRL); in fimc_dst_set_size()
877 cfg = fimc_read(ctx, EXYNOS_CITRGFMT); in fimc_dst_set_size()
878 cfg &= ~(EXYNOS_CITRGFMT_TARGETH_MASK | in fimc_dst_set_size()
881 cfg |= (EXYNOS_CITRGFMT_TARGETHSIZE(buf->rect.h) | in fimc_dst_set_size()
884 cfg |= (EXYNOS_CITRGFMT_TARGETHSIZE(buf->rect.w) | in fimc_dst_set_size()
886 fimc_write(ctx, cfg, EXYNOS_CITRGFMT); in fimc_dst_set_size()
889 cfg = EXYNOS_CITAREA_TARGET_AREA(buf->rect.w * buf->rect.h); in fimc_dst_set_size()
890 fimc_write(ctx, cfg, EXYNOS_CITAREA); in fimc_dst_set_size()
893 cfg = (EXYNOS_CIOYOFF_HORIZONTAL(buf->rect.x) | in fimc_dst_set_size()
895 fimc_write(ctx, cfg, EXYNOS_CIOYOFF); in fimc_dst_set_size()
896 cfg = (EXYNOS_CIOCBOFF_HORIZONTAL(buf->rect.x) | in fimc_dst_set_size()
898 fimc_write(ctx, cfg, EXYNOS_CIOCBOFF); in fimc_dst_set_size()
899 cfg = (EXYNOS_CIOCROFF_HORIZONTAL(buf->rect.x) | in fimc_dst_set_size()
901 fimc_write(ctx, cfg, EXYNOS_CIOCROFF); in fimc_dst_set_size()
909 u32 cfg; in fimc_dst_set_buf_seq() local
915 cfg = fimc_read(ctx, EXYNOS_CIFCNTSEQ); in fimc_dst_set_buf_seq()
918 cfg |= (1 << buf_id); in fimc_dst_set_buf_seq()
920 cfg &= ~(1 << buf_id); in fimc_dst_set_buf_seq()
922 fimc_write(ctx, cfg, EXYNOS_CIFCNTSEQ); in fimc_dst_set_buf_seq()
924 buf_num = hweight32(cfg); in fimc_dst_set_buf_seq()
1057 u32 cfg; in fimc_stop() local
1060 cfg = fimc_read(ctx, EXYNOS_MSCTRL); in fimc_stop()
1061 cfg &= ~EXYNOS_MSCTRL_INPUT_MASK; in fimc_stop()
1062 cfg &= ~EXYNOS_MSCTRL_ENVID; in fimc_stop()
1063 fimc_write(ctx, cfg, EXYNOS_MSCTRL); in fimc_stop()