diff options
author | Wenjing Liu <wenjing.liu@amd.com> | 2023-07-06 15:00:11 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-07-25 13:40:08 -0400 |
commit | 0f3b9542c9774a2c2ef0fc76387bb48c8fc46b36 (patch) | |
tree | 42857f8d14413c62e39fcfce0ac9dfd6ee510a25 /drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | |
parent | 6917b0b711713b9d84d7e0844e9aa613997a51b2 (diff) | |
download | lwn-0f3b9542c9774a2c2ef0fc76387bb48c8fc46b36.tar.gz lwn-0f3b9542c9774a2c2ef0fc76387bb48c8fc46b36.zip |
drm/amd/display: Refactor recout calculation with a more generic formula
[Why]
Current recout calculation has a few assumptions and implementation
for MPO + ODM combine calculation is very specific. The equation has
too many cases without enough comments to document the detail.
[How]
The change remove the following assumptions:
1. When MPO is enabled, we only allow ODM Combine 2:1
2. ODM Combine always has even segment width.
3. Secondary MPO plane's pipe_ctx copies pre_odm_pipe from
its top pipe.
The change applies a generic formula with more details in comment to
document this solution so it is eaiser to learn and debug later.
Reviewed-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c index abe4c12a10b5..f5bfcd2a0dbc 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c @@ -1705,8 +1705,8 @@ noinline bool dcn30_internal_validate_bw( /* We only support full screen mpo with ODM */ if (vba->ODMCombineEnabled[vba->pipe_plane[pipe_idx]] != dm_odm_combine_mode_disabled && pipe->plane_state && mpo_pipe - && memcmp(&mpo_pipe->plane_res.scl_data.recout, - &pipe->plane_res.scl_data.recout, + && memcmp(&mpo_pipe->plane_state->clip_rect, + &pipe->stream->src, sizeof(struct rect)) != 0) { ASSERT(mpo_pipe->plane_state != pipe->plane_state); goto validate_fail; |