mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
drm/amd/display: Make new dc interface for adding dsc resource
[Why] dcn20_add_dsc_to_stream_resource is accessed in amdgpu_dm directly. This creates build error for configuration with DCN disabled. [How] Make the function available through a resource pool function so that dcn20 function need not be called directly. Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
6d824ed524
commit
b4f71c8c79
5 changed files with 20 additions and 1 deletions
|
@ -674,6 +674,17 @@ bool dc_stream_set_dynamic_metadata(struct dc *dc,
|
|||
return true;
|
||||
}
|
||||
|
||||
enum dc_status dc_stream_add_dsc_to_resource(struct dc *dc,
|
||||
struct dc_state *state,
|
||||
struct dc_stream_state *stream)
|
||||
{
|
||||
if (dc->res_pool->funcs->add_dsc_to_stream_resource) {
|
||||
return dc->res_pool->funcs->add_dsc_to_stream_resource(dc, state, stream);
|
||||
} else {
|
||||
return DC_NO_DSC_RESOURCE;
|
||||
}
|
||||
}
|
||||
|
||||
void dc_stream_log(const struct dc *dc, const struct dc_stream_state *stream)
|
||||
{
|
||||
DC_LOG_DC(
|
||||
|
|
|
@ -363,6 +363,10 @@ bool dc_stream_remove_writeback(struct dc *dc,
|
|||
struct dc_stream_state *stream,
|
||||
uint32_t dwb_pipe_inst);
|
||||
|
||||
enum dc_status dc_stream_add_dsc_to_resource(struct dc *dc,
|
||||
struct dc_state *state,
|
||||
struct dc_stream_state *stream);
|
||||
|
||||
bool dc_stream_warmup_writeback(struct dc *dc,
|
||||
int num_dwb,
|
||||
struct dc_writeback_info *wb_info);
|
||||
|
|
|
@ -3364,6 +3364,7 @@ static struct resource_funcs dcn20_res_pool_funcs = {
|
|||
.validate_bandwidth = dcn20_validate_bandwidth,
|
||||
.acquire_idle_pipe_for_layer = dcn20_acquire_idle_pipe_for_layer,
|
||||
.add_stream_to_ctx = dcn20_add_stream_to_ctx,
|
||||
.add_dsc_to_stream_resource = dcn20_add_dsc_to_stream_resource,
|
||||
.remove_stream_from_ctx = dcn20_remove_stream_from_ctx,
|
||||
.populate_dml_writeback_from_context = dcn20_populate_dml_writeback_from_context,
|
||||
.patch_unknown_plane_state = dcn20_patch_unknown_plane_state,
|
||||
|
|
|
@ -1759,6 +1759,7 @@ static struct resource_funcs dcn21_res_pool_funcs = {
|
|||
.validate_bandwidth = dcn21_validate_bandwidth,
|
||||
.populate_dml_pipes = dcn21_populate_dml_pipes_from_context,
|
||||
.add_stream_to_ctx = dcn20_add_stream_to_ctx,
|
||||
.add_dsc_to_stream_resource = dcn20_add_dsc_to_stream_resource,
|
||||
.remove_stream_from_ctx = dcn20_remove_stream_from_ctx,
|
||||
.acquire_idle_pipe_for_layer = dcn20_acquire_idle_pipe_for_layer,
|
||||
.populate_dml_writeback_from_context = dcn20_populate_dml_writeback_from_context,
|
||||
|
|
|
@ -165,7 +165,9 @@ struct resource_funcs {
|
|||
struct dc_3dlut **lut,
|
||||
struct dc_transfer_func **shaper);
|
||||
#endif
|
||||
|
||||
enum dc_status (*add_dsc_to_stream_resource)(
|
||||
struct dc *dc, struct dc_state *state,
|
||||
struct dc_stream_state *stream);
|
||||
};
|
||||
|
||||
struct audio_support{
|
||||
|
|
Loading…
Add table
Reference in a new issue