From: Wayne Lin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: stylon.wang@amd.com, Aric Cyr <aric.cyr@amd.com>,
Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
qingqing.zhuo@amd.com, Rodrigo.Siqueira@amd.com,
roman.li@amd.com, Wenjing Liu <wenjing.liu@amd.com>,
solomon.chiu@amd.com, Aurabindo.Pillai@amd.com,
wayne.lin@amd.com, Bhawanpreet.Lakha@amd.com,
agustin.gutierrez@amd.com, pavle.kotarac@amd.com
Subject: [PATCH 05/19] drm/amd/display: remove guaranteed viewports limitation for odm
Date: Wed, 20 Sep 2023 11:16:10 +0800 [thread overview]
Message-ID: <20230920031624.3129206-6-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20230920031624.3129206-1-Wayne.Lin@amd.com>
From: Wenjing Liu <wenjing.liu@amd.com>
[why]
With the more generic hw minimal state transition sequence,
this limitation has been overcome.
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 34 -------------------
.../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 27 ---------------
2 files changed, 61 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index e2dcb836a0f0..a2360dfdc83b 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3948,40 +3948,6 @@ static bool could_mpcc_tree_change_for_active_pipes(struct dc *dc,
*is_plane_addition = true;
}
}
- if (dc->config.enable_windowed_mpo_odm) {
- const struct rect *guaranteed_viewport = &stream->src;
- const struct rect *surface_src, *surface_dst;
- bool are_cur_planes_guaranteed = true;
- bool are_new_planes_guaranteed = true;
-
- for (i = 0; i < cur_stream_status->plane_count; i++) {
- surface_src = &cur_stream_status->plane_states[i]->src_rect;
- surface_dst = &cur_stream_status->plane_states[i]->dst_rect;
- if ((surface_src->height > surface_dst->height && surface_src->height > guaranteed_viewport->height) ||
- (surface_src->width > surface_dst->width && surface_src->width > guaranteed_viewport->width))
- are_cur_planes_guaranteed = false;
- }
-
- for (i = 0; i < surface_count; i++) {
- if (srf_updates[i].scaling_info) {
- surface_src = &srf_updates[i].scaling_info->src_rect;
- surface_dst = &srf_updates[i].scaling_info->dst_rect;
- } else {
- surface_src = &srf_updates[i].surface->src_rect;
- surface_dst = &srf_updates[i].surface->dst_rect;
- }
- if ((surface_src->height > surface_dst->height && surface_src->height > guaranteed_viewport->height) ||
- (surface_src->width > surface_dst->width && surface_src->width > guaranteed_viewport->width))
- are_new_planes_guaranteed = false;
- }
-
- if (are_cur_planes_guaranteed && !are_new_planes_guaranteed) {
- force_minimal_pipe_splitting = true;
- *is_plane_addition = true;
- } else if (!are_cur_planes_guaranteed && are_new_planes_guaranteed) {
- force_minimal_pipe_splitting = true;
- }
- }
}
for (i = 0; i < dc->res_pool->pipe_count; i++) {
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
index 1f53883d8f56..dcbd38bb3ed1 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
@@ -1267,8 +1267,6 @@ static bool should_allow_odm_power_optimization(struct dc *dc,
{
struct dc_stream_state *stream = context->streams[0];
struct pipe_slice_table slice_table;
- struct dc_plane_state *plane;
- struct rect guaranteed_viewport;
int i;
/*
@@ -1333,31 +1331,6 @@ static bool should_allow_odm_power_optimization(struct dc *dc,
for (i = 0; i < slice_table.odm_combine_count; i++)
if (slice_table.odm_combines[i].slice_count > 1)
return false;
-
- /* up to here we know that a plane with viewport equal to stream
- * src can be validated with single DPP pipe. Therefore any
- * planes with smaller or equal viewport is guaranteed to work
- * regardless of its position and scaling ratio. Also we know
- * any plane without downscale ratio greater than 1 should also
- * work. Up until DCN3x we still have software limitation that
- * doesn't implement a smooth transition between ODM combine and
- * MPC combine during plane resizing when we are crossing ODM
- * capability boundary. So we are adding this guaranteed
- * viewport condition to limit ODM power optimization support
- * for only the planes within the guaranteed viewport size. Such
- * planes can be supported with ODM power optimization without
- * ever the need to transition to MPC combine in any scaling
- * ratios and positions. Therefore we cover the software
- * limitation of this transition sequence.
- */
- guaranteed_viewport = stream->src;
- for (i = 0; i < context->stream_status[0].plane_count; i++) {
- plane = context->stream_status[0].plane_states[i];
-
- if ((plane->src_rect.height > plane->dst_rect.height && plane->src_rect.height > guaranteed_viewport.height) ||
- (plane->src_rect.width > plane->dst_rect.width && plane->src_rect.width > guaranteed_viewport.width))
- return false;
- }
} else {
/*
* the new ODM power optimization feature reduces software
--
2.37.3
next prev parent reply other threads:[~2023-09-20 3:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 3:16 [PATCH 00/19] DC Patches September 22, 2023 Wayne Lin
2023-09-20 3:16 ` [PATCH 01/19] drm/amd/display: remove unused mmhub_reg_offsets Wayne Lin
2023-09-20 3:16 ` [PATCH 02/19] drm/amd/display: determine fast update only before commit minimal transition state Wayne Lin
2023-09-20 3:16 ` [PATCH 03/19] drm/amd/display: reset stream slice count for new ODM policy Wayne Lin
2023-09-20 3:16 ` [PATCH 04/19] drm/amd/display: add new windowed mpo odm minimal transition sequence Wayne Lin
2023-09-20 3:16 ` Wayne Lin [this message]
2023-09-20 3:16 ` [PATCH 06/19] drm/amd/display: Improve x86 and dmub ips handshake Wayne Lin
2023-09-20 3:16 ` [PATCH 07/19] drm/amd/display: Fix DP2.0 timing sync Wayne Lin
2023-09-20 3:16 ` [PATCH 08/19] drm/amd/display: block MPO if it prevents pstate support Wayne Lin
2023-09-20 3:16 ` [PATCH 09/19] drm/amd/display: skip audio config for virtual signal Wayne Lin
2023-09-20 3:16 ` [PATCH 10/19] drm/amd/display: Improve code style on bios_parser2 Wayne Lin
2023-09-20 3:16 ` [PATCH 11/19] drm/amd/display: augment display clock in dc_cap structure Wayne Lin
2023-09-20 3:16 ` [PATCH 12/19] drm/amd/display: Update OPP counter from new interface Wayne Lin
2023-09-20 3:16 ` [PATCH 13/19] drm/amd/display: Break after finding supported vlevel for repopulate Wayne Lin
2023-09-20 3:16 ` [PATCH 14/19] drm/amd/display: Rename DisableMinDispClkODM in dc_config Wayne Lin
2023-09-20 3:16 ` [PATCH 15/19] drm/amd/display: add missing function pointer for DCN321 resource Wayne Lin
2023-09-20 3:16 ` [PATCH 16/19] drm/amd/display: add get primary dpp pipe resource interface Wayne Lin
2023-09-20 3:16 ` [PATCH 17/19] drm/amd/display: add primary pipe check when building slice table for dcn3x Wayne Lin
2023-09-20 3:16 ` [PATCH 18/19] drm/amd/display: fix incorrect odm change detection logic Wayne Lin
2023-09-20 3:16 ` [PATCH 19/19] drm/amd/display: 3.2.253 Wayne Lin
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=20230920031624.3129206-6-Wayne.Lin@amd.com \
--to=wayne.lin@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Bhawanpreet.Lakha@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=aric.cyr@amd.com \
--cc=pavle.kotarac@amd.com \
--cc=qingqing.zhuo@amd.com \
--cc=roman.li@amd.com \
--cc=solomon.chiu@amd.com \
--cc=stylon.wang@amd.com \
--cc=wenjing.liu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.