Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ffcd59d authored by Alan Kwong's avatar Alan Kwong Committed by Narendra Muppalla
Browse files

drm/msm/sde: use const alpha for wb if pipe alpha not supported



Writeback can source alpha from upper pipe or from constant
alpha. When pipe alpha is not supported, use constant alpha
to supply alpha value for writeback.

Change-Id: I4381aeb35bc1ef4c18e70174880b223a61e89024
Signed-off-by: default avatarAlan Kwong <akwong@codeaurora.org>
parent e0d19e4c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ enum {
 *                          support
 * @SDE_WB_WBWC_1_5         UBWC 1.5 support
 * @SDE_WB_YUV_CONFIG       Writeback supports output of YUV colorspace
 * @SDE_WB_PIPE_ALPHA       Writeback supports pipe alpha
 * @SDE_WB_MAX              maximum value
 */
enum {
@@ -187,6 +188,7 @@ enum {
	SDE_WB_TRAFFIC_SHAPER,
	SDE_WB_UBWC_1_0,
	SDE_WB_YUV_CONFIG,
	SDE_WB_PIPE_ALPHA,
	SDE_WB_MAX
};

+2 −1
Original line number Diff line number Diff line
@@ -96,7 +96,8 @@ static void sde_hw_wb_setup_format(struct sde_hw_wb *ctx,

	if (fmt->bits[C3_ALPHA] || fmt->alpha_enable) {
		dst_format |= BIT(8); /* DSTC3_EN */
		if (!fmt->alpha_enable)
		if (!fmt->alpha_enable ||
				!(ctx->caps->features & BIT(SDE_WB_PIPE_ALPHA)))
			dst_format |= BIT(14); /* DST_ALPHA_X */
	}