drm_hwcomposer: Assume premultiplied alpha for CLIENT layer

On db845c, we have seen an odd behavior with modal dialogs in
AOSP, where the background which is normally darkened, was
rendering as black, though it would occasionally flicker to the
right thing. This cropped up after alpha support on planes
landed in 5.15, so we assumed it was an edge case issue with the
dpu1 driver.

But while working on a separate issue seen on x86 hardware:

Roman noticed drm_hwcomposer always sets the blending type to
NONE for the client layer. Which had gone un-noticed becase he
didn't have any devices that exposed the NONE type.

Thus Roman implemented this patch, which sets up the client
blend type to PREMULTIPLIED.

While it did not resolve the x86 issue above, it does resolve
the incorrect rendering seen on db845c with alpha support

Tested-by: Martin Juecker martin.juecker@gmail.com #Exynos 4412
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I95601c680ca1af0dc9d3b3f102f79f77af081b75
diff --git a/DrmHwcTwo.cpp b/DrmHwcTwo.cpp
index 6faec1c..9bf1327 100644
--- a/DrmHwcTwo.cpp
+++ b/DrmHwcTwo.cpp
@@ -341,6 +341,8 @@
     return HWC2::Error::BadDisplay;
+  client_layer_.SetLayerBlendMode(HWC2_BLEND_MODE_PREMULTIPLIED);
   return ChosePreferredConfig();