File tree Expand file tree Collapse file tree 10 files changed +36
-0
lines changed
drivers/gpu/drm/amd/display/dc Expand file tree Collapse file tree 10 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -6109,3 +6109,21 @@ struct dc_power_profile dc_get_power_profile_for_dc_state(const struct dc_state
6109
6109
profile .power_level = dc -> res_pool -> funcs -> get_power_profile (context );
6110
6110
return profile ;
6111
6111
}
6112
+
6113
+ /*
6114
+ **********************************************************************************
6115
+ * dc_get_det_buffer_size_from_state() - extracts detile buffer size from dc state
6116
+ *
6117
+ * Called when DM wants to log detile buffer size from dc_state
6118
+ *
6119
+ **********************************************************************************
6120
+ */
6121
+ unsigned int dc_get_det_buffer_size_from_state (const struct dc_state * context )
6122
+ {
6123
+ struct dc * dc = context -> clk_mgr -> ctx -> dc ;
6124
+
6125
+ if (dc -> res_pool -> funcs -> get_det_buffer_size )
6126
+ return dc -> res_pool -> funcs -> get_det_buffer_size (context );
6127
+ else
6128
+ return 0 ;
6129
+ }
Original file line number Diff line number Diff line change @@ -2550,6 +2550,8 @@ struct dc_power_profile {
2550
2550
2551
2551
struct dc_power_profile dc_get_power_profile_for_dc_state (const struct dc_state * context );
2552
2552
2553
+ unsigned int dc_get_det_buffer_size_from_state (const struct dc_state * context );
2554
+
2553
2555
/* DSC Interfaces */
2554
2556
#include "dc_dsc.h"
2555
2557
Original file line number Diff line number Diff line change @@ -219,6 +219,7 @@ struct resource_funcs {
219
219
* Get indicator of power from a context that went through full validation
220
220
*/
221
221
int (* get_power_profile )(const struct dc_state * context );
222
+ unsigned int (* get_det_buffer_size )(const struct dc_state * context );
222
223
};
223
224
224
225
struct audio_support {
Original file line number Diff line number Diff line change @@ -1720,6 +1720,12 @@ int dcn31_populate_dml_pipes_from_context(
1720
1720
return pipe_cnt ;
1721
1721
}
1722
1722
1723
+ unsigned int dcn31_get_det_buffer_size (
1724
+ const struct dc_state * context )
1725
+ {
1726
+ return context -> bw_ctx .dml .ip .det_buffer_size_kbytes ;
1727
+ }
1728
+
1723
1729
void dcn31_calculate_wm_and_dlg (
1724
1730
struct dc * dc , struct dc_state * context ,
1725
1731
display_e2e_pipe_params_st * pipes ,
@@ -1842,6 +1848,7 @@ static struct resource_funcs dcn31_res_pool_funcs = {
1842
1848
.update_bw_bounding_box = dcn31_update_bw_bounding_box ,
1843
1849
.patch_unknown_plane_state = dcn20_patch_unknown_plane_state ,
1844
1850
.get_panel_config_defaults = dcn31_get_panel_config_defaults ,
1851
+ .get_det_buffer_size = dcn31_get_det_buffer_size ,
1845
1852
};
1846
1853
1847
1854
static struct clock_source * dcn30_clock_source_create (
Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ struct resource_pool *dcn31_create_resource_pool(
63
63
const struct dc_init_data * init_data ,
64
64
struct dc * dc );
65
65
66
+ unsigned int dcn31_get_det_buffer_size (
67
+ const struct dc_state * context );
68
+
66
69
/*temp: B0 specific before switch to dcn313 headers*/
67
70
#ifndef regPHYPLLF_PIXCLK_RESYNC_CNTL
68
71
#define regPHYPLLF_PIXCLK_RESYNC_CNTL 0x007e
Original file line number Diff line number Diff line change @@ -1777,6 +1777,7 @@ static struct resource_funcs dcn314_res_pool_funcs = {
1777
1777
.patch_unknown_plane_state = dcn20_patch_unknown_plane_state ,
1778
1778
.get_panel_config_defaults = dcn314_get_panel_config_defaults ,
1779
1779
.get_preferred_eng_id_dpia = dcn314_get_preferred_eng_id_dpia ,
1780
+ .get_det_buffer_size = dcn31_get_det_buffer_size ,
1780
1781
};
1781
1782
1782
1783
static struct clock_source * dcn30_clock_source_create (
Original file line number Diff line number Diff line change @@ -1845,6 +1845,7 @@ static struct resource_funcs dcn315_res_pool_funcs = {
1845
1845
.patch_unknown_plane_state = dcn20_patch_unknown_plane_state ,
1846
1846
.get_panel_config_defaults = dcn315_get_panel_config_defaults ,
1847
1847
.get_power_profile = dcn315_get_power_profile ,
1848
+ .get_det_buffer_size = dcn31_get_det_buffer_size ,
1848
1849
};
1849
1850
1850
1851
static bool dcn315_resource_construct (
Original file line number Diff line number Diff line change @@ -1719,6 +1719,7 @@ static struct resource_funcs dcn316_res_pool_funcs = {
1719
1719
.update_bw_bounding_box = dcn316_update_bw_bounding_box ,
1720
1720
.patch_unknown_plane_state = dcn20_patch_unknown_plane_state ,
1721
1721
.get_panel_config_defaults = dcn316_get_panel_config_defaults ,
1722
+ .get_det_buffer_size = dcn31_get_det_buffer_size ,
1722
1723
};
1723
1724
1724
1725
static bool dcn316_resource_construct (
Original file line number Diff line number Diff line change @@ -1778,6 +1778,7 @@ static struct resource_funcs dcn35_res_pool_funcs = {
1778
1778
.patch_unknown_plane_state = dcn20_patch_unknown_plane_state ,
1779
1779
.get_panel_config_defaults = dcn35_get_panel_config_defaults ,
1780
1780
.get_preferred_eng_id_dpia = dcn35_get_preferred_eng_id_dpia ,
1781
+ .get_det_buffer_size = dcn31_get_det_buffer_size ,
1781
1782
};
1782
1783
1783
1784
static bool dcn35_resource_construct (
Original file line number Diff line number Diff line change @@ -1757,6 +1757,7 @@ static struct resource_funcs dcn351_res_pool_funcs = {
1757
1757
.patch_unknown_plane_state = dcn20_patch_unknown_plane_state ,
1758
1758
.get_panel_config_defaults = dcn35_get_panel_config_defaults ,
1759
1759
.get_preferred_eng_id_dpia = dcn351_get_preferred_eng_id_dpia ,
1760
+ .get_det_buffer_size = dcn31_get_det_buffer_size ,
1760
1761
};
1761
1762
1762
1763
static bool dcn351_resource_construct (
You can’t perform that action at this time.
0 commit comments