mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
drm/rockchip: vop2: The data from cluster mix is always premultiplied alpha
Signed-off-by: Sandy Huang <hjc@rock-chips.com> Change-Id: Icf107d31f9fb04cf612a02a0127d66448d8f7ed1
This commit is contained in:
@@ -10151,12 +10151,23 @@ static void vop2_setup_alpha(struct vop2_video_port *vp,
|
||||
pixel_alpha_en = is_alpha_support(fb->format->format);
|
||||
|
||||
alpha_config.src_premulti_en = premulti_en;
|
||||
if (bottom_layer_alpha_en && i == 1) {/* Cd = Cs + (1 - As) * Cd * Agd */
|
||||
if (bottom_layer_alpha_en && i == 1) {
|
||||
/**
|
||||
* The data from cluster mix is always premultiplied alpha;
|
||||
* cluster layer or esmart layer[premulti_en = 1]
|
||||
* Cd = Cs + (1 - As) * Cd * Agd
|
||||
* esmart layer[premulti_en = 0]
|
||||
* Cd = As * Cs + (1 - As) * Cd * Agd
|
||||
**/
|
||||
if (vop2_cluster_window(win))
|
||||
alpha_config.src_premulti_en = true;
|
||||
alpha_config.dst_premulti_en = false;
|
||||
alpha_config.src_pixel_alpha_en = pixel_alpha_en;
|
||||
alpha_config.src_glb_alpha_value = vpstate->global_alpha;
|
||||
alpha_config.dst_glb_alpha_value = dst_global_alpha;
|
||||
} else if (vop2_cluster_window(win)) {/* Mix output data only have pixel alpha */
|
||||
/* The data from cluster mix is always premultiplied alpha */
|
||||
alpha_config.src_premulti_en = true;
|
||||
alpha_config.dst_premulti_en = true;
|
||||
alpha_config.src_pixel_alpha_en = true;
|
||||
alpha_config.src_glb_alpha_value = 0xff;
|
||||
@@ -10381,12 +10392,23 @@ static void vop3_setup_alpha(struct vop2_video_port *vp,
|
||||
pixel_alpha_en = is_alpha_support(fb->format->format);
|
||||
|
||||
alpha_config.src_premulti_en = premulti_en;
|
||||
if (bottom_layer_alpha_en && i == 1) {/* Cd = Cs + (1 - As) * Cd * Agd */
|
||||
if (bottom_layer_alpha_en && i == 1) {
|
||||
/**
|
||||
* The data from cluster mix is always premultiplied alpha;
|
||||
* cluster layer or esmart layer[premulti_en = 1]
|
||||
* Cd = Cs + (1 - As) * Cd * Agd
|
||||
* esmart layer[premulti_en = 0]
|
||||
* Cd = As * Cs + (1 - As) * Cd * Agd
|
||||
**/
|
||||
if (vop2_cluster_window(win))
|
||||
alpha_config.src_premulti_en = true;
|
||||
alpha_config.dst_premulti_en = false;
|
||||
alpha_config.src_pixel_alpha_en = pixel_alpha_en;
|
||||
alpha_config.src_glb_alpha_value = vpstate->global_alpha;
|
||||
alpha_config.dst_glb_alpha_value = dst_global_alpha;
|
||||
} else if (vop2_cluster_window(win)) {/* Mix output data only have pixel alpha */
|
||||
/* The data from cluster mix is always premultiplied alpha */
|
||||
alpha_config.src_premulti_en = true;
|
||||
alpha_config.dst_premulti_en = true;
|
||||
alpha_config.src_pixel_alpha_en = true;
|
||||
alpha_config.src_glb_alpha_value = 0xff;
|
||||
|
||||
Reference in New Issue
Block a user