From: Wayne Lin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <Harry.Wentland@amd.com>, <Sunpeng.Li@amd.com>,
<Rodrigo.Siqueira@amd.com>, <Aurabindo.Pillai@amd.com>,
<roman.li@amd.com>, <wayne.lin@amd.com>,
<agustin.gutierrez@amd.com>, <chiahsuan.chung@amd.com>,
<jerry.zuo@amd.com>, <zaeem.mohamed@amd.com>,
Michael Strauss <michael.strauss@amd.com>,
Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Subject: [PATCH 07/22] drm/amd/display: Fix overlay with pre-blend color processing
Date: Tue, 30 Jul 2024 15:18:28 +0800 [thread overview]
Message-ID: <20240730071843.880430-8-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20240730071843.880430-1-Wayne.Lin@amd.com>
From: Michael Strauss <michael.strauss@amd.com>
[WHY]
Overlay works similarly to MPO, but uses global alpha on both planes and
sets the desktop as the rear plane instead of the front plane
[HOW]
Ensure that top plane isn't overlay by checking global alpha before
applying the previously added MPO fix
Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Michael Strauss <michael.strauss@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
index 3cd584419b88..a7b5b25e3f34 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
@@ -2586,8 +2586,11 @@ static bool dcn10_is_rear_mpo_fix_required(struct pipe_ctx *pipe_ctx, enum dc_co
while (top->top_pipe)
top = top->top_pipe; // Traverse to top pipe_ctx
- if (top->plane_state && top->plane_state->layer_index == 0)
- return true; // Front MPO plane not hidden
+ if (top->plane_state && top->plane_state->layer_index == 0 && !top->plane_state->global_alpha)
+ // Global alpha used by top plane for PIP overlay
+ // Pre-multiplied/per-pixel alpha used by MPO
+ // Check top plane's global alpha to ensure layer_index > 0 not caused by PIP
+ return true; // MPO in use and front plane not hidden
}
}
return false;
--
2.37.3
next prev parent reply other threads:[~2024-07-30 7:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 7:18 [PATCH 00/22] DC Patches July 29, 2024 Wayne Lin
2024-07-30 7:18 ` [PATCH 01/22] drm/amd/display: Add missing DCN314 to the DML Makefile Wayne Lin
2024-07-30 7:18 ` [PATCH 02/22] drm/amd/display: Cleanup dml2 and dc/resource Makefile Wayne Lin
2024-07-30 7:18 ` [PATCH 03/22] drm/amd/display: Remove useless defines Wayne Lin
2024-07-30 7:18 ` [PATCH 04/22] drm/amd/display: Remove unused fields from dmub_cmd_update_dirty_rect_data Wayne Lin
2024-07-30 7:18 ` [PATCH 05/22] drm/amd/display: Remove unused fields from dc_caps Wayne Lin
2024-07-30 7:18 ` [PATCH 06/22] drm/amd/display: Add missing program DET segment call to pipe init Wayne Lin
2024-07-30 7:18 ` Wayne Lin [this message]
2024-07-30 7:18 ` [PATCH 08/22] drm/amd/display: Add stream and char control callback Wayne Lin
2024-07-30 7:18 ` [PATCH 09/22] drm/amd/display: fix a UBSAN warning in DML2.1 Wayne Lin
2024-07-30 7:18 ` [PATCH 10/22] drm/amd/display: Print Pcon FRL Link BW in Debug Message Wayne Lin
2024-07-30 7:18 ` [PATCH 11/22] drm/amd/display: Disable SubVP if Hardware Rotation is Used Wayne Lin
2024-07-30 7:18 ` [PATCH 12/22] drm/amd/display: Assume 32 bpp cursor in DML21 Wayne Lin
2024-07-30 7:18 ` [PATCH 13/22] drm/amd/display: Force enable 3DLUT DMA check for dcn401 in DML Wayne Lin
2024-07-30 7:18 ` [PATCH 14/22] drm/amd/display: Re-enable panel replay feature Wayne Lin
2024-07-30 7:18 ` [PATCH 15/22] drm/amd/display: Add clock control callbacks Wayne Lin
2024-07-30 7:18 ` [PATCH 16/22] drm/amd/display: skip crtc power down when ips switch Wayne Lin
2024-07-30 7:18 ` [PATCH 17/22] drm/amd/display: Skip Recompute DSC Params if no Stream on Link Wayne Lin
2024-07-30 7:18 ` [PATCH 18/22] drm/amd/display: Address coverity change Wayne Lin
2024-07-30 7:18 ` [PATCH 19/22] drm/amd/display: Add clock control callbacks Wayne Lin
2024-07-30 7:18 ` [PATCH 20/22] drm/amd/display: Revert Avoid overflow assignment Wayne Lin
2024-07-30 7:18 ` [PATCH 21/22] drm/amd/display: Add DML2.1 option to disable DRR clamped P-State Strategies Wayne Lin
2024-07-30 7:18 ` [PATCH 22/22] drm/amd/display: 3.2.295 Wayne Lin
2024-08-06 13:10 ` [PATCH 00/22] DC Patches July 29, 2024 Wheeler, Daniel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240730071843.880430-8-Wayne.Lin@amd.com \
--to=wayne.lin@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=agustin.gutierrez@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chiahsuan.chung@amd.com \
--cc=jerry.zuo@amd.com \
--cc=michael.strauss@amd.com \
--cc=roman.li@amd.com \
--cc=zaeem.mohamed@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox