Lines Matching +full:11 +full:mp

36 #define   LAYER_V_FLIP			(1 << 11)
262 static int malidp_se_check_scaling(struct malidp_plane *mp, in malidp_se_check_scaling() argument
291 mc->scaled_planes_mask &= ~(mp->layer->id); in malidp_se_check_scaling()
295 if (mp->layer->id & (DE_SMART | DE_GRAPHICS2)) in malidp_se_check_scaling()
298 mc->scaled_planes_mask |= mp->layer->id; in malidp_se_check_scaling()
303 static u32 malidp_get_pgsize_bitmap(struct malidp_plane *mp) in malidp_get_pgsize_bitmap() argument
307 mmu_dom = iommu_get_domain_for_dev(mp->base.dev->dev); in malidp_get_pgsize_bitmap()
480 static void malidp_de_prefetch_settings(struct malidp_plane *mp, in malidp_de_prefetch_settings() argument
483 if (!mp->layer->mmu_ctrl_offset) in malidp_de_prefetch_settings()
487 ms->mmu_prefetch_pgsize = malidp_get_pgsize_bitmap(mp); in malidp_de_prefetch_settings()
497 struct malidp_plane *mp = to_malidp_plane(plane); in malidp_de_plane_check() local
510 ms->format = malidp_hw_get_format_id(&mp->hwdev->hw->map, in malidp_de_plane_check()
511 mp->layer->id, fb->format->format, in malidp_de_plane_check()
518 u8 alignment = malidp_hw_get_pitch_align(mp->hwdev, rotated); in malidp_de_plane_check()
539 if ((new_plane_state->crtc_w > mp->hwdev->max_line_size) || in malidp_de_plane_check()
540 (new_plane_state->crtc_h > mp->hwdev->max_line_size) || in malidp_de_plane_check()
541 (new_plane_state->crtc_w < mp->hwdev->min_line_size) || in malidp_de_plane_check()
542 (new_plane_state->crtc_h < mp->hwdev->min_line_size)) in malidp_de_plane_check()
551 !(mp->hwdev->hw->features & MALIDP_DEVICE_LV_HAS_3_STRIDES) && in malidp_de_plane_check()
555 ret = malidp_se_check_scaling(mp, new_plane_state); in malidp_de_plane_check()
561 if (mp->layer->rot == ROTATE_NONE) in malidp_de_plane_check()
563 if ((mp->layer->rot == ROTATE_COMPRESSED) && !(fb->modifier)) in malidp_de_plane_check()
575 if (mp->layer->id == DE_SMART && fb->modifier) { in malidp_de_plane_check()
584 val = mp->hwdev->hw->rotmem_required(mp->hwdev, new_plane_state->crtc_w, in malidp_de_plane_check()
600 malidp_de_prefetch_settings(mp, ms); in malidp_de_plane_check()
605 static void malidp_de_set_plane_pitches(struct malidp_plane *mp, in malidp_de_set_plane_pitches() argument
611 if (!mp->layer->stride_offset) in malidp_de_set_plane_pitches()
615 num_strides = (mp->hwdev->hw->features & in malidp_de_set_plane_pitches()
624 unsigned int block_h = drm_format_info_block_height(mp->base.state->fb->format, i); in malidp_de_set_plane_pitches()
626 malidp_hw_write(mp->hwdev, pitches[i] * block_h, in malidp_de_set_plane_pitches()
627 mp->layer->base + in malidp_de_set_plane_pitches()
628 mp->layer->stride_offset + i * 4); in malidp_de_set_plane_pitches()
686 static void malidp_de_set_mmu_control(struct malidp_plane *mp, in malidp_de_set_mmu_control() argument
692 if (!mp->layer->mmu_ctrl_offset) in malidp_de_set_mmu_control()
700 malidp_hw_write(mp->hwdev, mmu_ctrl, in malidp_de_set_mmu_control()
701 mp->layer->base + mp->layer->mmu_ctrl_offset); in malidp_de_set_mmu_control()
705 struct malidp_plane *mp, in malidp_set_plane_base_addr() argument
710 struct drm_plane *plane = &mp->base; in malidp_set_plane_base_addr()
713 ptr = mp->layer->ptr + (plane_index << 4); in malidp_set_plane_base_addr()
735 malidp_hw_write(mp->hwdev, lower_32_bits(dma_addr), ptr); in malidp_set_plane_base_addr()
736 malidp_hw_write(mp->hwdev, upper_32_bits(dma_addr), ptr + 4); in malidp_set_plane_base_addr()
741 struct malidp_plane *mp; in malidp_de_set_plane_afbc() local
745 mp = to_malidp_plane(plane); in malidp_de_set_plane_afbc()
748 if (!mp->layer->afbc_decoder_offset) in malidp_de_set_plane_afbc()
752 malidp_hw_write(mp->hwdev, 0, mp->layer->afbc_decoder_offset); in malidp_de_set_plane_afbc()
764 malidp_hw_write(mp->hwdev, val, in malidp_de_set_plane_afbc()
765 mp->layer->afbc_decoder_offset + MALIDP_AD_CROP_H); in malidp_de_set_plane_afbc()
769 malidp_hw_write(mp->hwdev, val, in malidp_de_set_plane_afbc()
770 mp->layer->afbc_decoder_offset + MALIDP_AD_CROP_V); in malidp_de_set_plane_afbc()
778 malidp_hw_write(mp->hwdev, val, mp->layer->afbc_decoder_offset); in malidp_de_set_plane_afbc()
786 struct malidp_plane *mp; in malidp_de_plane_update() local
796 mp = to_malidp_plane(plane); in malidp_de_plane_update()
814 val = malidp_hw_read(mp->hwdev, mp->layer->base); in malidp_de_plane_update()
816 malidp_hw_write(mp->hwdev, val, mp->layer->base); in malidp_de_plane_update()
819 malidp_set_plane_base_addr(fb, mp, i); in malidp_de_plane_update()
821 malidp_de_set_mmu_control(mp, ms); in malidp_de_plane_update()
823 malidp_de_set_plane_pitches(mp, ms->n_planes, in malidp_de_plane_update()
828 malidp_de_set_color_encoding(mp, plane->state->color_encoding, in malidp_de_plane_update()
831 malidp_hw_write(mp->hwdev, LAYER_H_VAL(src_w) | LAYER_V_VAL(src_h), in malidp_de_plane_update()
832 mp->layer->base + MALIDP_LAYER_SIZE); in malidp_de_plane_update()
834 malidp_hw_write(mp->hwdev, LAYER_H_VAL(dest_w) | LAYER_V_VAL(dest_h), in malidp_de_plane_update()
835 mp->layer->base + MALIDP_LAYER_COMP_SIZE); in malidp_de_plane_update()
837 malidp_hw_write(mp->hwdev, LAYER_H_VAL(new_state->crtc_x) | in malidp_de_plane_update()
839 mp->layer->base + MALIDP_LAYER_OFFSET); in malidp_de_plane_update()
841 if (mp->layer->id == DE_SMART) { in malidp_de_plane_update()
846 malidp_hw_write(mp->hwdev, 1, in malidp_de_plane_update()
847 mp->layer->base + MALIDP550_LS_ENABLE); in malidp_de_plane_update()
848 malidp_hw_write(mp->hwdev, in malidp_de_plane_update()
850 mp->layer->base + MALIDP550_LS_R1_IN_SIZE); in malidp_de_plane_update()
856 val = malidp_hw_read(mp->hwdev, mp->layer->base + MALIDP_LAYER_CONTROL); in malidp_de_plane_update()
891 m->scaler_config.plane_src_id == mp->layer->id) in malidp_de_plane_update()
898 malidp_hw_write(mp->hwdev, val, in malidp_de_plane_update()
899 mp->layer->base + MALIDP_LAYER_CONTROL); in malidp_de_plane_update()
905 struct malidp_plane *mp = to_malidp_plane(plane); in malidp_de_plane_disable() local
907 malidp_hw_clearbits(mp->hwdev, in malidp_de_plane_disable()
909 mp->layer->base + MALIDP_LAYER_CONTROL); in malidp_de_plane_disable()