drm/amd/display: Move fpo_in_use to stream_status
authorAlvin Lee <alvin.lee2@amd.com>
Fri, 26 Apr 2024 21:28:46 +0000 (17:28 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Jun 2024 15:06:36 +0000 (11:06 -0400)
commite69d43356ffdfb968c0c515bd42a8ad9a7399fcb
tree586c6725e8d7bbfa00fe1061d93016c20fab9ec1
parent4621e10e0158941d44223fd5f7451312473f73da
drm/amd/display: Move fpo_in_use to stream_status

[Description]
Refactor code and move fpo_in_use into stream_status to avoid
unexpected changes to previous dc_state (i.e., current_state).
Since stream pointers are shared between current and new dc_states,
updating parameters of one stream will update the other as well
which causes unexpected behaviors (i.e., checking that fpo_in_use
isn't set in previous state and set in the new state is invalid).
To avoid incorrect updates to current_state, move the fpo_in_use flag
into dc_stream_status since stream_status is owned by dc and are not
shared between different dc_states.

Reviewed-by: Samson Tam <samson.tam@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@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>
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
drivers/gpu/drm/amd/display/dc/dc_stream.h
drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c