hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/gpu/drm/amd/display/dc/inc/resource.h
....@@ -30,8 +30,9 @@
3030 #include "dal_asic_id.h"
3131 #include "dm_pp_smu.h"
3232
33
-/* TODO unhardcode, 4 for CZ*/
34
-#define MEMORY_TYPE_MULTIPLIER 4
33
+#define MEMORY_TYPE_MULTIPLIER_CZ 4
34
+#define MEMORY_TYPE_HBM 2
35
+
3536
3637 enum dce_version resource_parse_asic_id(
3738 struct hw_asic_id asic_id);
....@@ -44,6 +45,12 @@
4445 int num_stream_encoder;
4546 int num_pll;
4647 int num_dwb;
48
+ int num_ddc;
49
+ int num_vmid;
50
+ int num_dsc;
51
+#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
52
+ int num_mpc_3dlut;
53
+#endif
4754 };
4855
4956 struct resource_straps {
....@@ -72,11 +79,9 @@
7279 struct resource_pool *pool,
7380 const struct resource_create_funcs *create_funcs);
7481
75
-struct resource_pool *dc_create_resource_pool(
76
- struct dc *dc,
77
- int num_virtual_links,
78
- enum dce_version dc_version,
79
- struct hw_asic_id asic_id);
82
+struct resource_pool *dc_create_resource_pool(struct dc *dc,
83
+ const struct dc_init_data *init_data,
84
+ enum dce_version dc_version);
8085
8186 void dc_destroy_resource_pool(struct dc *dc);
8287
....@@ -133,10 +138,8 @@
133138
134139 struct pipe_ctx *find_idle_secondary_pipe(
135140 struct resource_context *res_ctx,
136
- const struct resource_pool *pool);
137
-
138
-bool resource_is_stream_unchanged(
139
- struct dc_state *old_context, struct dc_stream_state *stream);
141
+ const struct resource_pool *pool,
142
+ const struct pipe_ctx *primary_pipe);
140143
141144 bool resource_validate_attach_surfaces(
142145 const struct dc_validation_set set[],
....@@ -171,4 +174,14 @@
171174 const struct resource_pool *pool,
172175 struct audio *audio,
173176 bool acquired);
177
+
178
+unsigned int resource_pixel_format_to_bpp(enum surface_pixel_format format);
179
+
180
+void get_audio_check(struct audio_info *aud_modes,
181
+ struct audio_check *aud_chk);
182
+
183
+int get_num_mpc_splits(struct pipe_ctx *pipe);
184
+
185
+int get_num_odm_splits(struct pipe_ctx *pipe);
186
+
174187 #endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */