Lines Matching refs:viu

366 	priv->viu.vpp_line_in_length = hd_end_lines - hd_start_lines + 1;  in meson_overlay_setup_scaler_params()
387 priv->viu.vpp_vsc_start_phase_step = ratio_y << 6; in meson_overlay_setup_scaler_params()
389 priv->viu.vpp_vsc_ini_phase = vphase << 8; in meson_overlay_setup_scaler_params()
390 priv->viu.vpp_vsc_phase_ctrl = (1 << 13) | (4 << 8) | in meson_overlay_setup_scaler_params()
393 priv->viu.vd1_if0_luma_x0 = VD_X_START(hd_start_lines) | in meson_overlay_setup_scaler_params()
395 priv->viu.vd1_if0_chroma_x0 = VD_X_START(hd_start_lines >> 1) | in meson_overlay_setup_scaler_params()
398 priv->viu.viu_vd1_fmt_w = in meson_overlay_setup_scaler_params()
402 priv->viu.vd1_afbc_vd_cfmt_w = in meson_overlay_setup_scaler_params()
406 priv->viu.vd1_afbc_vd_cfmt_h = in meson_overlay_setup_scaler_params()
409 priv->viu.vd1_afbc_mif_hor_scope = AFBC_MIF_BLK_BGN_H(afbc_left / 32) | in meson_overlay_setup_scaler_params()
412 priv->viu.vd1_afbc_mif_ver_scope = AFBC_MIF_BLK_BGN_V(afbc_top / 4) | in meson_overlay_setup_scaler_params()
415 priv->viu.vd1_afbc_size_out = in meson_overlay_setup_scaler_params()
419 priv->viu.vd1_afbc_pixel_hor_scope = in meson_overlay_setup_scaler_params()
423 priv->viu.vd1_afbc_pixel_ver_scope = in meson_overlay_setup_scaler_params()
427 priv->viu.vd1_afbc_size_in = in meson_overlay_setup_scaler_params()
431 priv->viu.vd1_if0_luma_y0 = VD_Y_START(vd_start_lines) | in meson_overlay_setup_scaler_params()
434 priv->viu.vd1_if0_chroma_y0 = VD_Y_START(vd_start_lines >> 1) | in meson_overlay_setup_scaler_params()
437 priv->viu.vpp_pic_in_height = h_in; in meson_overlay_setup_scaler_params()
439 priv->viu.vpp_postblend_vd1_h_start_end = VD_H_START(hsc_startp) | in meson_overlay_setup_scaler_params()
441 priv->viu.vpp_blend_vd2_h_start_end = VD_H_START(hd_start_lines) | in meson_overlay_setup_scaler_params()
443 priv->viu.vpp_hsc_region12_startp = VD_REGION13_END(0) | in meson_overlay_setup_scaler_params()
445 priv->viu.vpp_hsc_region34_startp = in meson_overlay_setup_scaler_params()
448 priv->viu.vpp_hsc_region4_endp = hsc_endp - hsc_startp; in meson_overlay_setup_scaler_params()
449 priv->viu.vpp_hsc_start_phase_step = ratio_x << 6; in meson_overlay_setup_scaler_params()
450 priv->viu.vpp_hsc_region1_phase_slope = 0; in meson_overlay_setup_scaler_params()
451 priv->viu.vpp_hsc_region3_phase_slope = 0; in meson_overlay_setup_scaler_params()
452 priv->viu.vpp_hsc_phase_ctrl = (1 << 21) | (4 << 16); in meson_overlay_setup_scaler_params()
454 priv->viu.vpp_line_in_length = hd_end_lines - hd_start_lines + 1; in meson_overlay_setup_scaler_params()
455 priv->viu.vpp_preblend_h_size = hd_end_lines - hd_start_lines + 1; in meson_overlay_setup_scaler_params()
457 priv->viu.vpp_postblend_vd1_v_start_end = VD_V_START(vsc_startp) | in meson_overlay_setup_scaler_params()
459 priv->viu.vpp_blend_vd2_v_start_end = in meson_overlay_setup_scaler_params()
463 priv->viu.vpp_vsc_region12_startp = 0; in meson_overlay_setup_scaler_params()
464 priv->viu.vpp_vsc_region34_startp = in meson_overlay_setup_scaler_params()
467 priv->viu.vpp_vsc_region4_endp = vsc_endp - vsc_startp; in meson_overlay_setup_scaler_params()
468 priv->viu.vpp_vsc_start_phase_step = ratio_y << 6; in meson_overlay_setup_scaler_params()
491 priv->viu.vd1_afbc = true; in meson_overlay_atomic_update()
493 priv->viu.vd1_afbc_mode = AFBC_MIF_URGENT(3) | in meson_overlay_atomic_update()
499 priv->viu.vd1_afbc_mode |= AFBC_BLK_MEM_MODE; in meson_overlay_atomic_update()
503 priv->viu.vd1_afbc_mode |= AFBC_SCATTER_MODE; in meson_overlay_atomic_update()
505 priv->viu.vd1_afbc_en = 0x1600 | AFBC_DEC_ENABLE; in meson_overlay_atomic_update()
507 priv->viu.vd1_afbc_conv_ctrl = AFBC_CONV_LBUF_LEN(256); in meson_overlay_atomic_update()
509 priv->viu.vd1_afbc_dec_def_color = AFBC_DEF_COLOR_Y(1023); in meson_overlay_atomic_update()
512 priv->viu.vd1_afbc_vd_cfmt_ctrl = AFBC_HORZ_RPT_PIXEL0 | in meson_overlay_atomic_update()
523 priv->viu.vd1_afbc_mode |= in meson_overlay_atomic_update()
525 priv->viu.vd1_afbc_dec_def_color |= in meson_overlay_atomic_update()
530 priv->viu.vd1_afbc_dec_def_color |= in meson_overlay_atomic_update()
536 priv->viu.vd1_if0_gen_reg = 0; in meson_overlay_atomic_update()
537 priv->viu.vd1_if0_canvas0 = 0; in meson_overlay_atomic_update()
538 priv->viu.viu_vd1_fmt_ctrl = 0; in meson_overlay_atomic_update()
540 priv->viu.vd1_afbc = false; in meson_overlay_atomic_update()
542 priv->viu.vd1_if0_gen_reg = VD_URGENT_CHROMA | in meson_overlay_atomic_update()
552 priv->viu.vd1_if0_repeat_loop = 0; in meson_overlay_atomic_update()
553 priv->viu.vd1_if0_luma0_rpt_pat = interlace_mode ? 8 : 0; in meson_overlay_atomic_update()
554 priv->viu.vd1_if0_chroma0_rpt_pat = interlace_mode ? 8 : 0; in meson_overlay_atomic_update()
555 priv->viu.vd1_range_map_y = 0; in meson_overlay_atomic_update()
556 priv->viu.vd1_range_map_cb = 0; in meson_overlay_atomic_update()
557 priv->viu.vd1_range_map_cr = 0; in meson_overlay_atomic_update()
560 priv->viu.vd1_if0_gen_reg2 = 0; in meson_overlay_atomic_update()
561 priv->viu.viu_vd1_fmt_ctrl = 0; in meson_overlay_atomic_update()
567 priv->viu.vd1_if0_gen_reg |= VD_BYTES_PER_PIXEL(1); in meson_overlay_atomic_update()
568 priv->viu.vd1_if0_canvas0 = in meson_overlay_atomic_update()
572 priv->viu.viu_vd1_fmt_ctrl = VD_HORZ_Y_C_RATIO(1) | /* /2 */ in meson_overlay_atomic_update()
581 priv->viu.vd1_if0_gen_reg |= VD_SEPARATE_EN; in meson_overlay_atomic_update()
582 priv->viu.vd1_if0_canvas0 = in meson_overlay_atomic_update()
587 priv->viu.vd1_if0_gen_reg2 = VD_COLOR_MAP(1); in meson_overlay_atomic_update()
589 priv->viu.vd1_if0_gen_reg2 = VD_COLOR_MAP(2); in meson_overlay_atomic_update()
590 priv->viu.viu_vd1_fmt_ctrl = VD_HORZ_Y_C_RATIO(1) | /* /2 */ in meson_overlay_atomic_update()
602 priv->viu.vd1_if0_gen_reg |= VD_SEPARATE_EN; in meson_overlay_atomic_update()
603 priv->viu.vd1_if0_canvas0 = in meson_overlay_atomic_update()
609 priv->viu.viu_vd1_fmt_ctrl = in meson_overlay_atomic_update()
618 priv->viu.viu_vd1_fmt_ctrl = in meson_overlay_atomic_update()
627 priv->viu.viu_vd1_fmt_ctrl = in meson_overlay_atomic_update()
636 priv->viu.viu_vd1_fmt_ctrl = in meson_overlay_atomic_update()
649 priv->viu.vd1_planes = fb->format->num_planes; in meson_overlay_atomic_update()
651 switch (priv->viu.vd1_planes) { in meson_overlay_atomic_update()
654 priv->viu.vd1_addr2 = gem->dma_addr + fb->offsets[2]; in meson_overlay_atomic_update()
655 priv->viu.vd1_stride2 = fb->pitches[2]; in meson_overlay_atomic_update()
656 priv->viu.vd1_height2 = in meson_overlay_atomic_update()
660 priv->viu.vd1_addr2, in meson_overlay_atomic_update()
661 priv->viu.vd1_stride2, in meson_overlay_atomic_update()
662 priv->viu.vd1_height2); in meson_overlay_atomic_update()
666 priv->viu.vd1_addr1 = gem->dma_addr + fb->offsets[1]; in meson_overlay_atomic_update()
667 priv->viu.vd1_stride1 = fb->pitches[1]; in meson_overlay_atomic_update()
668 priv->viu.vd1_height1 = in meson_overlay_atomic_update()
672 priv->viu.vd1_addr1, in meson_overlay_atomic_update()
673 priv->viu.vd1_stride1, in meson_overlay_atomic_update()
674 priv->viu.vd1_height1); in meson_overlay_atomic_update()
678 priv->viu.vd1_addr0 = gem->dma_addr + fb->offsets[0]; in meson_overlay_atomic_update()
679 priv->viu.vd1_stride0 = fb->pitches[0]; in meson_overlay_atomic_update()
680 priv->viu.vd1_height0 = in meson_overlay_atomic_update()
684 priv->viu.vd1_addr0, in meson_overlay_atomic_update()
685 priv->viu.vd1_stride0, in meson_overlay_atomic_update()
686 priv->viu.vd1_height0); in meson_overlay_atomic_update()
689 if (priv->viu.vd1_afbc) { in meson_overlay_atomic_update()
690 if (priv->viu.vd1_afbc_mode & AFBC_SCATTER_MODE) { in meson_overlay_atomic_update()
696 priv->viu.vd1_afbc_head_addr = priv->viu.vd1_addr0 >> 4; in meson_overlay_atomic_update()
697 priv->viu.vd1_afbc_body_addr = 0; in meson_overlay_atomic_update()
704 if (priv->viu.vd1_afbc_mode & AFBC_BLK_MEM_MODE) in meson_overlay_atomic_update()
707 body_size = (ALIGN(priv->viu.vd1_stride0, 64) / 64) * in meson_overlay_atomic_update()
708 (ALIGN(priv->viu.vd1_height0, 32) / 32) * in meson_overlay_atomic_update()
711 priv->viu.vd1_afbc_body_addr = priv->viu.vd1_addr0 >> 4; in meson_overlay_atomic_update()
713 priv->viu.vd1_afbc_head_addr = (priv->viu.vd1_addr0 + in meson_overlay_atomic_update()
718 priv->viu.vd1_enabled = true; in meson_overlay_atomic_update()
733 priv->viu.vd1_enabled = false; in meson_overlay_atomic_disable()