diff options
author | Dillon Varone <dillon.varone@amd.com> | 2023-11-21 15:07:01 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-12-19 14:59:02 -0500 |
commit | 012a04b1d6af629077bf98e172d946bf893a4726 (patch) | |
tree | 9997053cef2ab445d5c4d62a75df37cb156a9bd8 /drivers/gpu/drm/amd/display/dc/dc.h | |
parent | 09a4ec5da92c84952db117f0d576fdd8368c873a (diff) |
drm/amd/display: Refactor phantom resource allocation
[WHY?]
Phantom streams and planes were previously not referenced explcitly on creation.
[HOW?]
To reduce memory management complexity, add an additional phantom streams and planes
reference into dc_state, and move mall_stream_config to stream_status inside
the state to make it safe to modify in shallow copies. Also consildates any logic
that is affected by this change to dc_state.
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Dillon Varone <dillon.varone@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/dc.h')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index d638679cf31a..a270b4bf7b95 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -1388,6 +1388,9 @@ struct dc_surface_update { const struct colorspace_transform *gamut_remap_matrix; }; +/* + * Create a new surface with default parameters; + */ void dc_gamma_retain(struct dc_gamma *dc_gamma); void dc_gamma_release(struct dc_gamma **dc_gamma); struct dc_gamma *dc_create_gamma(void); @@ -1451,27 +1454,12 @@ enum dc_status dc_validate_global_state( struct dc_state *new_ctx, bool fast_validate); - -void dc_resource_state_construct( - const struct dc *dc, - struct dc_state *dst_ctx); - bool dc_acquire_release_mpc_3dlut( struct dc *dc, bool acquire, struct dc_stream_state *stream, struct dc_3dlut **lut, struct dc_transfer_func **shaper); -void dc_resource_state_copy_construct( - const struct dc_state *src_ctx, - struct dc_state *dst_ctx); - -void dc_resource_state_copy_construct_current( - const struct dc *dc, - struct dc_state *dst_ctx); - -void dc_resource_state_destruct(struct dc_state *context); - bool dc_resource_is_dsc_encoding_supported(const struct dc *dc); enum dc_status dc_commit_streams(struct dc *dc, |