]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/display: correct check of coverage blend mode
authorMelissa Wen <mwen@igalia.com>
Tue, 12 Jul 2022 11:32:39 +0000 (10:32 -0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Jul 2022 15:25:18 +0000 (11:25 -0400)
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")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index d96a99d1c09e35779bac0d70ddc0a15e633e04d1..c66ecedf64e5917a3e24c06fb74bff4eb86d90cc 100644 (file)
@@ -5550,7 +5550,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;
        }