diff options
| author | Alan Kwong <akwong@codeaurora.org> | 2016-09-27 07:41:56 -0400 |
|---|---|---|
| committer | Alan Kwong <akwong@codeaurora.org> | 2016-09-27 07:48:24 -0400 |
| commit | 31401d3de9c83b356d616ce07eac7435aeb293f5 (patch) | |
| tree | 10311392f050696417a81ec246f7c094cea81ed6 | |
| parent | 1c47cd4e2bcfea73ed32879c6da073240171d392 (diff) | |
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: Alan Kwong <akwong@codeaurora.org>
| -rw-r--r-- | drivers/gpu/drm/msm/sde/sde_hw_catalog.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/msm/sde/sde_hw_wb.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_hw_catalog.h b/drivers/gpu/drm/msm/sde/sde_hw_catalog.h index 85aa6b671258..91e7b90cbc76 100644 --- a/drivers/gpu/drm/msm/sde/sde_hw_catalog.h +++ b/drivers/gpu/drm/msm/sde/sde_hw_catalog.h @@ -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 }; diff --git a/drivers/gpu/drm/msm/sde/sde_hw_wb.c b/drivers/gpu/drm/msm/sde/sde_hw_wb.c index a776d5538d83..60141dcf9be5 100644 --- a/drivers/gpu/drm/msm/sde/sde_hw_wb.c +++ b/drivers/gpu/drm/msm/sde/sde_hw_wb.c @@ -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 */ } |
