Lines Matching full:alpha

1649 static bool is_opaque(u16 alpha)  in is_opaque()  argument
1651 return (alpha >> 8) == 0xff; in is_opaque()
1655 struct vop2_alpha *alpha) in vop2_parse_alpha() argument
1664 alpha->src_color_ctrl.val = 0; in vop2_parse_alpha()
1665 alpha->dst_color_ctrl.val = 0; in vop2_parse_alpha()
1666 alpha->src_alpha_ctrl.val = 0; in vop2_parse_alpha()
1667 alpha->dst_alpha_ctrl.val = 0; in vop2_parse_alpha()
1670 alpha->src_color_ctrl.bits.blend_mode = ALPHA_GLOBAL; in vop2_parse_alpha()
1672 alpha->src_color_ctrl.bits.blend_mode = ALPHA_PER_PIX; in vop2_parse_alpha()
1674 alpha->src_color_ctrl.bits.blend_mode = ALPHA_PER_PIX_GLOBAL; in vop2_parse_alpha()
1676 alpha->src_color_ctrl.bits.alpha_en = 1; in vop2_parse_alpha()
1678 if (alpha->src_color_ctrl.bits.blend_mode == ALPHA_GLOBAL) { in vop2_parse_alpha()
1679 alpha->src_color_ctrl.bits.color_mode = src_color_mode; in vop2_parse_alpha()
1680 alpha->src_color_ctrl.bits.factor_mode = SRC_FAC_ALPHA_SRC_GLOBAL; in vop2_parse_alpha()
1681 } else if (alpha->src_color_ctrl.bits.blend_mode == ALPHA_PER_PIX) { in vop2_parse_alpha()
1682 alpha->src_color_ctrl.bits.color_mode = src_color_mode; in vop2_parse_alpha()
1683 alpha->src_color_ctrl.bits.factor_mode = SRC_FAC_ALPHA_ONE; in vop2_parse_alpha()
1685 alpha->src_color_ctrl.bits.color_mode = ALPHA_SRC_PRE_MUL; in vop2_parse_alpha()
1686 alpha->src_color_ctrl.bits.factor_mode = SRC_FAC_ALPHA_SRC_GLOBAL; in vop2_parse_alpha()
1688 alpha->src_color_ctrl.bits.glb_alpha = alpha_config->src_glb_alpha_value >> 8; in vop2_parse_alpha()
1689 alpha->src_color_ctrl.bits.alpha_mode = ALPHA_STRAIGHT; in vop2_parse_alpha()
1690 alpha->src_color_ctrl.bits.alpha_cal_mode = ALPHA_SATURATION; in vop2_parse_alpha()
1692 alpha->dst_color_ctrl.bits.alpha_mode = ALPHA_STRAIGHT; in vop2_parse_alpha()
1693 alpha->dst_color_ctrl.bits.alpha_cal_mode = ALPHA_SATURATION; in vop2_parse_alpha()
1694 alpha->dst_color_ctrl.bits.blend_mode = ALPHA_GLOBAL; in vop2_parse_alpha()
1695 alpha->dst_color_ctrl.bits.glb_alpha = alpha_config->dst_glb_alpha_value >> 8; in vop2_parse_alpha()
1696 alpha->dst_color_ctrl.bits.color_mode = dst_color_mode; in vop2_parse_alpha()
1697 alpha->dst_color_ctrl.bits.factor_mode = ALPHA_SRC_INVERSE; in vop2_parse_alpha()
1699 alpha->src_alpha_ctrl.bits.alpha_mode = ALPHA_STRAIGHT; in vop2_parse_alpha()
1700 alpha->src_alpha_ctrl.bits.blend_mode = alpha->src_color_ctrl.bits.blend_mode; in vop2_parse_alpha()
1701 alpha->src_alpha_ctrl.bits.alpha_cal_mode = ALPHA_SATURATION; in vop2_parse_alpha()
1702 alpha->src_alpha_ctrl.bits.factor_mode = ALPHA_ONE; in vop2_parse_alpha()
1704 alpha->dst_alpha_ctrl.bits.alpha_mode = ALPHA_STRAIGHT; in vop2_parse_alpha()
1706 alpha->dst_alpha_ctrl.bits.blend_mode = ALPHA_PER_PIX; in vop2_parse_alpha()
1708 alpha->dst_alpha_ctrl.bits.blend_mode = ALPHA_PER_PIX_GLOBAL; in vop2_parse_alpha()
1709 alpha->dst_alpha_ctrl.bits.alpha_cal_mode = ALPHA_NO_SATURATION; in vop2_parse_alpha()
1710 alpha->dst_alpha_ctrl.bits.factor_mode = ALPHA_SRC_INVERSE; in vop2_parse_alpha()
1731 struct vop2_alpha alpha; in vop2_setup_cluster_alpha() local
1741 dst_glb_alpha_val = main_win->base.state->alpha; in vop2_setup_cluster_alpha()
1749 alpha_config.dst_pixel_alpha_en = true; /* alpha value need transfer to next mix */ in vop2_setup_cluster_alpha()
1752 vop2_parse_alpha(&alpha_config, &alpha); in vop2_setup_cluster_alpha()
1754 alpha.src_color_ctrl.bits.src_dst_swap = swap; in vop2_setup_cluster_alpha()
1756 alpha.src_color_ctrl.val); in vop2_setup_cluster_alpha()
1758 alpha.dst_color_ctrl.val); in vop2_setup_cluster_alpha()
1760 alpha.src_alpha_ctrl.val); in vop2_setup_cluster_alpha()
1762 alpha.dst_alpha_ctrl.val); in vop2_setup_cluster_alpha()
1770 struct vop2_alpha alpha; in vop2_setup_alpha() local
1780 alpha_config.dst_pixel_alpha_en = true; /* alpha value need transfer to next mix */ in vop2_setup_alpha()
1786 !is_opaque(plane->state->alpha) && in vop2_setup_alpha()
1789 * If bottom layer have global alpha effect [except cluster layer, in vop2_setup_alpha()
1790 * because cluster have deal with bottom layer global alpha value in vop2_setup_alpha()
1791 * at cluster mix], bottom layer mix need deal with global alpha. in vop2_setup_alpha()
1794 dst_global_alpha = plane->state->alpha; in vop2_setup_alpha()
1819 alpha_config.src_glb_alpha_value = plane->state->alpha; in vop2_setup_alpha()
1822 /* Mix output data only have pixel alpha */ in vop2_setup_alpha()
1831 alpha_config.src_glb_alpha_value = plane->state->alpha; in vop2_setup_alpha()
1835 vop2_parse_alpha(&alpha_config, &alpha); in vop2_setup_alpha()
1839 alpha.src_color_ctrl.val); in vop2_setup_alpha()
1841 alpha.dst_color_ctrl.val); in vop2_setup_alpha()
1843 alpha.src_alpha_ctrl.val); in vop2_setup_alpha()
1845 alpha.dst_alpha_ctrl.val); in vop2_setup_alpha()
1850 /* Transfer pixel alpha to hdr mix */ in vop2_setup_alpha()
1856 vop2_parse_alpha(&alpha_config, &alpha); in vop2_setup_alpha()
1859 alpha.src_color_ctrl.val); in vop2_setup_alpha()
1861 alpha.dst_color_ctrl.val); in vop2_setup_alpha()
1863 alpha.src_alpha_ctrl.val); in vop2_setup_alpha()
1865 alpha.dst_alpha_ctrl.val); in vop2_setup_alpha()