summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlvin Lee <alvin.lee2@amd.com>2023-06-19 11:55:57 -0400
committerAlex Deucher <alexander.deucher@amd.com>2023-06-30 13:12:16 -0400
commitc85c2c849ce776d5039a77d56936a216f9a07b57 (patch)
treefcddc0567ba27e0ed13fd7cc2f64c8fa6a8cc21e /drivers
parentd5b5d6cb1d5ea7e2cf804aac40c23a860a2c28c3 (diff)
downloadlinux-stable-c85c2c849ce776d5039a77d56936a216f9a07b57.tar.gz
linux-stable-c85c2c849ce776d5039a77d56936a216f9a07b57.tar.bz2
linux-stable-c85c2c849ce776d5039a77d56936a216f9a07b57.zip
drm/amd/display: Take full update path if number of planes changed
[Description] - A full update is required if the number of planes for a given stream changes - The new fast update path only checked for stream and plane updates, but there could be a plane addition or removal without one of the stream and plane updates triggering a full update - Add an explicit check for number of planes changing for a full update Reviewed-by: Samson Tam <samson.tam@amd.com> Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alvin Lee <alvin.lee2@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 68eabb5f3a39..d133e4186a52 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -4286,10 +4286,12 @@ static bool fast_updates_exist(struct dc_fast_update *fast_update, int surface_c
static bool full_update_required(struct dc_surface_update *srf_updates,
int surface_count,
- struct dc_stream_update *stream_update)
+ struct dc_stream_update *stream_update,
+ struct dc_stream_state *stream)
{
int i;
+ struct dc_stream_status *stream_status;
for (i = 0; i < surface_count; i++) {
if (srf_updates &&
@@ -4333,16 +4335,23 @@ static bool full_update_required(struct dc_surface_update *srf_updates,
stream_update->crtc_timing_adjust))
return true;
+ if (stream) {
+ stream_status = dc_stream_get_status(stream);
+ if (stream_status == NULL || stream_status->plane_count != surface_count)
+ return true;
+ }
+
return false;
}
static bool fast_update_only(struct dc_fast_update *fast_update,
struct dc_surface_update *srf_updates,
int surface_count,
- struct dc_stream_update *stream_update)
+ struct dc_stream_update *stream_update,
+ struct dc_stream_state *stream)
{
return fast_updates_exist(fast_update, surface_count)
- && !full_update_required(srf_updates, surface_count, stream_update);
+ && !full_update_required(srf_updates, surface_count, stream_update, stream);
}
bool dc_update_planes_and_stream(struct dc *dc,
@@ -4414,7 +4423,7 @@ bool dc_update_planes_and_stream(struct dc *dc,
}
update_seamless_boot_flags(dc, context, surface_count, stream);
- if (fast_update_only(fast_update, srf_updates, surface_count, stream_update) &&
+ if (fast_update_only(fast_update, srf_updates, surface_count, stream_update, stream) &&
!dc->debug.enable_legacy_fast_update) {
commit_planes_for_stream_fast(dc,
srf_updates,
@@ -4560,7 +4569,7 @@ void dc_commit_updates_for_stream(struct dc *dc,
TRACE_DC_PIPE_STATE(pipe_ctx, i, MAX_PIPES);
update_seamless_boot_flags(dc, context, surface_count, stream);
- if (fast_update_only(fast_update, srf_updates, surface_count, stream_update) &&
+ if (fast_update_only(fast_update, srf_updates, surface_count, stream_update, stream) &&
!dc->debug.enable_legacy_fast_update) {
commit_planes_for_stream_fast(dc,
srf_updates,