Skip to contentSkip to conversation

drm/amd/display: correct check of coverage blend mode

PATCH Applied Melissa Wen 3 participants 3 messages Jul 12, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: correct check of coverage blend mode

Check the value of per_pixel_alpha to decide whether the Coverage pixel blend mode is applicable or not.

Fixes 76818cdd11a2 ("drm/amd/display: add Coverage blend mode for overlay plane")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index de1c139ae279..25cb833b267c 100644
@@ -5486,7 +5486,7 @@ fill_blending_from_plane_state(const struct drm_plane_state *plane_state,
 			}
 		}
 
-		if (per_pixel_alpha && plane_state->pixel_blend_mode == DRM_MODE_BLEND_COVERAGE)
+		if (*per_pixel_alpha && plane_state->pixel_blend_mode == DRM_MODE_BLEND_COVERAGE)
 			*pre_multiplied_alpha = false;
 	}
 
Signature · 1 line
2.35.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Melissa Wen

Check the value of per_pixel_alpha to decide whether the Coverage pixel blend mode is applicable or not.

Fixes 76818cdd11a2 ("drm/amd/display: add Coverage blend mode for overlay plane")

Harry

Quoted 17 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index de1c139ae279..25cb833b267c 100644
@@ -5486,7 +5486,7 @@ fill_blending_from_plane_state(const struct drm_plane_state *plane_state,
 			}
 		}
 
-		if (per_pixel_alpha && plane_state->pixel_blend_mode == DRM_MODE_BLEND_COVERAGE)
+		if (*per_pixel_alpha && plane_state->pixel_blend_mode == DRM_MODE_BLEND_COVERAGE)
 			*pre_multiplied_alpha = false;
 	}
 
Applied
#2 lore raw

Applied. Thanks!

Alex

Quoted 32 lines · Harry Wentland
Quoted 7 lines · Melissa Wen

Check the value of per_pixel_alpha to decide whether the Coverage pixel blend mode is applicable or not.

Fixes 76818cdd11a2 ("drm/amd/display: add Coverage blend mode for overlay plane")

Harry

Quoted 17 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index de1c139ae279..25cb833b267c 100644
@@ -5486,7 +5486,7 @@ fill_blending_from_plane_state(const struct drm_plane_state *plane_state,
                      }
              }
 
-             if (per_pixel_alpha && plane_state->pixel_blend_mode == DRM_MODE_BLEND_COVERAGE)
+             if (*per_pixel_alpha && plane_state->pixel_blend_mode == DRM_MODE_BLEND_COVERAGE)
                      *pre_multiplied_alpha = false;
      }