diff options
author | Wenjing Liu <wenjing.liu@amd.com> | 2023-07-26 15:22:01 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-08-07 17:14:09 -0400 |
commit | d8e3fcd3ea152aa41c76dbc82c6df7e41264494b (patch) | |
tree | c802362f68ccd8d0e8d8d6b93d525e5010d5dc49 /drivers/gpu/drm/amd/display/dc/inc/resource.h | |
parent | 2b1b838ea8e5437ef06a29818d16e9efdfaf0037 (diff) |
drm/amd/display: move idle pipe allocation logic into dcn specific layer
[why]
generic dc resource file should not know what an optimal idle pipe is
because this is dcn hardware dependent.
[how]
We move the optimial pipe searching logic in dcn specific layer.
Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@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/inc/resource.h')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/inc/resource.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/inc/resource.h b/drivers/gpu/drm/amd/display/dc/inc/resource.h index 6ac6680711ff..c518ee8b1a03 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/resource.h +++ b/drivers/gpu/drm/amd/display/dc/inc/resource.h @@ -37,6 +37,7 @@ #define IS_PIPE_SYNCD_VALID(pipe) ((((pipe)->pipe_idx_syncd) & 0x80)?1:0) #define GET_PIPE_SYNCD_FROM_PIPE(pipe) ((pipe)->pipe_idx_syncd & 0x7F) #define SET_PIPE_SYNCD_TO_PIPE(pipe, pipe_syncd) ((pipe)->pipe_idx_syncd = (0x80 | pipe_syncd)) +#define IDLE_PIPE_INDEX_NOT_FOUND -1 enum dce_version resource_parse_asic_id( struct hw_asic_id asic_id); @@ -158,11 +159,23 @@ struct pipe_ctx *find_idle_secondary_pipe_legacy( const struct resource_pool *pool, const struct pipe_ctx *primary_pipe); -struct pipe_ctx *find_optimal_idle_pipe_as_secondary_dpp_pipe( +int resource_find_idle_pipe_used_in_cur_mpc_blending_tree( const struct resource_context *cur_res_ctx, struct resource_context *new_res_ctx, - const struct resource_pool *pool, - const struct pipe_ctx *new_pri); + const struct pipe_ctx *cur_opp_head); + +int recource_find_idle_pipe_not_used_in_cur_res_ctx( + const struct resource_context *cur_res_ctx, + struct resource_context *new_res_ctx, + const struct resource_pool *pool); + +int resource_find_idle_pipe_used_as_cur_sec_dpp_in_mpcc_combine( + const struct resource_context *cur_res_ctx, + struct resource_context *new_res_ctx, + const struct resource_pool *pool); + +int resource_find_any_idle_pipe(struct resource_context *new_res_ctx, + const struct resource_pool *pool); bool resource_validate_attach_surfaces( const struct dc_validation_set set[], |