diff options
29 files changed, 222 insertions, 222 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index af6bed907d10..497104a29d89 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |||
@@ -116,7 +116,8 @@ static u32 dm_vblank_get_counter(struct amdgpu_device *adev, int crtc) | |||
116 | 116 | ||
117 | 117 | ||
118 | if (acrtc_state->stream == NULL) { | 118 | if (acrtc_state->stream == NULL) { |
119 | DRM_ERROR("dc_stream is NULL for crtc '%d'!\n", crtc); | 119 | DRM_ERROR("dc_stream_state is NULL for crtc '%d'!\n", |
120 | crtc); | ||
120 | return 0; | 121 | return 0; |
121 | } | 122 | } |
122 | 123 | ||
@@ -137,7 +138,8 @@ static int dm_crtc_get_scanoutpos(struct amdgpu_device *adev, int crtc, | |||
137 | acrtc->base.state); | 138 | acrtc->base.state); |
138 | 139 | ||
139 | if (acrtc_state->stream == NULL) { | 140 | if (acrtc_state->stream == NULL) { |
140 | DRM_ERROR("dc_stream is NULL for crtc '%d'!\n", crtc); | 141 | DRM_ERROR("dc_stream_state is NULL for crtc '%d'!\n", |
142 | crtc); | ||
141 | return 0; | 143 | return 0; |
142 | } | 144 | } |
143 | 145 | ||
@@ -1441,7 +1443,7 @@ static int amdgpu_notify_freesync(struct drm_device *dev, void *data, | |||
1441 | num_streams = dc_get_current_stream_count(adev->dm.dc); | 1443 | num_streams = dc_get_current_stream_count(adev->dm.dc); |
1442 | 1444 | ||
1443 | for (i = 0; i < num_streams; i++) { | 1445 | for (i = 0; i < num_streams; i++) { |
1444 | struct dc_stream *stream; | 1446 | struct dc_stream_state *stream; |
1445 | stream = dc_get_stream_at_index(adev->dm.dc, i); | 1447 | stream = dc_get_stream_at_index(adev->dm.dc, i); |
1446 | 1448 | ||
1447 | mod_freesync_update_state(adev->dm.freesync_module, | 1449 | mod_freesync_update_state(adev->dm.freesync_module, |
@@ -1609,8 +1611,8 @@ struct dm_connector_state { | |||
1609 | container_of((x), struct dm_connector_state, base) | 1611 | container_of((x), struct dm_connector_state, base) |
1610 | 1612 | ||
1611 | static bool modeset_required(struct drm_crtc_state *crtc_state, | 1613 | static bool modeset_required(struct drm_crtc_state *crtc_state, |
1612 | struct dc_stream *new_stream, | 1614 | struct dc_stream_state *new_stream, |
1613 | struct dc_stream *old_stream) | 1615 | struct dc_stream_state *old_stream) |
1614 | { | 1616 | { |
1615 | if (dc_is_stream_unchanged(new_stream, old_stream)) { | 1617 | if (dc_is_stream_unchanged(new_stream, old_stream)) { |
1616 | crtc_state->mode_changed = false; | 1618 | crtc_state->mode_changed = false; |
@@ -2141,7 +2143,7 @@ struct amdgpu_connector *aconnector_from_drm_crtc_id( | |||
2141 | static void update_stream_scaling_settings( | 2143 | static void update_stream_scaling_settings( |
2142 | const struct drm_display_mode *mode, | 2144 | const struct drm_display_mode *mode, |
2143 | const struct dm_connector_state *dm_state, | 2145 | const struct dm_connector_state *dm_state, |
2144 | struct dc_stream *stream) | 2146 | struct dc_stream_state *stream) |
2145 | { | 2147 | { |
2146 | enum amdgpu_rmx_type rmx_type; | 2148 | enum amdgpu_rmx_type rmx_type; |
2147 | 2149 | ||
@@ -2285,7 +2287,7 @@ static enum dc_color_space get_output_color_space( | |||
2285 | /*****************************************************************************/ | 2287 | /*****************************************************************************/ |
2286 | 2288 | ||
2287 | static void fill_stream_properties_from_drm_display_mode( | 2289 | static void fill_stream_properties_from_drm_display_mode( |
2288 | struct dc_stream *stream, | 2290 | struct dc_stream_state *stream, |
2289 | const struct drm_display_mode *mode_in, | 2291 | const struct drm_display_mode *mode_in, |
2290 | const struct drm_connector *connector) | 2292 | const struct drm_connector *connector) |
2291 | { | 2293 | { |
@@ -2426,14 +2428,14 @@ static void decide_crtc_timing_for_drm_display_mode( | |||
2426 | } | 2428 | } |
2427 | } | 2429 | } |
2428 | 2430 | ||
2429 | static struct dc_stream *create_stream_for_sink( | 2431 | static struct dc_stream_state *create_stream_for_sink( |
2430 | struct amdgpu_connector *aconnector, | 2432 | struct amdgpu_connector *aconnector, |
2431 | const struct drm_display_mode *drm_mode, | 2433 | const struct drm_display_mode *drm_mode, |
2432 | const struct dm_connector_state *dm_state) | 2434 | const struct dm_connector_state *dm_state) |
2433 | { | 2435 | { |
2434 | struct drm_display_mode *preferred_mode = NULL; | 2436 | struct drm_display_mode *preferred_mode = NULL; |
2435 | const struct drm_connector *drm_connector; | 2437 | const struct drm_connector *drm_connector; |
2436 | struct dc_stream *stream = NULL; | 2438 | struct dc_stream_state *stream = NULL; |
2437 | struct drm_display_mode mode = *drm_mode; | 2439 | struct drm_display_mode mode = *drm_mode; |
2438 | bool native_mode_found = false; | 2440 | bool native_mode_found = false; |
2439 | 2441 | ||
@@ -2842,7 +2844,7 @@ int amdgpu_dm_connector_mode_valid( | |||
2842 | struct dc_sink *dc_sink; | 2844 | struct dc_sink *dc_sink; |
2843 | struct amdgpu_device *adev = connector->dev->dev_private; | 2845 | struct amdgpu_device *adev = connector->dev->dev_private; |
2844 | /* TODO: Unhardcode stream count */ | 2846 | /* TODO: Unhardcode stream count */ |
2845 | struct dc_stream *stream; | 2847 | struct dc_stream_state *stream; |
2846 | struct amdgpu_connector *aconnector = to_amdgpu_connector(connector); | 2848 | struct amdgpu_connector *aconnector = to_amdgpu_connector(connector); |
2847 | 2849 | ||
2848 | if ((mode->flags & DRM_MODE_FLAG_INTERLACE) || | 2850 | if ((mode->flags & DRM_MODE_FLAG_INTERLACE) || |
@@ -3119,7 +3121,7 @@ int dm_create_validation_set_for_connector(struct drm_connector *connector, | |||
3119 | struct dc_sink *dc_sink = | 3121 | struct dc_sink *dc_sink = |
3120 | to_amdgpu_connector(connector)->dc_sink; | 3122 | to_amdgpu_connector(connector)->dc_sink; |
3121 | /* TODO: Unhardcode stream count */ | 3123 | /* TODO: Unhardcode stream count */ |
3122 | struct dc_stream *stream; | 3124 | struct dc_stream_state *stream; |
3123 | 3125 | ||
3124 | if ((mode->flags & DRM_MODE_FLAG_INTERLACE) || | 3126 | if ((mode->flags & DRM_MODE_FLAG_INTERLACE) || |
3125 | (mode->flags & DRM_MODE_FLAG_DBLSCAN)) | 3127 | (mode->flags & DRM_MODE_FLAG_DBLSCAN)) |
@@ -3770,7 +3772,7 @@ static bool is_scaling_state_different( | |||
3770 | static void remove_stream( | 3772 | static void remove_stream( |
3771 | struct amdgpu_device *adev, | 3773 | struct amdgpu_device *adev, |
3772 | struct amdgpu_crtc *acrtc, | 3774 | struct amdgpu_crtc *acrtc, |
3773 | struct dc_stream *stream) | 3775 | struct dc_stream_state *stream) |
3774 | { | 3776 | { |
3775 | /* this is the update mode case */ | 3777 | /* this is the update mode case */ |
3776 | if (adev->dm.freesync_module) | 3778 | if (adev->dm.freesync_module) |
@@ -3925,7 +3927,7 @@ static void amdgpu_dm_commit_surfaces(struct drm_atomic_state *state, | |||
3925 | uint32_t i; | 3927 | uint32_t i; |
3926 | struct drm_plane *plane; | 3928 | struct drm_plane *plane; |
3927 | struct drm_plane_state *old_plane_state; | 3929 | struct drm_plane_state *old_plane_state; |
3928 | struct dc_stream *dc_stream_attach; | 3930 | struct dc_stream_state *dc_stream_attach; |
3929 | struct dc_plane_state *dc_surfaces_constructed[MAX_SURFACES]; | 3931 | struct dc_plane_state *dc_surfaces_constructed[MAX_SURFACES]; |
3930 | struct amdgpu_crtc *acrtc_attach = to_amdgpu_crtc(pcrtc); | 3932 | struct amdgpu_crtc *acrtc_attach = to_amdgpu_crtc(pcrtc); |
3931 | struct dm_crtc_state *acrtc_state = to_dm_crtc_state(pcrtc->state); | 3933 | struct dm_crtc_state *acrtc_state = to_dm_crtc_state(pcrtc->state); |
@@ -4061,7 +4063,7 @@ void amdgpu_dm_atomic_commit_tail( | |||
4061 | struct drm_crtc *crtc, *pcrtc; | 4063 | struct drm_crtc *crtc, *pcrtc; |
4062 | struct drm_crtc_state *old_crtc_state; | 4064 | struct drm_crtc_state *old_crtc_state; |
4063 | struct amdgpu_crtc *new_crtcs[MAX_STREAMS]; | 4065 | struct amdgpu_crtc *new_crtcs[MAX_STREAMS]; |
4064 | struct dc_stream *new_stream = NULL; | 4066 | struct dc_stream_state *new_stream = NULL; |
4065 | unsigned long flags; | 4067 | unsigned long flags; |
4066 | bool wait_for_vblank = true; | 4068 | bool wait_for_vblank = true; |
4067 | struct drm_connector *connector; | 4069 | struct drm_connector *connector; |
@@ -4220,7 +4222,7 @@ void amdgpu_dm_atomic_commit_tail( | |||
4220 | new_acrtc_state = to_dm_crtc_state(acrtc->base.state); | 4222 | new_acrtc_state = to_dm_crtc_state(acrtc->base.state); |
4221 | 4223 | ||
4222 | update_stream_scaling_settings(&con_new_state->base.crtc->mode, | 4224 | update_stream_scaling_settings(&con_new_state->base.crtc->mode, |
4223 | con_new_state, (struct dc_stream *)new_acrtc_state->stream); | 4225 | con_new_state, (struct dc_stream_state *)new_acrtc_state->stream); |
4224 | 4226 | ||
4225 | status = dc_stream_get_status(new_acrtc_state->stream); | 4227 | status = dc_stream_get_status(new_acrtc_state->stream); |
4226 | WARN_ON(!status); | 4228 | WARN_ON(!status); |
@@ -4376,7 +4378,7 @@ void dm_restore_drm_connector_state(struct drm_device *dev, struct drm_connector | |||
4376 | static uint32_t add_val_sets_surface( | 4378 | static uint32_t add_val_sets_surface( |
4377 | struct dc_validation_set *val_sets, | 4379 | struct dc_validation_set *val_sets, |
4378 | uint32_t set_count, | 4380 | uint32_t set_count, |
4379 | const struct dc_stream *stream, | 4381 | const struct dc_stream_state *stream, |
4380 | struct dc_plane_state *surface) | 4382 | struct dc_plane_state *surface) |
4381 | { | 4383 | { |
4382 | uint32_t i = 0, j = 0; | 4384 | uint32_t i = 0, j = 0; |
@@ -4399,8 +4401,8 @@ static uint32_t add_val_sets_surface( | |||
4399 | static uint32_t update_in_val_sets_stream( | 4401 | static uint32_t update_in_val_sets_stream( |
4400 | struct dc_validation_set *val_sets, | 4402 | struct dc_validation_set *val_sets, |
4401 | uint32_t set_count, | 4403 | uint32_t set_count, |
4402 | struct dc_stream *old_stream, | 4404 | struct dc_stream_state *old_stream, |
4403 | struct dc_stream *new_stream, | 4405 | struct dc_stream_state *new_stream, |
4404 | struct drm_crtc *crtc) | 4406 | struct drm_crtc *crtc) |
4405 | { | 4407 | { |
4406 | uint32_t i = 0; | 4408 | uint32_t i = 0; |
@@ -4423,7 +4425,7 @@ static uint32_t update_in_val_sets_stream( | |||
4423 | static uint32_t remove_from_val_sets( | 4425 | static uint32_t remove_from_val_sets( |
4424 | struct dc_validation_set *val_sets, | 4426 | struct dc_validation_set *val_sets, |
4425 | uint32_t set_count, | 4427 | uint32_t set_count, |
4426 | const struct dc_stream *stream) | 4428 | const struct dc_stream_state *stream) |
4427 | { | 4429 | { |
4428 | int i; | 4430 | int i; |
4429 | 4431 | ||
@@ -4545,7 +4547,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, | |||
4545 | for_each_crtc_in_state(state, crtc, crtc_state, i) { | 4547 | for_each_crtc_in_state(state, crtc, crtc_state, i) { |
4546 | struct amdgpu_crtc *acrtc = NULL; | 4548 | struct amdgpu_crtc *acrtc = NULL; |
4547 | struct amdgpu_connector *aconnector = NULL; | 4549 | struct amdgpu_connector *aconnector = NULL; |
4548 | struct dc_stream *new_stream = NULL; | 4550 | struct dc_stream_state *new_stream = NULL; |
4549 | struct drm_connector_state *conn_state = NULL; | 4551 | struct drm_connector_state *conn_state = NULL; |
4550 | struct dm_connector_state *dm_conn_state = NULL; | 4552 | struct dm_connector_state *dm_conn_state = NULL; |
4551 | 4553 | ||
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h index dcf1f77390a8..cca65a37b213 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | |||
@@ -201,7 +201,7 @@ struct dm_plane_state { | |||
201 | 201 | ||
202 | struct dm_crtc_state { | 202 | struct dm_crtc_state { |
203 | struct drm_crtc_state base; | 203 | struct drm_crtc_state base; |
204 | struct dc_stream *stream; | 204 | struct dc_stream_state *stream; |
205 | }; | 205 | }; |
206 | 206 | ||
207 | #define to_dm_crtc_state(x) container_of(x, struct dm_crtc_state, base) | 207 | #define to_dm_crtc_state(x) container_of(x, struct dm_crtc_state, base) |
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c index 0a615583de63..4a124537dc9a 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | |||
@@ -174,7 +174,7 @@ static void get_payload_table( | |||
174 | */ | 174 | */ |
175 | bool dm_helpers_dp_mst_write_payload_allocation_table( | 175 | bool dm_helpers_dp_mst_write_payload_allocation_table( |
176 | struct dc_context *ctx, | 176 | struct dc_context *ctx, |
177 | const struct dc_stream *stream, | 177 | const struct dc_stream_state *stream, |
178 | struct dp_mst_stream_allocation_table *proposed_table, | 178 | struct dp_mst_stream_allocation_table *proposed_table, |
179 | bool enable) | 179 | bool enable) |
180 | { | 180 | { |
@@ -264,7 +264,7 @@ bool dm_helpers_dp_mst_write_payload_allocation_table( | |||
264 | */ | 264 | */ |
265 | bool dm_helpers_dp_mst_poll_for_allocation_change_trigger( | 265 | bool dm_helpers_dp_mst_poll_for_allocation_change_trigger( |
266 | struct dc_context *ctx, | 266 | struct dc_context *ctx, |
267 | const struct dc_stream *stream) | 267 | const struct dc_stream_state *stream) |
268 | { | 268 | { |
269 | struct amdgpu_connector *aconnector; | 269 | struct amdgpu_connector *aconnector; |
270 | struct drm_dp_mst_topology_mgr *mst_mgr; | 270 | struct drm_dp_mst_topology_mgr *mst_mgr; |
@@ -290,7 +290,7 @@ bool dm_helpers_dp_mst_poll_for_allocation_change_trigger( | |||
290 | 290 | ||
291 | bool dm_helpers_dp_mst_send_payload_allocation( | 291 | bool dm_helpers_dp_mst_send_payload_allocation( |
292 | struct dc_context *ctx, | 292 | struct dc_context *ctx, |
293 | const struct dc_stream *stream, | 293 | const struct dc_stream_state *stream, |
294 | bool enable) | 294 | bool enable) |
295 | { | 295 | { |
296 | struct amdgpu_connector *aconnector; | 296 | struct amdgpu_connector *aconnector; |
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 500788c35d70..8b6b7631d776 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c | |||
@@ -149,12 +149,12 @@ failed_alloc: | |||
149 | } | 149 | } |
150 | 150 | ||
151 | static bool stream_adjust_vmin_vmax(struct dc *dc, | 151 | static bool stream_adjust_vmin_vmax(struct dc *dc, |
152 | struct dc_stream **streams, int num_streams, | 152 | struct dc_stream_state **streams, int num_streams, |
153 | int vmin, int vmax) | 153 | int vmin, int vmax) |
154 | { | 154 | { |
155 | /* TODO: Support multiple streams */ | 155 | /* TODO: Support multiple streams */ |
156 | struct core_dc *core_dc = DC_TO_CORE(dc); | 156 | struct core_dc *core_dc = DC_TO_CORE(dc); |
157 | struct dc_stream *stream = streams[0]; | 157 | struct dc_stream_state *stream = streams[0]; |
158 | int i = 0; | 158 | int i = 0; |
159 | bool ret = false; | 159 | bool ret = false; |
160 | 160 | ||
@@ -175,12 +175,12 @@ static bool stream_adjust_vmin_vmax(struct dc *dc, | |||
175 | } | 175 | } |
176 | 176 | ||
177 | static bool stream_get_crtc_position(struct dc *dc, | 177 | static bool stream_get_crtc_position(struct dc *dc, |
178 | struct dc_stream **streams, int num_streams, | 178 | struct dc_stream_state **streams, int num_streams, |
179 | unsigned int *v_pos, unsigned int *nom_v_pos) | 179 | unsigned int *v_pos, unsigned int *nom_v_pos) |
180 | { | 180 | { |
181 | /* TODO: Support multiple streams */ | 181 | /* TODO: Support multiple streams */ |
182 | struct core_dc *core_dc = DC_TO_CORE(dc); | 182 | struct core_dc *core_dc = DC_TO_CORE(dc); |
183 | struct dc_stream *stream = streams[0]; | 183 | struct dc_stream_state *stream = streams[0]; |
184 | int i = 0; | 184 | int i = 0; |
185 | bool ret = false; | 185 | bool ret = false; |
186 | struct crtc_position position; | 186 | struct crtc_position position; |
@@ -200,7 +200,7 @@ static bool stream_get_crtc_position(struct dc *dc, | |||
200 | return ret; | 200 | return ret; |
201 | } | 201 | } |
202 | 202 | ||
203 | static bool set_gamut_remap(struct dc *dc, const struct dc_stream *stream) | 203 | static bool set_gamut_remap(struct dc *dc, const struct dc_stream_state *stream) |
204 | { | 204 | { |
205 | struct core_dc *core_dc = DC_TO_CORE(dc); | 205 | struct core_dc *core_dc = DC_TO_CORE(dc); |
206 | int i = 0; | 206 | int i = 0; |
@@ -218,7 +218,7 @@ static bool set_gamut_remap(struct dc *dc, const struct dc_stream *stream) | |||
218 | return ret; | 218 | return ret; |
219 | } | 219 | } |
220 | 220 | ||
221 | static bool program_csc_matrix(struct dc *dc, struct dc_stream *stream) | 221 | static bool program_csc_matrix(struct dc *dc, struct dc_stream_state *stream) |
222 | { | 222 | { |
223 | struct core_dc *core_dc = DC_TO_CORE(dc); | 223 | struct core_dc *core_dc = DC_TO_CORE(dc); |
224 | int i = 0; | 224 | int i = 0; |
@@ -241,7 +241,7 @@ static bool program_csc_matrix(struct dc *dc, struct dc_stream *stream) | |||
241 | } | 241 | } |
242 | 242 | ||
243 | static void set_static_screen_events(struct dc *dc, | 243 | static void set_static_screen_events(struct dc *dc, |
244 | struct dc_stream **streams, | 244 | struct dc_stream_state **streams, |
245 | int num_streams, | 245 | int num_streams, |
246 | const struct dc_static_screen_events *events) | 246 | const struct dc_static_screen_events *events) |
247 | { | 247 | { |
@@ -252,7 +252,7 @@ static void set_static_screen_events(struct dc *dc, | |||
252 | int num_pipes_affected = 0; | 252 | int num_pipes_affected = 0; |
253 | 253 | ||
254 | for (i = 0; i < num_streams; i++) { | 254 | for (i = 0; i < num_streams; i++) { |
255 | struct dc_stream *stream = streams[i]; | 255 | struct dc_stream_state *stream = streams[i]; |
256 | 256 | ||
257 | for (j = 0; j < MAX_PIPES; j++) { | 257 | for (j = 0; j < MAX_PIPES; j++) { |
258 | if (core_dc->current_context->res_ctx.pipe_ctx[j].stream | 258 | if (core_dc->current_context->res_ctx.pipe_ctx[j].stream |
@@ -333,7 +333,7 @@ static void set_test_pattern( | |||
333 | cust_pattern_size); | 333 | cust_pattern_size); |
334 | } | 334 | } |
335 | 335 | ||
336 | void set_dither_option(struct dc_stream *stream, | 336 | void set_dither_option(struct dc_stream_state *stream, |
337 | enum dc_dither_option option) | 337 | enum dc_dither_option option) |
338 | { | 338 | { |
339 | struct bit_depth_reduction_params params; | 339 | struct bit_depth_reduction_params params; |
@@ -769,7 +769,7 @@ context_alloc_fail: | |||
769 | 769 | ||
770 | bool dc_validate_guaranteed( | 770 | bool dc_validate_guaranteed( |
771 | const struct dc *dc, | 771 | const struct dc *dc, |
772 | struct dc_stream *stream) | 772 | struct dc_stream_state *stream) |
773 | { | 773 | { |
774 | struct core_dc *core_dc = DC_TO_CORE(dc); | 774 | struct core_dc *core_dc = DC_TO_CORE(dc); |
775 | enum dc_status result = DC_ERROR_UNEXPECTED; | 775 | enum dc_status result = DC_ERROR_UNEXPECTED; |
@@ -893,7 +893,7 @@ static bool context_changed( | |||
893 | 893 | ||
894 | static bool streams_changed( | 894 | static bool streams_changed( |
895 | struct core_dc *dc, | 895 | struct core_dc *dc, |
896 | struct dc_stream *streams[], | 896 | struct dc_stream_state *streams[], |
897 | uint8_t stream_count) | 897 | uint8_t stream_count) |
898 | { | 898 | { |
899 | uint8_t i; | 899 | uint8_t i; |
@@ -912,7 +912,7 @@ static bool streams_changed( | |||
912 | bool dc_enable_stereo( | 912 | bool dc_enable_stereo( |
913 | struct dc *dc, | 913 | struct dc *dc, |
914 | struct validate_context *context, | 914 | struct validate_context *context, |
915 | struct dc_stream *streams[], | 915 | struct dc_stream_state *streams[], |
916 | uint8_t stream_count) | 916 | uint8_t stream_count) |
917 | { | 917 | { |
918 | bool ret = true; | 918 | bool ret = true; |
@@ -958,7 +958,7 @@ static bool dc_commit_context_no_check(struct dc *dc, struct validate_context *c | |||
958 | enum dc_status result = DC_ERROR_UNEXPECTED; | 958 | enum dc_status result = DC_ERROR_UNEXPECTED; |
959 | struct pipe_ctx *pipe; | 959 | struct pipe_ctx *pipe; |
960 | int i, j, k, l; | 960 | int i, j, k, l; |
961 | struct dc_stream *dc_streams[MAX_STREAMS] = {0}; | 961 | struct dc_stream_state *dc_streams[MAX_STREAMS] = {0}; |
962 | 962 | ||
963 | for (i = 0; i < context->stream_count; i++) | 963 | for (i = 0; i < context->stream_count; i++) |
964 | dc_streams[i] = context->streams[i]; | 964 | dc_streams[i] = context->streams[i]; |
@@ -1031,7 +1031,7 @@ bool dc_commit_context(struct dc *dc, struct validate_context *context) | |||
1031 | __func__, context->stream_count); | 1031 | __func__, context->stream_count); |
1032 | 1032 | ||
1033 | for (i = 0; i < context->stream_count; i++) { | 1033 | for (i = 0; i < context->stream_count; i++) { |
1034 | struct dc_stream *stream = context->streams[i]; | 1034 | struct dc_stream_state *stream = context->streams[i]; |
1035 | 1035 | ||
1036 | dc_stream_log(stream, | 1036 | dc_stream_log(stream, |
1037 | core_dc->ctx->logger, | 1037 | core_dc->ctx->logger, |
@@ -1046,7 +1046,7 @@ bool dc_commit_context(struct dc *dc, struct validate_context *context) | |||
1046 | 1046 | ||
1047 | bool dc_commit_streams( | 1047 | bool dc_commit_streams( |
1048 | struct dc *dc, | 1048 | struct dc *dc, |
1049 | struct dc_stream *streams[], | 1049 | struct dc_stream_state *streams[], |
1050 | uint8_t stream_count) | 1050 | uint8_t stream_count) |
1051 | { | 1051 | { |
1052 | struct core_dc *core_dc = DC_TO_CORE(dc); | 1052 | struct core_dc *core_dc = DC_TO_CORE(dc); |
@@ -1062,7 +1062,7 @@ bool dc_commit_streams( | |||
1062 | __func__, stream_count); | 1062 | __func__, stream_count); |
1063 | 1063 | ||
1064 | for (i = 0; i < stream_count; i++) { | 1064 | for (i = 0; i < stream_count; i++) { |
1065 | struct dc_stream *stream = streams[i]; | 1065 | struct dc_stream_state *stream = streams[i]; |
1066 | struct dc_stream_status *status = dc_stream_get_status(stream); | 1066 | struct dc_stream_status *status = dc_stream_get_status(stream); |
1067 | int j; | 1067 | int j; |
1068 | 1068 | ||
@@ -1138,7 +1138,7 @@ bool dc_commit_surfaces_to_stream( | |||
1138 | struct dc *dc, | 1138 | struct dc *dc, |
1139 | struct dc_plane_state **new_surfaces, | 1139 | struct dc_plane_state **new_surfaces, |
1140 | uint8_t new_surface_count, | 1140 | uint8_t new_surface_count, |
1141 | struct dc_stream *dc_stream) | 1141 | struct dc_stream_state *dc_stream) |
1142 | { | 1142 | { |
1143 | struct dc_surface_update updates[MAX_SURFACES]; | 1143 | struct dc_surface_update updates[MAX_SURFACES]; |
1144 | struct dc_flip_addrs flip_addr[MAX_SURFACES]; | 1144 | struct dc_flip_addrs flip_addr[MAX_SURFACES]; |
@@ -1395,7 +1395,7 @@ enum surface_update_type update_surface_trace_level = UPDATE_TYPE_FULL; | |||
1395 | 1395 | ||
1396 | void dc_update_surfaces_and_stream(struct dc *dc, | 1396 | void dc_update_surfaces_and_stream(struct dc *dc, |
1397 | struct dc_surface_update *srf_updates, int surface_count, | 1397 | struct dc_surface_update *srf_updates, int surface_count, |
1398 | struct dc_stream *stream, | 1398 | struct dc_stream_state *stream, |
1399 | struct dc_stream_update *stream_update) | 1399 | struct dc_stream_update *stream_update) |
1400 | { | 1400 | { |
1401 | struct core_dc *core_dc = DC_TO_CORE(dc); | 1401 | struct core_dc *core_dc = DC_TO_CORE(dc); |
@@ -1723,7 +1723,7 @@ uint8_t dc_get_current_stream_count(const struct dc *dc) | |||
1723 | return core_dc->current_context->stream_count; | 1723 | return core_dc->current_context->stream_count; |
1724 | } | 1724 | } |
1725 | 1725 | ||
1726 | struct dc_stream *dc_get_stream_at_index(const struct dc *dc, uint8_t i) | 1726 | struct dc_stream_state *dc_get_stream_at_index(const struct dc *dc, uint8_t i) |
1727 | { | 1727 | { |
1728 | struct core_dc *core_dc = DC_TO_CORE(dc); | 1728 | struct core_dc *core_dc = DC_TO_CORE(dc); |
1729 | if (i < core_dc->current_context->stream_count) | 1729 | if (i < core_dc->current_context->stream_count) |
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index a983a5ee3172..7a2fe2f3e65c 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c | |||
@@ -1143,7 +1143,7 @@ static void dpcd_configure_panel_mode( | |||
1143 | 1143 | ||
1144 | static void enable_stream_features(struct pipe_ctx *pipe_ctx) | 1144 | static void enable_stream_features(struct pipe_ctx *pipe_ctx) |
1145 | { | 1145 | { |
1146 | struct dc_stream *stream = pipe_ctx->stream; | 1146 | struct dc_stream_state *stream = pipe_ctx->stream; |
1147 | struct dc_link *link = stream->sink->link; | 1147 | struct dc_link *link = stream->sink->link; |
1148 | union down_spread_ctrl downspread; | 1148 | union down_spread_ctrl downspread; |
1149 | 1149 | ||
@@ -1159,7 +1159,7 @@ static void enable_stream_features(struct pipe_ctx *pipe_ctx) | |||
1159 | 1159 | ||
1160 | static enum dc_status enable_link_dp(struct pipe_ctx *pipe_ctx) | 1160 | static enum dc_status enable_link_dp(struct pipe_ctx *pipe_ctx) |
1161 | { | 1161 | { |
1162 | struct dc_stream *stream = pipe_ctx->stream; | 1162 | struct dc_stream_state *stream = pipe_ctx->stream; |
1163 | enum dc_status status; | 1163 | enum dc_status status; |
1164 | bool skip_video_pattern; | 1164 | bool skip_video_pattern; |
1165 | struct dc_link *link = stream->sink->link; | 1165 | struct dc_link *link = stream->sink->link; |
@@ -1250,7 +1250,7 @@ static enum dc_status enable_link_dp_mst(struct pipe_ctx *pipe_ctx) | |||
1250 | 1250 | ||
1251 | static void enable_link_hdmi(struct pipe_ctx *pipe_ctx) | 1251 | static void enable_link_hdmi(struct pipe_ctx *pipe_ctx) |
1252 | { | 1252 | { |
1253 | struct dc_stream *stream = pipe_ctx->stream; | 1253 | struct dc_stream_state *stream = pipe_ctx->stream; |
1254 | struct dc_link *link = stream->sink->link; | 1254 | struct dc_link *link = stream->sink->link; |
1255 | enum dc_color_depth display_color_depth; | 1255 | enum dc_color_depth display_color_depth; |
1256 | 1256 | ||
@@ -1341,7 +1341,7 @@ static void disable_link(struct dc_link *link, enum signal_type signal) | |||
1341 | } | 1341 | } |
1342 | 1342 | ||
1343 | enum dc_status dc_link_validate_mode_timing( | 1343 | enum dc_status dc_link_validate_mode_timing( |
1344 | const struct dc_stream *stream, | 1344 | const struct dc_stream_state *stream, |
1345 | struct dc_link *link, | 1345 | struct dc_link *link, |
1346 | const struct dc_crtc_timing *timing) | 1346 | const struct dc_crtc_timing *timing) |
1347 | { | 1347 | { |
@@ -1374,7 +1374,7 @@ enum dc_status dc_link_validate_mode_timing( | |||
1374 | 1374 | ||
1375 | 1375 | ||
1376 | bool dc_link_set_backlight_level(const struct dc_link *link, uint32_t level, | 1376 | bool dc_link_set_backlight_level(const struct dc_link *link, uint32_t level, |
1377 | uint32_t frame_ramp, const struct dc_stream *stream) | 1377 | uint32_t frame_ramp, const struct dc_stream_state *stream) |
1378 | { | 1378 | { |
1379 | struct core_dc *core_dc = DC_TO_CORE(link->ctx->dc); | 1379 | struct core_dc *core_dc = DC_TO_CORE(link->ctx->dc); |
1380 | struct abm *abm = core_dc->res_pool->abm; | 1380 | struct abm *abm = core_dc->res_pool->abm; |
@@ -1450,7 +1450,7 @@ bool dc_link_get_psr_state(const struct dc_link *link, uint32_t *psr_state) | |||
1450 | } | 1450 | } |
1451 | 1451 | ||
1452 | bool dc_link_setup_psr(struct dc_link *link, | 1452 | bool dc_link_setup_psr(struct dc_link *link, |
1453 | const struct dc_stream *stream, struct psr_config *psr_config, | 1453 | const struct dc_stream_state *stream, struct psr_config *psr_config, |
1454 | struct psr_context *psr_context) | 1454 | struct psr_context *psr_context) |
1455 | { | 1455 | { |
1456 | struct core_dc *core_dc = DC_TO_CORE(link->ctx->dc); | 1456 | struct core_dc *core_dc = DC_TO_CORE(link->ctx->dc); |
@@ -1587,7 +1587,7 @@ void core_link_resume(struct dc_link *link) | |||
1587 | program_hpd_filter(link); | 1587 | program_hpd_filter(link); |
1588 | } | 1588 | } |
1589 | 1589 | ||
1590 | static struct fixed31_32 get_pbn_per_slot(struct dc_stream *stream) | 1590 | static struct fixed31_32 get_pbn_per_slot(struct dc_stream_state *stream) |
1591 | { | 1591 | { |
1592 | struct dc_link_settings *link_settings = | 1592 | struct dc_link_settings *link_settings = |
1593 | &stream->sink->link->cur_link_settings; | 1593 | &stream->sink->link->cur_link_settings; |
@@ -1696,7 +1696,7 @@ static void update_mst_stream_alloc_table( | |||
1696 | */ | 1696 | */ |
1697 | static enum dc_status allocate_mst_payload(struct pipe_ctx *pipe_ctx) | 1697 | static enum dc_status allocate_mst_payload(struct pipe_ctx *pipe_ctx) |
1698 | { | 1698 | { |
1699 | struct dc_stream *stream = pipe_ctx->stream; | 1699 | struct dc_stream_state *stream = pipe_ctx->stream; |
1700 | struct dc_link *link = stream->sink->link; | 1700 | struct dc_link *link = stream->sink->link; |
1701 | struct link_encoder *link_encoder = link->link_enc; | 1701 | struct link_encoder *link_encoder = link->link_enc; |
1702 | struct stream_encoder *stream_encoder = pipe_ctx->stream_enc; | 1702 | struct stream_encoder *stream_encoder = pipe_ctx->stream_enc; |
@@ -1778,7 +1778,7 @@ static enum dc_status allocate_mst_payload(struct pipe_ctx *pipe_ctx) | |||
1778 | 1778 | ||
1779 | static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx) | 1779 | static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx) |
1780 | { | 1780 | { |
1781 | struct dc_stream *stream = pipe_ctx->stream; | 1781 | struct dc_stream_state *stream = pipe_ctx->stream; |
1782 | struct dc_link *link = stream->sink->link; | 1782 | struct dc_link *link = stream->sink->link; |
1783 | struct link_encoder *link_encoder = link->link_enc; | 1783 | struct link_encoder *link_encoder = link->link_enc; |
1784 | struct stream_encoder *stream_encoder = pipe_ctx->stream_enc; | 1784 | struct stream_encoder *stream_encoder = pipe_ctx->stream_enc; |
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 17506345f97a..50724f9a8e2c 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | |||
@@ -1433,7 +1433,7 @@ bool dp_validate_mode_timing( | |||
1433 | return false; | 1433 | return false; |
1434 | } | 1434 | } |
1435 | 1435 | ||
1436 | void decide_link_settings(struct dc_stream *stream, | 1436 | void decide_link_settings(struct dc_stream_state *stream, |
1437 | struct dc_link_settings *link_setting) | 1437 | struct dc_link_settings *link_setting) |
1438 | { | 1438 | { |
1439 | 1439 | ||
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index fd1d6be79fee..ce0415f26600 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c | |||
@@ -294,8 +294,8 @@ void resource_reference_clock_source( | |||
294 | } | 294 | } |
295 | 295 | ||
296 | bool resource_are_streams_timing_synchronizable( | 296 | bool resource_are_streams_timing_synchronizable( |
297 | struct dc_stream *stream1, | 297 | struct dc_stream_state *stream1, |
298 | struct dc_stream *stream2) | 298 | struct dc_stream_state *stream2) |
299 | { | 299 | { |
300 | if (stream1->timing.h_total != stream2->timing.h_total) | 300 | if (stream1->timing.h_total != stream2->timing.h_total) |
301 | return false; | 301 | return false; |
@@ -431,7 +431,7 @@ static void rect_swap_helper(struct rect *rect) | |||
431 | static void calculate_viewport(struct pipe_ctx *pipe_ctx) | 431 | static void calculate_viewport(struct pipe_ctx *pipe_ctx) |
432 | { | 432 | { |
433 | const struct dc_plane_state *surface = pipe_ctx->surface; | 433 | const struct dc_plane_state *surface = pipe_ctx->surface; |
434 | const struct dc_stream *stream = pipe_ctx->stream; | 434 | const struct dc_stream_state *stream = pipe_ctx->stream; |
435 | struct scaler_data *data = &pipe_ctx->scl_data; | 435 | struct scaler_data *data = &pipe_ctx->scl_data; |
436 | struct rect surf_src = surface->src_rect; | 436 | struct rect surf_src = surface->src_rect; |
437 | struct rect clip = { 0 }; | 437 | struct rect clip = { 0 }; |
@@ -530,7 +530,7 @@ static void calculate_viewport(struct pipe_ctx *pipe_ctx) | |||
530 | static void calculate_recout(struct pipe_ctx *pipe_ctx, struct view *recout_skip) | 530 | static void calculate_recout(struct pipe_ctx *pipe_ctx, struct view *recout_skip) |
531 | { | 531 | { |
532 | const struct dc_plane_state *surface = pipe_ctx->surface; | 532 | const struct dc_plane_state *surface = pipe_ctx->surface; |
533 | const struct dc_stream *stream = pipe_ctx->stream; | 533 | const struct dc_stream_state *stream = pipe_ctx->stream; |
534 | struct rect surf_src = surface->src_rect; | 534 | struct rect surf_src = surface->src_rect; |
535 | struct rect surf_clip = surface->clip_rect; | 535 | struct rect surf_clip = surface->clip_rect; |
536 | int recout_full_x, recout_full_y; | 536 | int recout_full_x, recout_full_y; |
@@ -608,7 +608,7 @@ static void calculate_recout(struct pipe_ctx *pipe_ctx, struct view *recout_skip | |||
608 | static void calculate_scaling_ratios(struct pipe_ctx *pipe_ctx) | 608 | static void calculate_scaling_ratios(struct pipe_ctx *pipe_ctx) |
609 | { | 609 | { |
610 | const struct dc_plane_state *surface = pipe_ctx->surface; | 610 | const struct dc_plane_state *surface = pipe_ctx->surface; |
611 | const struct dc_stream *stream = pipe_ctx->stream; | 611 | const struct dc_stream_state *stream = pipe_ctx->stream; |
612 | struct rect surf_src = surface->src_rect; | 612 | struct rect surf_src = surface->src_rect; |
613 | const int in_w = stream->src.width; | 613 | const int in_w = stream->src.width; |
614 | const int in_h = stream->src.height; | 614 | const int in_h = stream->src.height; |
@@ -920,7 +920,7 @@ struct pipe_ctx *find_idle_secondary_pipe( | |||
920 | 920 | ||
921 | struct pipe_ctx *resource_get_head_pipe_for_stream( | 921 | struct pipe_ctx *resource_get_head_pipe_for_stream( |
922 | struct resource_context *res_ctx, | 922 | struct resource_context *res_ctx, |
923 | struct dc_stream *stream) | 923 | struct dc_stream_state *stream) |
924 | { | 924 | { |
925 | int i; | 925 | int i; |
926 | for (i = 0; i < MAX_PIPES; i++) { | 926 | for (i = 0; i < MAX_PIPES; i++) { |
@@ -940,7 +940,7 @@ struct pipe_ctx *resource_get_head_pipe_for_stream( | |||
940 | static struct pipe_ctx *acquire_free_pipe_for_stream( | 940 | static struct pipe_ctx *acquire_free_pipe_for_stream( |
941 | struct validate_context *context, | 941 | struct validate_context *context, |
942 | const struct resource_pool *pool, | 942 | const struct resource_pool *pool, |
943 | struct dc_stream *stream) | 943 | struct dc_stream_state *stream) |
944 | { | 944 | { |
945 | int i; | 945 | int i; |
946 | struct resource_context *res_ctx = &context->res_ctx; | 946 | struct resource_context *res_ctx = &context->res_ctx; |
@@ -979,7 +979,7 @@ static struct pipe_ctx *acquire_free_pipe_for_stream( | |||
979 | 979 | ||
980 | static void release_free_pipes_for_stream( | 980 | static void release_free_pipes_for_stream( |
981 | struct resource_context *res_ctx, | 981 | struct resource_context *res_ctx, |
982 | struct dc_stream *stream) | 982 | struct dc_stream_state *stream) |
983 | { | 983 | { |
984 | int i; | 984 | int i; |
985 | 985 | ||
@@ -997,7 +997,7 @@ static void release_free_pipes_for_stream( | |||
997 | static int acquire_first_split_pipe( | 997 | static int acquire_first_split_pipe( |
998 | struct resource_context *res_ctx, | 998 | struct resource_context *res_ctx, |
999 | const struct resource_pool *pool, | 999 | const struct resource_pool *pool, |
1000 | struct dc_stream *stream) | 1000 | struct dc_stream_state *stream) |
1001 | { | 1001 | { |
1002 | int i; | 1002 | int i; |
1003 | 1003 | ||
@@ -1030,7 +1030,7 @@ static int acquire_first_split_pipe( | |||
1030 | bool resource_attach_surfaces_to_context( | 1030 | bool resource_attach_surfaces_to_context( |
1031 | struct dc_plane_state * const *surfaces, | 1031 | struct dc_plane_state * const *surfaces, |
1032 | int surface_count, | 1032 | int surface_count, |
1033 | struct dc_stream *stream, | 1033 | struct dc_stream_state *stream, |
1034 | struct validate_context *context, | 1034 | struct validate_context *context, |
1035 | const struct resource_pool *pool) | 1035 | const struct resource_pool *pool) |
1036 | { | 1036 | { |
@@ -1118,8 +1118,8 @@ bool resource_attach_surfaces_to_context( | |||
1118 | } | 1118 | } |
1119 | 1119 | ||
1120 | 1120 | ||
1121 | static bool is_timing_changed(struct dc_stream *cur_stream, | 1121 | static bool is_timing_changed(struct dc_stream_state *cur_stream, |
1122 | struct dc_stream *new_stream) | 1122 | struct dc_stream_state *new_stream) |
1123 | { | 1123 | { |
1124 | if (cur_stream == NULL) | 1124 | if (cur_stream == NULL) |
1125 | return true; | 1125 | return true; |
@@ -1141,7 +1141,7 @@ static bool is_timing_changed(struct dc_stream *cur_stream, | |||
1141 | } | 1141 | } |
1142 | 1142 | ||
1143 | static bool are_stream_backends_same( | 1143 | static bool are_stream_backends_same( |
1144 | struct dc_stream *stream_a, struct dc_stream *stream_b) | 1144 | struct dc_stream_state *stream_a, struct dc_stream_state *stream_b) |
1145 | { | 1145 | { |
1146 | if (stream_a == stream_b) | 1146 | if (stream_a == stream_b) |
1147 | return true; | 1147 | return true; |
@@ -1156,7 +1156,7 @@ static bool are_stream_backends_same( | |||
1156 | } | 1156 | } |
1157 | 1157 | ||
1158 | bool dc_is_stream_unchanged( | 1158 | bool dc_is_stream_unchanged( |
1159 | struct dc_stream *old_stream, struct dc_stream *stream) | 1159 | struct dc_stream_state *old_stream, struct dc_stream_state *stream) |
1160 | { | 1160 | { |
1161 | 1161 | ||
1162 | if (!are_stream_backends_same(old_stream, stream)) | 1162 | if (!are_stream_backends_same(old_stream, stream)) |
@@ -1233,7 +1233,7 @@ static void set_audio_in_use( | |||
1233 | static int acquire_first_free_pipe( | 1233 | static int acquire_first_free_pipe( |
1234 | struct resource_context *res_ctx, | 1234 | struct resource_context *res_ctx, |
1235 | const struct resource_pool *pool, | 1235 | const struct resource_pool *pool, |
1236 | struct dc_stream *stream) | 1236 | struct dc_stream_state *stream) |
1237 | { | 1237 | { |
1238 | int i; | 1238 | int i; |
1239 | 1239 | ||
@@ -1260,7 +1260,7 @@ static int acquire_first_free_pipe( | |||
1260 | static struct stream_encoder *find_first_free_match_stream_enc_for_link( | 1260 | static struct stream_encoder *find_first_free_match_stream_enc_for_link( |
1261 | struct resource_context *res_ctx, | 1261 | struct resource_context *res_ctx, |
1262 | const struct resource_pool *pool, | 1262 | const struct resource_pool *pool, |
1263 | struct dc_stream *stream) | 1263 | struct dc_stream_state *stream) |
1264 | { | 1264 | { |
1265 | int i; | 1265 | int i; |
1266 | int j = -1; | 1266 | int j = -1; |
@@ -1311,7 +1311,7 @@ static struct audio *find_first_free_audio( | |||
1311 | return 0; | 1311 | return 0; |
1312 | } | 1312 | } |
1313 | 1313 | ||
1314 | static void update_stream_signal(struct dc_stream *stream) | 1314 | static void update_stream_signal(struct dc_stream_state *stream) |
1315 | { | 1315 | { |
1316 | if (stream->output_signal == SIGNAL_TYPE_NONE) { | 1316 | if (stream->output_signal == SIGNAL_TYPE_NONE) { |
1317 | struct dc_sink *dc_sink = stream->sink; | 1317 | struct dc_sink *dc_sink = stream->sink; |
@@ -1334,12 +1334,12 @@ static void update_stream_signal(struct dc_stream *stream) | |||
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | bool resource_is_stream_unchanged( | 1336 | bool resource_is_stream_unchanged( |
1337 | struct validate_context *old_context, struct dc_stream *stream) | 1337 | struct validate_context *old_context, struct dc_stream_state *stream) |
1338 | { | 1338 | { |
1339 | int i; | 1339 | int i; |
1340 | 1340 | ||
1341 | for (i = 0; i < old_context->stream_count; i++) { | 1341 | for (i = 0; i < old_context->stream_count; i++) { |
1342 | struct dc_stream *old_stream = old_context->streams[i]; | 1342 | struct dc_stream_state *old_stream = old_context->streams[i]; |
1343 | 1343 | ||
1344 | if (are_stream_backends_same(old_stream, stream)) | 1344 | if (are_stream_backends_same(old_stream, stream)) |
1345 | return true; | 1345 | return true; |
@@ -1352,7 +1352,7 @@ static void copy_pipe_ctx( | |||
1352 | const struct pipe_ctx *from_pipe_ctx, struct pipe_ctx *to_pipe_ctx) | 1352 | const struct pipe_ctx *from_pipe_ctx, struct pipe_ctx *to_pipe_ctx) |
1353 | { | 1353 | { |
1354 | struct dc_plane_state *surface = to_pipe_ctx->surface; | 1354 | struct dc_plane_state *surface = to_pipe_ctx->surface; |
1355 | struct dc_stream *stream = to_pipe_ctx->stream; | 1355 | struct dc_stream_state *stream = to_pipe_ctx->stream; |
1356 | 1356 | ||
1357 | *to_pipe_ctx = *from_pipe_ctx; | 1357 | *to_pipe_ctx = *from_pipe_ctx; |
1358 | to_pipe_ctx->stream = stream; | 1358 | to_pipe_ctx->stream = stream; |
@@ -1360,14 +1360,14 @@ static void copy_pipe_ctx( | |||
1360 | to_pipe_ctx->surface = surface; | 1360 | to_pipe_ctx->surface = surface; |
1361 | } | 1361 | } |
1362 | 1362 | ||
1363 | static struct dc_stream *find_pll_sharable_stream( | 1363 | static struct dc_stream_state *find_pll_sharable_stream( |
1364 | struct dc_stream *stream_needs_pll, | 1364 | struct dc_stream_state *stream_needs_pll, |
1365 | struct validate_context *context) | 1365 | struct validate_context *context) |
1366 | { | 1366 | { |
1367 | int i; | 1367 | int i; |
1368 | 1368 | ||
1369 | for (i = 0; i < context->stream_count; i++) { | 1369 | for (i = 0; i < context->stream_count; i++) { |
1370 | struct dc_stream *stream_has_pll = context->streams[i]; | 1370 | struct dc_stream_state *stream_has_pll = context->streams[i]; |
1371 | 1371 | ||
1372 | /* We are looking for non dp, non virtual stream */ | 1372 | /* We are looking for non dp, non virtual stream */ |
1373 | if (resource_are_streams_timing_synchronizable( | 1373 | if (resource_are_streams_timing_synchronizable( |
@@ -1411,7 +1411,7 @@ static int get_norm_pix_clk(const struct dc_crtc_timing *timing) | |||
1411 | return normalized_pix_clk; | 1411 | return normalized_pix_clk; |
1412 | } | 1412 | } |
1413 | 1413 | ||
1414 | static void calculate_phy_pix_clks(struct dc_stream *stream) | 1414 | static void calculate_phy_pix_clks(struct dc_stream_state *stream) |
1415 | { | 1415 | { |
1416 | update_stream_signal(stream); | 1416 | update_stream_signal(stream); |
1417 | 1417 | ||
@@ -1433,7 +1433,7 @@ enum dc_status resource_map_pool_resources( | |||
1433 | int i, j; | 1433 | int i, j; |
1434 | 1434 | ||
1435 | for (i = 0; old_context && i < context->stream_count; i++) { | 1435 | for (i = 0; old_context && i < context->stream_count; i++) { |
1436 | struct dc_stream *stream = context->streams[i]; | 1436 | struct dc_stream_state *stream = context->streams[i]; |
1437 | 1437 | ||
1438 | if (!resource_is_stream_unchanged(old_context, stream)) { | 1438 | if (!resource_is_stream_unchanged(old_context, stream)) { |
1439 | if (stream != NULL && old_context->streams[i] != NULL) { | 1439 | if (stream != NULL && old_context->streams[i] != NULL) { |
@@ -1486,7 +1486,7 @@ enum dc_status resource_map_pool_resources( | |||
1486 | } | 1486 | } |
1487 | 1487 | ||
1488 | for (i = 0; i < context->stream_count; i++) { | 1488 | for (i = 0; i < context->stream_count; i++) { |
1489 | struct dc_stream *stream = context->streams[i]; | 1489 | struct dc_stream_state *stream = context->streams[i]; |
1490 | struct pipe_ctx *pipe_ctx = NULL; | 1490 | struct pipe_ctx *pipe_ctx = NULL; |
1491 | int pipe_idx = -1; | 1491 | int pipe_idx = -1; |
1492 | 1492 | ||
@@ -1581,7 +1581,7 @@ static void set_avi_info_frame( | |||
1581 | struct encoder_info_packet *info_packet, | 1581 | struct encoder_info_packet *info_packet, |
1582 | struct pipe_ctx *pipe_ctx) | 1582 | struct pipe_ctx *pipe_ctx) |
1583 | { | 1583 | { |
1584 | struct dc_stream *stream = pipe_ctx->stream; | 1584 | struct dc_stream_state *stream = pipe_ctx->stream; |
1585 | enum dc_color_space color_space = COLOR_SPACE_UNKNOWN; | 1585 | enum dc_color_space color_space = COLOR_SPACE_UNKNOWN; |
1586 | struct info_frame info_frame = { {0} }; | 1586 | struct info_frame info_frame = { {0} }; |
1587 | uint32_t pixel_encoding = 0; | 1587 | uint32_t pixel_encoding = 0; |
@@ -1821,7 +1821,7 @@ static void set_avi_info_frame( | |||
1821 | 1821 | ||
1822 | static void set_vendor_info_packet( | 1822 | static void set_vendor_info_packet( |
1823 | struct encoder_info_packet *info_packet, | 1823 | struct encoder_info_packet *info_packet, |
1824 | struct dc_stream *stream) | 1824 | struct dc_stream_state *stream) |
1825 | { | 1825 | { |
1826 | uint32_t length = 0; | 1826 | uint32_t length = 0; |
1827 | bool hdmi_vic_mode = false; | 1827 | bool hdmi_vic_mode = false; |
@@ -1934,7 +1934,7 @@ static void set_vendor_info_packet( | |||
1934 | 1934 | ||
1935 | static void set_spd_info_packet( | 1935 | static void set_spd_info_packet( |
1936 | struct encoder_info_packet *info_packet, | 1936 | struct encoder_info_packet *info_packet, |
1937 | struct dc_stream *stream) | 1937 | struct dc_stream_state *stream) |
1938 | { | 1938 | { |
1939 | /* SPD info packet for FreeSync */ | 1939 | /* SPD info packet for FreeSync */ |
1940 | 1940 | ||
@@ -2056,7 +2056,7 @@ static void set_spd_info_packet( | |||
2056 | static void set_hdr_static_info_packet( | 2056 | static void set_hdr_static_info_packet( |
2057 | struct encoder_info_packet *info_packet, | 2057 | struct encoder_info_packet *info_packet, |
2058 | struct dc_plane_state *surface, | 2058 | struct dc_plane_state *surface, |
2059 | struct dc_stream *stream) | 2059 | struct dc_stream_state *stream) |
2060 | { | 2060 | { |
2061 | uint16_t i = 0; | 2061 | uint16_t i = 0; |
2062 | enum signal_type signal = stream->signal; | 2062 | enum signal_type signal = stream->signal; |
@@ -2159,7 +2159,7 @@ static void set_hdr_static_info_packet( | |||
2159 | 2159 | ||
2160 | static void set_vsc_info_packet( | 2160 | static void set_vsc_info_packet( |
2161 | struct encoder_info_packet *info_packet, | 2161 | struct encoder_info_packet *info_packet, |
2162 | struct dc_stream *stream) | 2162 | struct dc_stream_state *stream) |
2163 | { | 2163 | { |
2164 | unsigned int vscPacketRevision = 0; | 2164 | unsigned int vscPacketRevision = 0; |
2165 | unsigned int i; | 2165 | unsigned int i; |
@@ -2312,7 +2312,7 @@ enum dc_status resource_map_clock_resources( | |||
2312 | 2312 | ||
2313 | /* acquire new resources */ | 2313 | /* acquire new resources */ |
2314 | for (i = 0; i < context->stream_count; i++) { | 2314 | for (i = 0; i < context->stream_count; i++) { |
2315 | struct dc_stream *stream = context->streams[i]; | 2315 | struct dc_stream_state *stream = context->streams[i]; |
2316 | 2316 | ||
2317 | if (old_context && resource_is_stream_unchanged(old_context, stream)) | 2317 | if (old_context && resource_is_stream_unchanged(old_context, stream)) |
2318 | continue; | 2318 | continue; |
@@ -2392,7 +2392,7 @@ bool pipe_need_reprogram( | |||
2392 | return false; | 2392 | return false; |
2393 | } | 2393 | } |
2394 | 2394 | ||
2395 | void resource_build_bit_depth_reduction_params(struct dc_stream *stream, | 2395 | void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream, |
2396 | struct bit_depth_reduction_params *fmt_bit_depth) | 2396 | struct bit_depth_reduction_params *fmt_bit_depth) |
2397 | { | 2397 | { |
2398 | enum dc_dither_option option = stream->dither_option; | 2398 | enum dc_dither_option option = stream->dither_option; |
@@ -2502,7 +2502,7 @@ void resource_build_bit_depth_reduction_params(struct dc_stream *stream, | |||
2502 | fmt_bit_depth->pixel_encoding = pixel_encoding; | 2502 | fmt_bit_depth->pixel_encoding = pixel_encoding; |
2503 | } | 2503 | } |
2504 | 2504 | ||
2505 | bool dc_validate_stream(const struct dc *dc, struct dc_stream *stream) | 2505 | bool dc_validate_stream(const struct dc *dc, struct dc_stream_state *stream) |
2506 | { | 2506 | { |
2507 | struct core_dc *core_dc = DC_TO_CORE(dc); | 2507 | struct core_dc *core_dc = DC_TO_CORE(dc); |
2508 | struct dc_context *dc_ctx = core_dc->ctx; | 2508 | struct dc_context *dc_ctx = core_dc->ctx; |
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c index a77e1e80d7c2..7a87f38f2324 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c | |||
@@ -34,7 +34,7 @@ | |||
34 | * Private functions | 34 | * Private functions |
35 | ******************************************************************************/ | 35 | ******************************************************************************/ |
36 | 36 | ||
37 | static bool construct(struct dc_stream *stream, | 37 | static bool construct(struct dc_stream_state *stream, |
38 | struct dc_sink *dc_sink_data) | 38 | struct dc_sink *dc_sink_data) |
39 | { | 39 | { |
40 | uint32_t i = 0; | 40 | uint32_t i = 0; |
@@ -84,7 +84,7 @@ static bool construct(struct dc_stream *stream, | |||
84 | return true; | 84 | return true; |
85 | } | 85 | } |
86 | 86 | ||
87 | static void destruct(struct dc_stream *stream) | 87 | static void destruct(struct dc_stream_state *stream) |
88 | { | 88 | { |
89 | dc_sink_release(stream->sink); | 89 | dc_sink_release(stream->sink); |
90 | if (stream->out_transfer_func != NULL) { | 90 | if (stream->out_transfer_func != NULL) { |
@@ -94,14 +94,14 @@ static void destruct(struct dc_stream *stream) | |||
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | void dc_stream_retain(struct dc_stream *stream) | 97 | void dc_stream_retain(struct dc_stream_state *stream) |
98 | { | 98 | { |
99 | 99 | ||
100 | ASSERT(stream->ref_count > 0); | 100 | ASSERT(stream->ref_count > 0); |
101 | stream->ref_count++; | 101 | stream->ref_count++; |
102 | } | 102 | } |
103 | 103 | ||
104 | void dc_stream_release(struct dc_stream *stream) | 104 | void dc_stream_release(struct dc_stream_state *stream) |
105 | { | 105 | { |
106 | 106 | ||
107 | if (stream != NULL) { | 107 | if (stream != NULL) { |
@@ -115,15 +115,15 @@ void dc_stream_release(struct dc_stream *stream) | |||
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | struct dc_stream *dc_create_stream_for_sink( | 118 | struct dc_stream_state *dc_create_stream_for_sink( |
119 | struct dc_sink *sink) | 119 | struct dc_sink *sink) |
120 | { | 120 | { |
121 | struct dc_stream *stream; | 121 | struct dc_stream_state *stream; |
122 | 122 | ||
123 | if (sink == NULL) | 123 | if (sink == NULL) |
124 | goto alloc_fail; | 124 | goto alloc_fail; |
125 | 125 | ||
126 | stream = dm_alloc(sizeof(struct dc_stream)); | 126 | stream = dm_alloc(sizeof(struct dc_stream_state)); |
127 | 127 | ||
128 | if (NULL == stream) | 128 | if (NULL == stream) |
129 | goto alloc_fail; | 129 | goto alloc_fail; |
@@ -143,7 +143,7 @@ alloc_fail: | |||
143 | } | 143 | } |
144 | 144 | ||
145 | struct dc_stream_status *dc_stream_get_status( | 145 | struct dc_stream_status *dc_stream_get_status( |
146 | struct dc_stream *stream) | 146 | struct dc_stream_state *stream) |
147 | { | 147 | { |
148 | uint8_t i; | 148 | uint8_t i; |
149 | struct core_dc *dc = DC_TO_CORE(stream->ctx->dc); | 149 | struct core_dc *dc = DC_TO_CORE(stream->ctx->dc); |
@@ -161,7 +161,7 @@ struct dc_stream_status *dc_stream_get_status( | |||
161 | * Update the cursor attributes and set cursor surface address | 161 | * Update the cursor attributes and set cursor surface address |
162 | */ | 162 | */ |
163 | bool dc_stream_set_cursor_attributes( | 163 | bool dc_stream_set_cursor_attributes( |
164 | const struct dc_stream *stream, | 164 | const struct dc_stream_state *stream, |
165 | const struct dc_cursor_attributes *attributes) | 165 | const struct dc_cursor_attributes *attributes) |
166 | { | 166 | { |
167 | int i; | 167 | int i; |
@@ -196,7 +196,7 @@ bool dc_stream_set_cursor_attributes( | |||
196 | } | 196 | } |
197 | 197 | ||
198 | bool dc_stream_set_cursor_position( | 198 | bool dc_stream_set_cursor_position( |
199 | struct dc_stream *stream, | 199 | struct dc_stream_state *stream, |
200 | const struct dc_cursor_position *position) | 200 | const struct dc_cursor_position *position) |
201 | { | 201 | { |
202 | int i; | 202 | int i; |
@@ -245,7 +245,7 @@ bool dc_stream_set_cursor_position( | |||
245 | return true; | 245 | return true; |
246 | } | 246 | } |
247 | 247 | ||
248 | uint32_t dc_stream_get_vblank_counter(const struct dc_stream *stream) | 248 | uint32_t dc_stream_get_vblank_counter(const struct dc_stream_state *stream) |
249 | { | 249 | { |
250 | uint8_t i; | 250 | uint8_t i; |
251 | struct core_dc *core_dc = DC_TO_CORE(stream->ctx->dc); | 251 | struct core_dc *core_dc = DC_TO_CORE(stream->ctx->dc); |
@@ -264,7 +264,7 @@ uint32_t dc_stream_get_vblank_counter(const struct dc_stream *stream) | |||
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |
266 | 266 | ||
267 | bool dc_stream_get_scanoutpos(const struct dc_stream *stream, | 267 | bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream, |
268 | uint32_t *v_blank_start, | 268 | uint32_t *v_blank_start, |
269 | uint32_t *v_blank_end, | 269 | uint32_t *v_blank_end, |
270 | uint32_t *h_position, | 270 | uint32_t *h_position, |
@@ -297,7 +297,7 @@ bool dc_stream_get_scanoutpos(const struct dc_stream *stream, | |||
297 | 297 | ||
298 | 298 | ||
299 | void dc_stream_log( | 299 | void dc_stream_log( |
300 | const struct dc_stream *stream, | 300 | const struct dc_stream_state *stream, |
301 | struct dal_logger *dm_logger, | 301 | struct dal_logger *dm_logger, |
302 | enum dc_log_type log_type) | 302 | enum dc_log_type log_type) |
303 | { | 303 | { |
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index d1943b9644d4..ab805965e321 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h | |||
@@ -101,30 +101,30 @@ struct dc_cap_funcs { | |||
101 | struct dc_surface_dcc_cap *output); | 101 | struct dc_surface_dcc_cap *output); |
102 | }; | 102 | }; |
103 | 103 | ||
104 | struct dc_stream_funcs { | 104 | struct dc_stream_state_funcs { |
105 | bool (*adjust_vmin_vmax)(struct dc *dc, | 105 | bool (*adjust_vmin_vmax)(struct dc *dc, |
106 | struct dc_stream **stream, | 106 | struct dc_stream_state **stream, |
107 | int num_streams, | 107 | int num_streams, |
108 | int vmin, | 108 | int vmin, |
109 | int vmax); | 109 | int vmax); |
110 | bool (*get_crtc_position)(struct dc *dc, | 110 | bool (*get_crtc_position)(struct dc *dc, |
111 | struct dc_stream **stream, | 111 | struct dc_stream_state **stream, |
112 | int num_streams, | 112 | int num_streams, |
113 | unsigned int *v_pos, | 113 | unsigned int *v_pos, |
114 | unsigned int *nom_v_pos); | 114 | unsigned int *nom_v_pos); |
115 | 115 | ||
116 | bool (*set_gamut_remap)(struct dc *dc, | 116 | bool (*set_gamut_remap)(struct dc *dc, |
117 | const struct dc_stream *stream); | 117 | const struct dc_stream_state *stream); |
118 | 118 | ||
119 | bool (*program_csc_matrix)(struct dc *dc, | 119 | bool (*program_csc_matrix)(struct dc *dc, |
120 | struct dc_stream *stream); | 120 | struct dc_stream_state *stream); |
121 | 121 | ||
122 | void (*set_static_screen_events)(struct dc *dc, | 122 | void (*set_static_screen_events)(struct dc *dc, |
123 | struct dc_stream **stream, | 123 | struct dc_stream_state **stream, |
124 | int num_streams, | 124 | int num_streams, |
125 | const struct dc_static_screen_events *events); | 125 | const struct dc_static_screen_events *events); |
126 | 126 | ||
127 | void (*set_dither_option)(struct dc_stream *stream, | 127 | void (*set_dither_option)(struct dc_stream_state *stream, |
128 | enum dc_dither_option option); | 128 | enum dc_dither_option option); |
129 | }; | 129 | }; |
130 | 130 | ||
@@ -190,7 +190,7 @@ struct dc_debug { | |||
190 | struct dc { | 190 | struct dc { |
191 | struct dc_caps caps; | 191 | struct dc_caps caps; |
192 | struct dc_cap_funcs cap_funcs; | 192 | struct dc_cap_funcs cap_funcs; |
193 | struct dc_stream_funcs stream_funcs; | 193 | struct dc_stream_state_funcs stream_funcs; |
194 | struct dc_link_funcs link_funcs; | 194 | struct dc_link_funcs link_funcs; |
195 | struct dc_config config; | 195 | struct dc_config config; |
196 | struct dc_debug debug; | 196 | struct dc_debug debug; |
@@ -426,7 +426,7 @@ bool dc_commit_surfaces_to_stream( | |||
426 | struct dc *dc, | 426 | struct dc *dc, |
427 | struct dc_plane_state **dc_surfaces, | 427 | struct dc_plane_state **dc_surfaces, |
428 | uint8_t surface_count, | 428 | uint8_t surface_count, |
429 | struct dc_stream *stream); | 429 | struct dc_stream_state *stream); |
430 | 430 | ||
431 | bool dc_post_update_surfaces_to_stream( | 431 | bool dc_post_update_surfaces_to_stream( |
432 | struct dc *dc); | 432 | struct dc *dc); |
@@ -478,7 +478,7 @@ struct dc_stream_status { | |||
478 | struct dc_link *link; | 478 | struct dc_link *link; |
479 | }; | 479 | }; |
480 | 480 | ||
481 | struct dc_stream { | 481 | struct dc_stream_state { |
482 | struct dc_sink *sink; | 482 | struct dc_sink *sink; |
483 | struct dc_crtc_timing timing; | 483 | struct dc_crtc_timing timing; |
484 | 484 | ||
@@ -529,7 +529,7 @@ struct dc_stream_update { | |||
529 | }; | 529 | }; |
530 | 530 | ||
531 | bool dc_is_stream_unchanged( | 531 | bool dc_is_stream_unchanged( |
532 | struct dc_stream *old_stream, struct dc_stream *stream); | 532 | struct dc_stream_state *old_stream, struct dc_stream_state *stream); |
533 | 533 | ||
534 | /* | 534 | /* |
535 | * Setup stream attributes if no stream updates are provided | 535 | * Setup stream attributes if no stream updates are provided |
@@ -548,30 +548,30 @@ bool dc_is_stream_unchanged( | |||
548 | 548 | ||
549 | void dc_update_surfaces_and_stream(struct dc *dc, | 549 | void dc_update_surfaces_and_stream(struct dc *dc, |
550 | struct dc_surface_update *surface_updates, int surface_count, | 550 | struct dc_surface_update *surface_updates, int surface_count, |
551 | struct dc_stream *dc_stream, | 551 | struct dc_stream_state *dc_stream, |
552 | struct dc_stream_update *stream_update); | 552 | struct dc_stream_update *stream_update); |
553 | 553 | ||
554 | /* | 554 | /* |
555 | * Log the current stream state. | 555 | * Log the current stream state. |
556 | */ | 556 | */ |
557 | void dc_stream_log( | 557 | void dc_stream_log( |
558 | const struct dc_stream *stream, | 558 | const struct dc_stream_state *stream, |
559 | struct dal_logger *dc_logger, | 559 | struct dal_logger *dc_logger, |
560 | enum dc_log_type log_type); | 560 | enum dc_log_type log_type); |
561 | 561 | ||
562 | uint8_t dc_get_current_stream_count(const struct dc *dc); | 562 | uint8_t dc_get_current_stream_count(const struct dc *dc); |
563 | struct dc_stream *dc_get_stream_at_index(const struct dc *dc, uint8_t i); | 563 | struct dc_stream_state *dc_get_stream_at_index(const struct dc *dc, uint8_t i); |
564 | 564 | ||
565 | /* | 565 | /* |
566 | * Return the current frame counter. | 566 | * Return the current frame counter. |
567 | */ | 567 | */ |
568 | uint32_t dc_stream_get_vblank_counter(const struct dc_stream *stream); | 568 | uint32_t dc_stream_get_vblank_counter(const struct dc_stream_state *stream); |
569 | 569 | ||
570 | /* TODO: Return parsed values rather than direct register read | 570 | /* TODO: Return parsed values rather than direct register read |
571 | * This has a dependency on the caller (amdgpu_get_crtc_scanoutpos) | 571 | * This has a dependency on the caller (amdgpu_get_crtc_scanoutpos) |
572 | * being refactored properly to be dce-specific | 572 | * being refactored properly to be dce-specific |
573 | */ | 573 | */ |
574 | bool dc_stream_get_scanoutpos(const struct dc_stream *stream, | 574 | bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream, |
575 | uint32_t *v_blank_start, | 575 | uint32_t *v_blank_start, |
576 | uint32_t *v_blank_end, | 576 | uint32_t *v_blank_end, |
577 | uint32_t *h_position, | 577 | uint32_t *h_position, |
@@ -581,12 +581,12 @@ bool dc_stream_get_scanoutpos(const struct dc_stream *stream, | |||
581 | * Structure to store surface/stream associations for validation | 581 | * Structure to store surface/stream associations for validation |
582 | */ | 582 | */ |
583 | struct dc_validation_set { | 583 | struct dc_validation_set { |
584 | struct dc_stream *stream; | 584 | struct dc_stream_state *stream; |
585 | struct dc_plane_state *surfaces[MAX_SURFACES]; | 585 | struct dc_plane_state *surfaces[MAX_SURFACES]; |
586 | uint8_t surface_count; | 586 | uint8_t surface_count; |
587 | }; | 587 | }; |
588 | 588 | ||
589 | bool dc_validate_stream(const struct dc *dc, struct dc_stream *stream); | 589 | bool dc_validate_stream(const struct dc *dc, struct dc_stream_state *stream); |
590 | 590 | ||
591 | bool dc_validate_plane(const struct dc *dc, const struct dc_plane_state *plane_state); | 591 | bool dc_validate_plane(const struct dc *dc, const struct dc_plane_state *plane_state); |
592 | /* | 592 | /* |
@@ -615,7 +615,7 @@ bool dc_validate_resources( | |||
615 | 615 | ||
616 | bool dc_validate_guaranteed( | 616 | bool dc_validate_guaranteed( |
617 | const struct dc *dc, | 617 | const struct dc *dc, |
618 | struct dc_stream *stream); | 618 | struct dc_stream_state *stream); |
619 | 619 | ||
620 | void dc_resource_validate_ctx_copy_construct( | 620 | void dc_resource_validate_ctx_copy_construct( |
621 | const struct validate_context *src_ctx, | 621 | const struct validate_context *src_ctx, |
@@ -644,7 +644,7 @@ bool dc_commit_context(struct dc *dc, struct validate_context *context); | |||
644 | */ | 644 | */ |
645 | bool dc_commit_streams( | 645 | bool dc_commit_streams( |
646 | struct dc *dc, | 646 | struct dc *dc, |
647 | struct dc_stream *streams[], | 647 | struct dc_stream_state *streams[], |
648 | uint8_t stream_count); | 648 | uint8_t stream_count); |
649 | /* | 649 | /* |
650 | * Enable stereo when commit_streams is not required, | 650 | * Enable stereo when commit_streams is not required, |
@@ -653,19 +653,19 @@ bool dc_commit_streams( | |||
653 | bool dc_enable_stereo( | 653 | bool dc_enable_stereo( |
654 | struct dc *dc, | 654 | struct dc *dc, |
655 | struct validate_context *context, | 655 | struct validate_context *context, |
656 | struct dc_stream *streams[], | 656 | struct dc_stream_state *streams[], |
657 | uint8_t stream_count); | 657 | uint8_t stream_count); |
658 | 658 | ||
659 | /** | 659 | /** |
660 | * Create a new default stream for the requested sink | 660 | * Create a new default stream for the requested sink |
661 | */ | 661 | */ |
662 | struct dc_stream *dc_create_stream_for_sink(struct dc_sink *dc_sink); | 662 | struct dc_stream_state *dc_create_stream_for_sink(struct dc_sink *dc_sink); |
663 | 663 | ||
664 | void dc_stream_retain(struct dc_stream *dc_stream); | 664 | void dc_stream_retain(struct dc_stream_state *dc_stream); |
665 | void dc_stream_release(struct dc_stream *dc_stream); | 665 | void dc_stream_release(struct dc_stream_state *dc_stream); |
666 | 666 | ||
667 | struct dc_stream_status *dc_stream_get_status( | 667 | struct dc_stream_status *dc_stream_get_status( |
668 | struct dc_stream *dc_stream); | 668 | struct dc_stream_state *dc_stream); |
669 | 669 | ||
670 | enum surface_update_type dc_check_update_surfaces_for_stream( | 670 | enum surface_update_type dc_check_update_surfaces_for_stream( |
671 | struct dc *dc, | 671 | struct dc *dc, |
@@ -804,7 +804,7 @@ const struct graphics_object_id dc_get_link_id_at_index( | |||
804 | 804 | ||
805 | /* Set backlight level of an embedded panel (eDP, LVDS). */ | 805 | /* Set backlight level of an embedded panel (eDP, LVDS). */ |
806 | bool dc_link_set_backlight_level(const struct dc_link *dc_link, uint32_t level, | 806 | bool dc_link_set_backlight_level(const struct dc_link *dc_link, uint32_t level, |
807 | uint32_t frame_ramp, const struct dc_stream *stream); | 807 | uint32_t frame_ramp, const struct dc_stream_state *stream); |
808 | 808 | ||
809 | bool dc_link_set_abm_disable(const struct dc_link *dc_link); | 809 | bool dc_link_set_abm_disable(const struct dc_link *dc_link); |
810 | 810 | ||
@@ -813,7 +813,7 @@ bool dc_link_set_psr_enable(const struct dc_link *dc_link, bool enable); | |||
813 | bool dc_link_get_psr_state(const struct dc_link *dc_link, uint32_t *psr_state); | 813 | bool dc_link_get_psr_state(const struct dc_link *dc_link, uint32_t *psr_state); |
814 | 814 | ||
815 | bool dc_link_setup_psr(struct dc_link *dc_link, | 815 | bool dc_link_setup_psr(struct dc_link *dc_link, |
816 | const struct dc_stream *stream, struct psr_config *psr_config, | 816 | const struct dc_stream_state *stream, struct psr_config *psr_config, |
817 | struct psr_context *psr_context); | 817 | struct psr_context *psr_context); |
818 | 818 | ||
819 | /* Request DC to detect if there is a Panel connected. | 819 | /* Request DC to detect if there is a Panel connected. |
@@ -927,11 +927,11 @@ bool dc_sink_set_container_id(struct dc_sink *dc_sink, const struct dc_container | |||
927 | ******************************************************************************/ | 927 | ******************************************************************************/ |
928 | /* TODO: Deprecated once we switch to dc_set_cursor_position */ | 928 | /* TODO: Deprecated once we switch to dc_set_cursor_position */ |
929 | bool dc_stream_set_cursor_attributes( | 929 | bool dc_stream_set_cursor_attributes( |
930 | const struct dc_stream *stream, | 930 | const struct dc_stream_state *stream, |
931 | const struct dc_cursor_attributes *attributes); | 931 | const struct dc_cursor_attributes *attributes); |
932 | 932 | ||
933 | bool dc_stream_set_cursor_position( | 933 | bool dc_stream_set_cursor_position( |
934 | struct dc_stream *stream, | 934 | struct dc_stream_state *stream, |
935 | const struct dc_cursor_position *position); | 935 | const struct dc_cursor_position *position); |
936 | 936 | ||
937 | /* Newer interfaces */ | 937 | /* Newer interfaces */ |
diff --git a/drivers/gpu/drm/amd/display/dc/dc_types.h b/drivers/gpu/drm/amd/display/dc/dc_types.h index 4fb9584452a4..a47f7472ea92 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_types.h +++ b/drivers/gpu/drm/amd/display/dc/dc_types.h | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | /* forward declarations */ | 36 | /* forward declarations */ |
37 | struct dc_plane_state; | 37 | struct dc_plane_state; |
38 | struct dc_stream; | 38 | struct dc_stream_state; |
39 | struct dc_link; | 39 | struct dc_link; |
40 | struct dc_sink; | 40 | struct dc_sink; |
41 | struct dal; | 41 | struct dal; |
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c index 24d0c48258ee..5bb2ac71f297 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | |||
@@ -1009,7 +1009,7 @@ bool dce110_link_encoder_construct( | |||
1009 | 1009 | ||
1010 | bool dce110_link_encoder_validate_output_with_stream( | 1010 | bool dce110_link_encoder_validate_output_with_stream( |
1011 | struct link_encoder *enc, | 1011 | struct link_encoder *enc, |
1012 | const struct dc_stream *stream) | 1012 | const struct dc_stream_state *stream) |
1013 | { | 1013 | { |
1014 | struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc); | 1014 | struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc); |
1015 | bool is_valid; | 1015 | bool is_valid; |
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h index 5f05ca65281e..5960fb933f1f 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h | |||
@@ -196,7 +196,7 @@ bool dce110_link_encoder_validate_wireless_output( | |||
196 | 196 | ||
197 | bool dce110_link_encoder_validate_output_with_stream( | 197 | bool dce110_link_encoder_validate_output_with_stream( |
198 | struct link_encoder *enc, | 198 | struct link_encoder *enc, |
199 | const struct dc_stream *stream); | 199 | const struct dc_stream_state *stream); |
200 | 200 | ||
201 | /****************** HW programming ************************/ | 201 | /****************** HW programming ************************/ |
202 | 202 | ||
diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c index 2cf2fefc3d79..98fb7f02a6fe 100644 --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | |||
@@ -660,7 +660,7 @@ static enum dc_status build_mapped_resource( | |||
660 | uint8_t i, j; | 660 | uint8_t i, j; |
661 | 661 | ||
662 | for (i = 0; i < context->stream_count; i++) { | 662 | for (i = 0; i < context->stream_count; i++) { |
663 | struct dc_stream *stream = context->streams[i]; | 663 | struct dc_stream_state *stream = context->streams[i]; |
664 | 664 | ||
665 | if (old_context && resource_is_stream_unchanged(old_context, stream)) | 665 | if (old_context && resource_is_stream_unchanged(old_context, stream)) |
666 | continue; | 666 | continue; |
@@ -765,7 +765,7 @@ enum dc_status dce100_validate_with_context( | |||
765 | 765 | ||
766 | enum dc_status dce100_validate_guaranteed( | 766 | enum dc_status dce100_validate_guaranteed( |
767 | const struct core_dc *dc, | 767 | const struct core_dc *dc, |
768 | struct dc_stream *dc_stream, | 768 | struct dc_stream_state *dc_stream, |
769 | struct validate_context *context) | 769 | struct validate_context *context) |
770 | { | 770 | { |
771 | enum dc_status result = DC_ERROR_UNEXPECTED; | 771 | enum dc_status result = DC_ERROR_UNEXPECTED; |
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c index 84dc8916de96..e4310a376116 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | |||
@@ -623,7 +623,7 @@ static bool dce110_translate_regamma_to_hw_format(const struct dc_transfer_func | |||
623 | 623 | ||
624 | static bool dce110_set_output_transfer_func( | 624 | static bool dce110_set_output_transfer_func( |
625 | struct pipe_ctx *pipe_ctx, | 625 | struct pipe_ctx *pipe_ctx, |
626 | const struct dc_stream *stream) | 626 | const struct dc_stream_state *stream) |
627 | { | 627 | { |
628 | struct transform *xfm = pipe_ctx->xfm; | 628 | struct transform *xfm = pipe_ctx->xfm; |
629 | 629 | ||
@@ -745,7 +745,7 @@ void dce110_enable_stream(struct pipe_ctx *pipe_ctx) | |||
745 | 745 | ||
746 | void dce110_disable_stream(struct pipe_ctx *pipe_ctx) | 746 | void dce110_disable_stream(struct pipe_ctx *pipe_ctx) |
747 | { | 747 | { |
748 | struct dc_stream *stream = pipe_ctx->stream; | 748 | struct dc_stream_state *stream = pipe_ctx->stream; |
749 | struct dc_link *link = stream->sink->link; | 749 | struct dc_link *link = stream->sink->link; |
750 | 750 | ||
751 | if (pipe_ctx->audio) { | 751 | if (pipe_ctx->audio) { |
@@ -833,7 +833,7 @@ static void build_audio_output( | |||
833 | const struct pipe_ctx *pipe_ctx, | 833 | const struct pipe_ctx *pipe_ctx, |
834 | struct audio_output *audio_output) | 834 | struct audio_output *audio_output) |
835 | { | 835 | { |
836 | const struct dc_stream *stream = pipe_ctx->stream; | 836 | const struct dc_stream_state *stream = pipe_ctx->stream; |
837 | audio_output->engine_id = pipe_ctx->stream_enc->id; | 837 | audio_output->engine_id = pipe_ctx->stream_enc->id; |
838 | 838 | ||
839 | audio_output->signal = pipe_ctx->stream->signal; | 839 | audio_output->signal = pipe_ctx->stream->signal; |
@@ -981,7 +981,7 @@ static enum dc_status dce110_prog_pixclk_crtc_otg( | |||
981 | struct validate_context *context, | 981 | struct validate_context *context, |
982 | struct core_dc *dc) | 982 | struct core_dc *dc) |
983 | { | 983 | { |
984 | struct dc_stream *stream = pipe_ctx->stream; | 984 | struct dc_stream_state *stream = pipe_ctx->stream; |
985 | struct pipe_ctx *pipe_ctx_old = &dc->current_context->res_ctx. | 985 | struct pipe_ctx *pipe_ctx_old = &dc->current_context->res_ctx. |
986 | pipe_ctx[pipe_ctx->pipe_idx]; | 986 | pipe_ctx[pipe_ctx->pipe_idx]; |
987 | struct tg_color black_color = {0}; | 987 | struct tg_color black_color = {0}; |
@@ -1037,7 +1037,7 @@ static enum dc_status apply_single_controller_ctx_to_hw( | |||
1037 | struct validate_context *context, | 1037 | struct validate_context *context, |
1038 | struct core_dc *dc) | 1038 | struct core_dc *dc) |
1039 | { | 1039 | { |
1040 | struct dc_stream *stream = pipe_ctx->stream; | 1040 | struct dc_stream_state *stream = pipe_ctx->stream; |
1041 | struct pipe_ctx *pipe_ctx_old = &dc->current_context->res_ctx. | 1041 | struct pipe_ctx *pipe_ctx_old = &dc->current_context->res_ctx. |
1042 | pipe_ctx[pipe_ctx->pipe_idx]; | 1042 | pipe_ctx[pipe_ctx->pipe_idx]; |
1043 | 1043 | ||
@@ -1229,7 +1229,7 @@ void dce110_enable_accelerated_mode(struct core_dc *dc) | |||
1229 | 1229 | ||
1230 | static uint32_t compute_pstate_blackout_duration( | 1230 | static uint32_t compute_pstate_blackout_duration( |
1231 | struct bw_fixed blackout_duration, | 1231 | struct bw_fixed blackout_duration, |
1232 | const struct dc_stream *stream) | 1232 | const struct dc_stream_state *stream) |
1233 | { | 1233 | { |
1234 | uint32_t total_dest_line_time_ns; | 1234 | uint32_t total_dest_line_time_ns; |
1235 | uint32_t pstate_blackout_duration_ns; | 1235 | uint32_t pstate_blackout_duration_ns; |
@@ -2325,7 +2325,7 @@ void dce110_fill_display_configs( | |||
2325 | for (j = 0; j < context->stream_count; j++) { | 2325 | for (j = 0; j < context->stream_count; j++) { |
2326 | int k; | 2326 | int k; |
2327 | 2327 | ||
2328 | const struct dc_stream *stream = context->streams[j]; | 2328 | const struct dc_stream_state *stream = context->streams[j]; |
2329 | struct dm_pp_single_disp_config *cfg = | 2329 | struct dm_pp_single_disp_config *cfg = |
2330 | &pp_display_cfg->disp_configs[num_cfgs]; | 2330 | &pp_display_cfg->disp_configs[num_cfgs]; |
2331 | const struct pipe_ctx *pipe_ctx = NULL; | 2331 | const struct pipe_ctx *pipe_ctx = NULL; |
@@ -2370,7 +2370,7 @@ uint32_t dce110_get_min_vblank_time_us(const struct validate_context *context) | |||
2370 | uint32_t min_vertical_blank_time = -1; | 2370 | uint32_t min_vertical_blank_time = -1; |
2371 | 2371 | ||
2372 | for (j = 0; j < context->stream_count; j++) { | 2372 | for (j = 0; j < context->stream_count; j++) { |
2373 | struct dc_stream *stream = context->streams[j]; | 2373 | struct dc_stream_state *stream = context->streams[j]; |
2374 | uint32_t vertical_blank_in_pixels = 0; | 2374 | uint32_t vertical_blank_in_pixels = 0; |
2375 | uint32_t vertical_blank_time = 0; | 2375 | uint32_t vertical_blank_time = 0; |
2376 | 2376 | ||
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c index 5c1790b61290..89b21bd57a35 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | |||
@@ -718,7 +718,7 @@ static void get_pixel_clock_parameters( | |||
718 | const struct pipe_ctx *pipe_ctx, | 718 | const struct pipe_ctx *pipe_ctx, |
719 | struct pixel_clk_params *pixel_clk_params) | 719 | struct pixel_clk_params *pixel_clk_params) |
720 | { | 720 | { |
721 | const struct dc_stream *stream = pipe_ctx->stream; | 721 | const struct dc_stream_state *stream = pipe_ctx->stream; |
722 | 722 | ||
723 | /*TODO: is this halved for YCbCr 420? in that case we might want to move | 723 | /*TODO: is this halved for YCbCr 420? in that case we might want to move |
724 | * the pixel clock normalization for hdmi up to here instead of doing it | 724 | * the pixel clock normalization for hdmi up to here instead of doing it |
@@ -780,7 +780,7 @@ static enum dc_status build_mapped_resource( | |||
780 | uint8_t i, j; | 780 | uint8_t i, j; |
781 | 781 | ||
782 | for (i = 0; i < context->stream_count; i++) { | 782 | for (i = 0; i < context->stream_count; i++) { |
783 | struct dc_stream *stream = context->streams[i]; | 783 | struct dc_stream_state *stream = context->streams[i]; |
784 | 784 | ||
785 | if (old_context && resource_is_stream_unchanged(old_context, stream)) | 785 | if (old_context && resource_is_stream_unchanged(old_context, stream)) |
786 | continue; | 786 | continue; |
@@ -973,7 +973,7 @@ enum dc_status dce110_validate_with_context( | |||
973 | 973 | ||
974 | enum dc_status dce110_validate_guaranteed( | 974 | enum dc_status dce110_validate_guaranteed( |
975 | const struct core_dc *dc, | 975 | const struct core_dc *dc, |
976 | struct dc_stream *dc_stream, | 976 | struct dc_stream_state *dc_stream, |
977 | struct validate_context *context) | 977 | struct validate_context *context) |
978 | { | 978 | { |
979 | enum dc_status result = DC_ERROR_UNEXPECTED; | 979 | enum dc_status result = DC_ERROR_UNEXPECTED; |
@@ -1006,7 +1006,7 @@ enum dc_status dce110_validate_guaranteed( | |||
1006 | static struct pipe_ctx *dce110_acquire_underlay( | 1006 | static struct pipe_ctx *dce110_acquire_underlay( |
1007 | struct validate_context *context, | 1007 | struct validate_context *context, |
1008 | const struct resource_pool *pool, | 1008 | const struct resource_pool *pool, |
1009 | struct dc_stream *stream) | 1009 | struct dc_stream_state *stream) |
1010 | { | 1010 | { |
1011 | struct core_dc *dc = DC_TO_CORE(stream->ctx->dc); | 1011 | struct core_dc *dc = DC_TO_CORE(stream->ctx->dc); |
1012 | struct resource_context *res_ctx = &context->res_ctx; | 1012 | struct resource_context *res_ctx = &context->res_ctx; |
diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c index c68372fa1292..68554d6edd94 100644 --- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | |||
@@ -700,7 +700,7 @@ static void destruct(struct dce110_resource_pool *pool) | |||
700 | static struct clock_source *find_matching_pll( | 700 | static struct clock_source *find_matching_pll( |
701 | struct resource_context *res_ctx, | 701 | struct resource_context *res_ctx, |
702 | const struct resource_pool *pool, | 702 | const struct resource_pool *pool, |
703 | const struct dc_stream *const stream) | 703 | const struct dc_stream_state *const stream) |
704 | { | 704 | { |
705 | switch (stream->sink->link->link_enc->transmitter) { | 705 | switch (stream->sink->link->link_enc->transmitter) { |
706 | case TRANSMITTER_UNIPHY_A: | 706 | case TRANSMITTER_UNIPHY_A: |
@@ -731,7 +731,7 @@ static enum dc_status build_mapped_resource( | |||
731 | uint8_t i, j; | 731 | uint8_t i, j; |
732 | 732 | ||
733 | for (i = 0; i < context->stream_count; i++) { | 733 | for (i = 0; i < context->stream_count; i++) { |
734 | struct dc_stream *stream = context->streams[i]; | 734 | struct dc_stream_state *stream = context->streams[i]; |
735 | 735 | ||
736 | if (old_context && resource_is_stream_unchanged(old_context, stream)) | 736 | if (old_context && resource_is_stream_unchanged(old_context, stream)) |
737 | continue; | 737 | continue; |
@@ -845,7 +845,7 @@ enum dc_status resource_map_phy_clock_resources( | |||
845 | 845 | ||
846 | /* acquire new resources */ | 846 | /* acquire new resources */ |
847 | for (i = 0; i < context->stream_count; i++) { | 847 | for (i = 0; i < context->stream_count; i++) { |
848 | struct dc_stream *stream = context->streams[i]; | 848 | struct dc_stream_state *stream = context->streams[i]; |
849 | 849 | ||
850 | if (old_context && resource_is_stream_unchanged(old_context, stream)) | 850 | if (old_context && resource_is_stream_unchanged(old_context, stream)) |
851 | continue; | 851 | continue; |
@@ -949,7 +949,7 @@ enum dc_status dce112_validate_with_context( | |||
949 | 949 | ||
950 | enum dc_status dce112_validate_guaranteed( | 950 | enum dc_status dce112_validate_guaranteed( |
951 | const struct core_dc *dc, | 951 | const struct core_dc *dc, |
952 | struct dc_stream *stream, | 952 | struct dc_stream_state *stream, |
953 | struct validate_context *context) | 953 | struct validate_context *context) |
954 | { | 954 | { |
955 | enum dc_status result = DC_ERROR_UNEXPECTED; | 955 | enum dc_status result = DC_ERROR_UNEXPECTED; |
diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.h b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.h index cb2c69fb05a6..feef559f1ecd 100644 --- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.h +++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.h | |||
@@ -44,7 +44,7 @@ enum dc_status dce112_validate_with_context( | |||
44 | 44 | ||
45 | enum dc_status dce112_validate_guaranteed( | 45 | enum dc_status dce112_validate_guaranteed( |
46 | const struct core_dc *dc, | 46 | const struct core_dc *dc, |
47 | struct dc_stream *dc_stream, | 47 | struct dc_stream_state *dc_stream, |
48 | struct validate_context *context); | 48 | struct validate_context *context); |
49 | 49 | ||
50 | bool dce112_validate_bandwidth( | 50 | bool dce112_validate_bandwidth( |
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c index bcb66447b558..734b35eddeed 100644 --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | |||
@@ -677,7 +677,7 @@ static enum dc_status build_mapped_resource( | |||
677 | uint8_t i, j; | 677 | uint8_t i, j; |
678 | 678 | ||
679 | for (i = 0; i < context->stream_count; i++) { | 679 | for (i = 0; i < context->stream_count; i++) { |
680 | struct dc_stream *stream = context->streams[i]; | 680 | struct dc_stream_state *stream = context->streams[i]; |
681 | 681 | ||
682 | if (old_context && resource_is_stream_unchanged(old_context, stream)) | 682 | if (old_context && resource_is_stream_unchanged(old_context, stream)) |
683 | continue; | 683 | continue; |
@@ -781,7 +781,7 @@ enum dc_status dce80_validate_with_context( | |||
781 | 781 | ||
782 | enum dc_status dce80_validate_guaranteed( | 782 | enum dc_status dce80_validate_guaranteed( |
783 | const struct core_dc *dc, | 783 | const struct core_dc *dc, |
784 | struct dc_stream *dc_stream, | 784 | struct dc_stream_state *dc_stream, |
785 | struct validate_context *context) | 785 | struct validate_context *context) |
786 | { | 786 | { |
787 | enum dc_status result = DC_ERROR_UNEXPECTED; | 787 | enum dc_status result = DC_ERROR_UNEXPECTED; |
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c index 3979cb03cf8d..866f63d1259d 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | |||
@@ -679,7 +679,7 @@ static enum dc_status dcn10_prog_pixclk_crtc_otg( | |||
679 | struct validate_context *context, | 679 | struct validate_context *context, |
680 | struct core_dc *dc) | 680 | struct core_dc *dc) |
681 | { | 681 | { |
682 | struct dc_stream *stream = pipe_ctx->stream; | 682 | struct dc_stream_state *stream = pipe_ctx->stream; |
683 | enum dc_color_space color_space; | 683 | enum dc_color_space color_space; |
684 | struct tg_color black_color = {0}; | 684 | struct tg_color black_color = {0}; |
685 | bool enableStereo = stream->timing.timing_3d_format == TIMING_3D_FORMAT_NONE ? | 685 | bool enableStereo = stream->timing.timing_3d_format == TIMING_3D_FORMAT_NONE ? |
@@ -1445,7 +1445,7 @@ static bool dcn10_translate_regamma_to_hw_format(const struct dc_transfer_func | |||
1445 | 1445 | ||
1446 | static bool dcn10_set_output_transfer_func( | 1446 | static bool dcn10_set_output_transfer_func( |
1447 | struct pipe_ctx *pipe_ctx, | 1447 | struct pipe_ctx *pipe_ctx, |
1448 | const struct dc_stream *stream) | 1448 | const struct dc_stream_state *stream) |
1449 | { | 1449 | { |
1450 | struct transform *xfm = pipe_ctx->xfm; | 1450 | struct transform *xfm = pipe_ctx->xfm; |
1451 | 1451 | ||
@@ -2321,7 +2321,7 @@ static void set_plane_config( | |||
2321 | } | 2321 | } |
2322 | 2322 | ||
2323 | static void dcn10_config_stereo_parameters( | 2323 | static void dcn10_config_stereo_parameters( |
2324 | struct dc_stream *stream, struct crtc_stereo_flags *flags) | 2324 | struct dc_stream_state *stream, struct crtc_stereo_flags *flags) |
2325 | { | 2325 | { |
2326 | enum view_3d_format view_format = stream->view_format; | 2326 | enum view_3d_format view_format = stream->view_format; |
2327 | enum dc_timing_3d_format timing_3d_format =\ | 2327 | enum dc_timing_3d_format timing_3d_format =\ |
@@ -2360,7 +2360,7 @@ static void dcn10_config_stereo_parameters( | |||
2360 | static void dcn10_setup_stereo(struct pipe_ctx *pipe_ctx, struct core_dc *dc) | 2360 | static void dcn10_setup_stereo(struct pipe_ctx *pipe_ctx, struct core_dc *dc) |
2361 | { | 2361 | { |
2362 | struct crtc_stereo_flags flags = { 0 }; | 2362 | struct crtc_stereo_flags flags = { 0 }; |
2363 | struct dc_stream *stream = pipe_ctx->stream; | 2363 | struct dc_stream_state *stream = pipe_ctx->stream; |
2364 | 2364 | ||
2365 | dcn10_config_stereo_parameters(stream, &flags); | 2365 | dcn10_config_stereo_parameters(stream, &flags); |
2366 | 2366 | ||
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c index 9d44f42cbf96..5a9fcbc22d04 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | |||
@@ -774,7 +774,7 @@ static void get_pixel_clock_parameters( | |||
774 | const struct pipe_ctx *pipe_ctx, | 774 | const struct pipe_ctx *pipe_ctx, |
775 | struct pixel_clk_params *pixel_clk_params) | 775 | struct pixel_clk_params *pixel_clk_params) |
776 | { | 776 | { |
777 | const struct dc_stream *stream = pipe_ctx->stream; | 777 | const struct dc_stream_state *stream = pipe_ctx->stream; |
778 | pixel_clk_params->requested_pix_clk = stream->timing.pix_clk_khz; | 778 | pixel_clk_params->requested_pix_clk = stream->timing.pix_clk_khz; |
779 | pixel_clk_params->encoder_object_id = stream->sink->link->link_enc->id; | 779 | pixel_clk_params->encoder_object_id = stream->sink->link->link_enc->id; |
780 | pixel_clk_params->signal_type = pipe_ctx->stream->signal; | 780 | pixel_clk_params->signal_type = pipe_ctx->stream->signal; |
@@ -796,7 +796,7 @@ static void get_pixel_clock_parameters( | |||
796 | 796 | ||
797 | } | 797 | } |
798 | 798 | ||
799 | static void build_clamping_params(struct dc_stream *stream) | 799 | static void build_clamping_params(struct dc_stream_state *stream) |
800 | { | 800 | { |
801 | stream->clamping.clamping_level = CLAMPING_FULL_RANGE; | 801 | stream->clamping.clamping_level = CLAMPING_FULL_RANGE; |
802 | stream->clamping.c_depth = stream->timing.display_color_depth; | 802 | stream->clamping.c_depth = stream->timing.display_color_depth; |
@@ -831,7 +831,7 @@ static enum dc_status build_mapped_resource( | |||
831 | uint8_t i, j; | 831 | uint8_t i, j; |
832 | 832 | ||
833 | for (i = 0; i < context->stream_count; i++) { | 833 | for (i = 0; i < context->stream_count; i++) { |
834 | struct dc_stream *stream = context->streams[i]; | 834 | struct dc_stream_state *stream = context->streams[i]; |
835 | 835 | ||
836 | if (old_context && resource_is_stream_unchanged(old_context, stream)) { | 836 | if (old_context && resource_is_stream_unchanged(old_context, stream)) { |
837 | if (stream != NULL && old_context->streams[i] != NULL) { | 837 | if (stream != NULL && old_context->streams[i] != NULL) { |
@@ -916,7 +916,7 @@ enum dc_status dcn10_validate_with_context( | |||
916 | 916 | ||
917 | enum dc_status dcn10_validate_guaranteed( | 917 | enum dc_status dcn10_validate_guaranteed( |
918 | const struct core_dc *dc, | 918 | const struct core_dc *dc, |
919 | struct dc_stream *dc_stream, | 919 | struct dc_stream_state *dc_stream, |
920 | struct validate_context *context) | 920 | struct validate_context *context) |
921 | { | 921 | { |
922 | enum dc_status result = DC_ERROR_UNEXPECTED; | 922 | enum dc_status result = DC_ERROR_UNEXPECTED; |
@@ -947,7 +947,7 @@ enum dc_status dcn10_validate_guaranteed( | |||
947 | static struct pipe_ctx *dcn10_acquire_idle_pipe_for_layer( | 947 | static struct pipe_ctx *dcn10_acquire_idle_pipe_for_layer( |
948 | struct validate_context *context, | 948 | struct validate_context *context, |
949 | const struct resource_pool *pool, | 949 | const struct resource_pool *pool, |
950 | struct dc_stream *stream) | 950 | struct dc_stream_state *stream) |
951 | { | 951 | { |
952 | struct resource_context *res_ctx = &context->res_ctx; | 952 | struct resource_context *res_ctx = &context->res_ctx; |
953 | struct pipe_ctx *head_pipe = resource_get_head_pipe_for_stream(res_ctx, stream); | 953 | struct pipe_ctx *head_pipe = resource_get_head_pipe_for_stream(res_ctx, stream); |
diff --git a/drivers/gpu/drm/amd/display/dc/dm_helpers.h b/drivers/gpu/drm/amd/display/dc/dm_helpers.h index e8bd501feb48..39010325cef9 100644 --- a/drivers/gpu/drm/amd/display/dc/dm_helpers.h +++ b/drivers/gpu/drm/amd/display/dc/dm_helpers.h | |||
@@ -45,7 +45,7 @@ enum dc_edid_status dm_helpers_parse_edid_caps( | |||
45 | */ | 45 | */ |
46 | bool dm_helpers_dp_mst_write_payload_allocation_table( | 46 | bool dm_helpers_dp_mst_write_payload_allocation_table( |
47 | struct dc_context *ctx, | 47 | struct dc_context *ctx, |
48 | const struct dc_stream *stream, | 48 | const struct dc_stream_state *stream, |
49 | struct dp_mst_stream_allocation_table *proposed_table, | 49 | struct dp_mst_stream_allocation_table *proposed_table, |
50 | bool enable); | 50 | bool enable); |
51 | 51 | ||
@@ -54,13 +54,13 @@ bool dm_helpers_dp_mst_write_payload_allocation_table( | |||
54 | */ | 54 | */ |
55 | bool dm_helpers_dp_mst_poll_for_allocation_change_trigger( | 55 | bool dm_helpers_dp_mst_poll_for_allocation_change_trigger( |
56 | struct dc_context *ctx, | 56 | struct dc_context *ctx, |
57 | const struct dc_stream *stream); | 57 | const struct dc_stream_state *stream); |
58 | /* | 58 | /* |
59 | * Sends ALLOCATE_PAYLOAD message. | 59 | * Sends ALLOCATE_PAYLOAD message. |
60 | */ | 60 | */ |
61 | bool dm_helpers_dp_mst_send_payload_allocation( | 61 | bool dm_helpers_dp_mst_send_payload_allocation( |
62 | struct dc_context *ctx, | 62 | struct dc_context *ctx, |
63 | const struct dc_stream *stream, | 63 | const struct dc_stream_state *stream, |
64 | bool enable); | 64 | bool enable); |
65 | 65 | ||
66 | bool dm_helpers_dp_mst_start_top_mgr( | 66 | bool dm_helpers_dp_mst_start_top_mgr( |
diff --git a/drivers/gpu/drm/amd/display/dc/inc/core_types.h b/drivers/gpu/drm/amd/display/dc/inc/core_types.h index 44a87c9427f7..d5c0f9e34ce9 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/core_types.h +++ b/drivers/gpu/drm/amd/display/dc/inc/core_types.h | |||
@@ -60,7 +60,7 @@ struct dc_link *link_create(const struct link_init_data *init_params); | |||
60 | void link_destroy(struct dc_link **link); | 60 | void link_destroy(struct dc_link **link); |
61 | 61 | ||
62 | enum dc_status dc_link_validate_mode_timing( | 62 | enum dc_status dc_link_validate_mode_timing( |
63 | const struct dc_stream *stream, | 63 | const struct dc_stream_state *stream, |
64 | struct dc_link *link, | 64 | struct dc_link *link, |
65 | const struct dc_crtc_timing *timing); | 65 | const struct dc_crtc_timing *timing); |
66 | 66 | ||
@@ -92,7 +92,7 @@ struct resource_funcs { | |||
92 | 92 | ||
93 | enum dc_status (*validate_guaranteed)( | 93 | enum dc_status (*validate_guaranteed)( |
94 | const struct core_dc *dc, | 94 | const struct core_dc *dc, |
95 | struct dc_stream *stream, | 95 | struct dc_stream_state *stream, |
96 | struct validate_context *context); | 96 | struct validate_context *context); |
97 | 97 | ||
98 | bool (*validate_bandwidth)( | 98 | bool (*validate_bandwidth)( |
@@ -102,8 +102,7 @@ struct resource_funcs { | |||
102 | struct pipe_ctx *(*acquire_idle_pipe_for_layer)( | 102 | struct pipe_ctx *(*acquire_idle_pipe_for_layer)( |
103 | struct validate_context *context, | 103 | struct validate_context *context, |
104 | const struct resource_pool *pool, | 104 | const struct resource_pool *pool, |
105 | struct dc_stream *stream); | 105 | struct dc_stream_state *stream); |
106 | |||
107 | enum dc_status (*validate_plane)(const struct dc_plane_state *plane_state); | 106 | enum dc_status (*validate_plane)(const struct dc_plane_state *plane_state); |
108 | }; | 107 | }; |
109 | 108 | ||
@@ -155,7 +154,7 @@ struct resource_pool { | |||
155 | 154 | ||
156 | struct pipe_ctx { | 155 | struct pipe_ctx { |
157 | struct dc_plane_state *surface; | 156 | struct dc_plane_state *surface; |
158 | struct dc_stream *stream; | 157 | struct dc_stream_state *stream; |
159 | 158 | ||
160 | struct mem_input *mi; | 159 | struct mem_input *mi; |
161 | struct input_pixel_processor *ipp; | 160 | struct input_pixel_processor *ipp; |
@@ -240,7 +239,7 @@ union bw_context { | |||
240 | }; | 239 | }; |
241 | 240 | ||
242 | struct validate_context { | 241 | struct validate_context { |
243 | struct dc_stream *streams[MAX_PIPES]; | 242 | struct dc_stream_state *streams[MAX_PIPES]; |
244 | struct dc_stream_status stream_status[MAX_PIPES]; | 243 | struct dc_stream_status stream_status[MAX_PIPES]; |
245 | uint8_t stream_count; | 244 | uint8_t stream_count; |
246 | 245 | ||
diff --git a/drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h b/drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h index 1a4a605cb449..7168dcc70ae7 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h +++ b/drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | |||
@@ -30,7 +30,7 @@ | |||
30 | #define LINK_TRAINING_RETRY_DELAY 50 /* ms */ | 30 | #define LINK_TRAINING_RETRY_DELAY 50 /* ms */ |
31 | 31 | ||
32 | struct dc_link; | 32 | struct dc_link; |
33 | struct dc_stream; | 33 | struct dc_stream_state; |
34 | struct dc_link_settings; | 34 | struct dc_link_settings; |
35 | 35 | ||
36 | bool dp_hbr_verify_link_cap( | 36 | bool dp_hbr_verify_link_cap( |
@@ -50,7 +50,7 @@ bool dp_validate_mode_timing( | |||
50 | const struct dc_crtc_timing *timing); | 50 | const struct dc_crtc_timing *timing); |
51 | 51 | ||
52 | void decide_link_settings( | 52 | void decide_link_settings( |
53 | struct dc_stream *stream, | 53 | struct dc_stream_state *stream, |
54 | struct dc_link_settings *link_setting); | 54 | struct dc_link_settings *link_setting); |
55 | 55 | ||
56 | bool perform_link_training_with_retries( | 56 | bool perform_link_training_with_retries( |
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h b/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h index 28fb02fb677e..38e4070806cb 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h | |||
@@ -93,7 +93,7 @@ struct link_encoder { | |||
93 | 93 | ||
94 | struct link_encoder_funcs { | 94 | struct link_encoder_funcs { |
95 | bool (*validate_output_with_stream)( | 95 | bool (*validate_output_with_stream)( |
96 | struct link_encoder *enc, const struct dc_stream *stream); | 96 | struct link_encoder *enc, const struct dc_stream_state *stream); |
97 | void (*hw_init)(struct link_encoder *enc); | 97 | void (*hw_init)(struct link_encoder *enc); |
98 | void (*setup)(struct link_encoder *enc, | 98 | void (*setup)(struct link_encoder *enc, |
99 | enum signal_type signal); | 99 | enum signal_type signal); |
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h index c529ddd2e0d5..7e03f8d45b2b 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | |||
@@ -92,7 +92,7 @@ struct hw_sequencer_funcs { | |||
92 | 92 | ||
93 | bool (*set_output_transfer_func)( | 93 | bool (*set_output_transfer_func)( |
94 | struct pipe_ctx *pipe_ctx, | 94 | struct pipe_ctx *pipe_ctx, |
95 | const struct dc_stream *stream); | 95 | const struct dc_stream_state *stream); |
96 | 96 | ||
97 | void (*power_down)(struct core_dc *dc); | 97 | void (*power_down)(struct core_dc *dc); |
98 | 98 | ||
diff --git a/drivers/gpu/drm/amd/display/dc/inc/resource.h b/drivers/gpu/drm/amd/display/dc/inc/resource.h index bfd7cfc86df0..aef1197cf749 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/resource.h +++ b/drivers/gpu/drm/amd/display/dc/inc/resource.h | |||
@@ -103,8 +103,8 @@ void resource_reference_clock_source( | |||
103 | struct clock_source *clock_source); | 103 | struct clock_source *clock_source); |
104 | 104 | ||
105 | bool resource_are_streams_timing_synchronizable( | 105 | bool resource_are_streams_timing_synchronizable( |
106 | struct dc_stream *stream1, | 106 | struct dc_stream_state *stream1, |
107 | struct dc_stream *stream2); | 107 | struct dc_stream_state *stream2); |
108 | 108 | ||
109 | struct clock_source *resource_find_used_clk_src_for_sharing( | 109 | struct clock_source *resource_find_used_clk_src_for_sharing( |
110 | struct resource_context *res_ctx, | 110 | struct resource_context *res_ctx, |
@@ -116,12 +116,12 @@ struct clock_source *dc_resource_find_first_free_pll( | |||
116 | 116 | ||
117 | struct pipe_ctx *resource_get_head_pipe_for_stream( | 117 | struct pipe_ctx *resource_get_head_pipe_for_stream( |
118 | struct resource_context *res_ctx, | 118 | struct resource_context *res_ctx, |
119 | struct dc_stream *stream); | 119 | struct dc_stream_state *stream); |
120 | 120 | ||
121 | bool resource_attach_surfaces_to_context( | 121 | bool resource_attach_surfaces_to_context( |
122 | struct dc_plane_state *const *surfaces, | 122 | struct dc_plane_state *const *surfaces, |
123 | int surface_count, | 123 | int surface_count, |
124 | struct dc_stream *dc_stream, | 124 | struct dc_stream_state *dc_stream, |
125 | struct validate_context *context, | 125 | struct validate_context *context, |
126 | const struct resource_pool *pool); | 126 | const struct resource_pool *pool); |
127 | 127 | ||
@@ -130,8 +130,7 @@ struct pipe_ctx *find_idle_secondary_pipe( | |||
130 | const struct resource_pool *pool); | 130 | const struct resource_pool *pool); |
131 | 131 | ||
132 | bool resource_is_stream_unchanged( | 132 | bool resource_is_stream_unchanged( |
133 | struct validate_context *old_context, struct dc_stream *stream); | 133 | struct validate_context *old_context, struct dc_stream_state *stream); |
134 | |||
135 | 134 | ||
136 | bool resource_validate_attach_surfaces( | 135 | bool resource_validate_attach_surfaces( |
137 | const struct dc_validation_set set[], | 136 | const struct dc_validation_set set[], |
@@ -162,7 +161,7 @@ bool pipe_need_reprogram( | |||
162 | struct pipe_ctx *pipe_ctx_old, | 161 | struct pipe_ctx *pipe_ctx_old, |
163 | struct pipe_ctx *pipe_ctx); | 162 | struct pipe_ctx *pipe_ctx); |
164 | 163 | ||
165 | void resource_build_bit_depth_reduction_params(struct dc_stream *stream, | 164 | void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream, |
166 | struct bit_depth_reduction_params *fmt_bit_depth); | 165 | struct bit_depth_reduction_params *fmt_bit_depth); |
167 | 166 | ||
168 | #endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */ | 167 | #endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */ |
diff --git a/drivers/gpu/drm/amd/display/dc/virtual/virtual_link_encoder.c b/drivers/gpu/drm/amd/display/dc/virtual/virtual_link_encoder.c index dd024c99fb7e..57b5a3babdf8 100644 --- a/drivers/gpu/drm/amd/display/dc/virtual/virtual_link_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/virtual/virtual_link_encoder.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | static bool virtual_link_encoder_validate_output_with_stream( | 31 | static bool virtual_link_encoder_validate_output_with_stream( |
32 | struct link_encoder *enc, | 32 | struct link_encoder *enc, |
33 | const struct dc_stream *stream) { return true; } | 33 | const struct dc_stream_state *stream) { return true; } |
34 | 34 | ||
35 | static void virtual_link_encoder_hw_init(struct link_encoder *enc) {} | 35 | static void virtual_link_encoder_hw_init(struct link_encoder *enc) {} |
36 | 36 | ||
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index 358f8a855a59..f0a3e4332a09 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c | |||
@@ -111,7 +111,7 @@ struct freesync_state { | |||
111 | }; | 111 | }; |
112 | 112 | ||
113 | struct freesync_entity { | 113 | struct freesync_entity { |
114 | struct dc_stream *stream; | 114 | struct dc_stream_state *stream; |
115 | struct mod_freesync_caps *caps; | 115 | struct mod_freesync_caps *caps; |
116 | struct freesync_state state; | 116 | struct freesync_state state; |
117 | struct mod_freesync_user_enable user_enable; | 117 | struct mod_freesync_user_enable user_enable; |
@@ -229,7 +229,7 @@ void mod_freesync_destroy(struct mod_freesync *mod_freesync) | |||
229 | * on the core_freesync->map and returns the corresponding index | 229 | * on the core_freesync->map and returns the corresponding index |
230 | */ | 230 | */ |
231 | static unsigned int map_index_from_stream(struct core_freesync *core_freesync, | 231 | static unsigned int map_index_from_stream(struct core_freesync *core_freesync, |
232 | struct dc_stream *stream) | 232 | struct dc_stream_state *stream) |
233 | { | 233 | { |
234 | unsigned int index = 0; | 234 | unsigned int index = 0; |
235 | 235 | ||
@@ -244,7 +244,7 @@ static unsigned int map_index_from_stream(struct core_freesync *core_freesync, | |||
244 | } | 244 | } |
245 | 245 | ||
246 | bool mod_freesync_add_stream(struct mod_freesync *mod_freesync, | 246 | bool mod_freesync_add_stream(struct mod_freesync *mod_freesync, |
247 | struct dc_stream *stream, struct mod_freesync_caps *caps) | 247 | struct dc_stream_state *stream, struct mod_freesync_caps *caps) |
248 | { | 248 | { |
249 | struct core_dc *core_dc = NULL; | 249 | struct core_dc *core_dc = NULL; |
250 | struct core_freesync *core_freesync = NULL; | 250 | struct core_freesync *core_freesync = NULL; |
@@ -322,7 +322,7 @@ bool mod_freesync_add_stream(struct mod_freesync *mod_freesync, | |||
322 | } | 322 | } |
323 | 323 | ||
324 | bool mod_freesync_remove_stream(struct mod_freesync *mod_freesync, | 324 | bool mod_freesync_remove_stream(struct mod_freesync *mod_freesync, |
325 | struct dc_stream *stream) | 325 | struct dc_stream_state *stream) |
326 | { | 326 | { |
327 | int i = 0; | 327 | int i = 0; |
328 | struct core_freesync *core_freesync = NULL; | 328 | struct core_freesync *core_freesync = NULL; |
@@ -344,7 +344,7 @@ bool mod_freesync_remove_stream(struct mod_freesync *mod_freesync, | |||
344 | } | 344 | } |
345 | 345 | ||
346 | static void update_stream_freesync_context(struct core_freesync *core_freesync, | 346 | static void update_stream_freesync_context(struct core_freesync *core_freesync, |
347 | struct dc_stream *stream) | 347 | struct dc_stream_state *stream) |
348 | { | 348 | { |
349 | unsigned int index; | 349 | unsigned int index; |
350 | struct freesync_context *ctx; | 350 | struct freesync_context *ctx; |
@@ -368,7 +368,7 @@ static void update_stream_freesync_context(struct core_freesync *core_freesync, | |||
368 | } | 368 | } |
369 | 369 | ||
370 | static void update_stream(struct core_freesync *core_freesync, | 370 | static void update_stream(struct core_freesync *core_freesync, |
371 | struct dc_stream *stream) | 371 | struct dc_stream_state *stream) |
372 | { | 372 | { |
373 | unsigned int index = map_index_from_stream(core_freesync, stream); | 373 | unsigned int index = map_index_from_stream(core_freesync, stream); |
374 | if (core_freesync->map[index].caps->supported) { | 374 | if (core_freesync->map[index].caps->supported) { |
@@ -378,7 +378,7 @@ static void update_stream(struct core_freesync *core_freesync, | |||
378 | } | 378 | } |
379 | 379 | ||
380 | static void calc_freesync_range(struct core_freesync *core_freesync, | 380 | static void calc_freesync_range(struct core_freesync *core_freesync, |
381 | struct dc_stream *stream, | 381 | struct dc_stream_state *stream, |
382 | struct freesync_state *state, | 382 | struct freesync_state *state, |
383 | unsigned int min_refresh_in_uhz, | 383 | unsigned int min_refresh_in_uhz, |
384 | unsigned int max_refresh_in_uhz) | 384 | unsigned int max_refresh_in_uhz) |
@@ -452,7 +452,7 @@ static void calc_freesync_range(struct core_freesync *core_freesync, | |||
452 | min_frame_duration_in_ns) / 2000; | 452 | min_frame_duration_in_ns) / 2000; |
453 | } | 453 | } |
454 | 454 | ||
455 | static void calc_v_total_from_duration(struct dc_stream *stream, | 455 | static void calc_v_total_from_duration(struct dc_stream_state *stream, |
456 | unsigned int duration_in_ns, int *v_total_nominal) | 456 | unsigned int duration_in_ns, int *v_total_nominal) |
457 | { | 457 | { |
458 | *v_total_nominal = div64_u64(div64_u64(((unsigned long long)( | 458 | *v_total_nominal = div64_u64(div64_u64(((unsigned long long)( |
@@ -461,7 +461,7 @@ static void calc_v_total_from_duration(struct dc_stream *stream, | |||
461 | } | 461 | } |
462 | 462 | ||
463 | static void calc_v_total_for_static_ramp(struct core_freesync *core_freesync, | 463 | static void calc_v_total_for_static_ramp(struct core_freesync *core_freesync, |
464 | struct dc_stream *stream, | 464 | struct dc_stream_state *stream, |
465 | unsigned int index, int *v_total) | 465 | unsigned int index, int *v_total) |
466 | { | 466 | { |
467 | unsigned int frame_duration = 0; | 467 | unsigned int frame_duration = 0; |
@@ -557,7 +557,7 @@ static void reset_freesync_state_variables(struct freesync_state* state) | |||
557 | * Sets freesync mode on a stream depending on current freesync state. | 557 | * Sets freesync mode on a stream depending on current freesync state. |
558 | */ | 558 | */ |
559 | static bool set_freesync_on_streams(struct core_freesync *core_freesync, | 559 | static bool set_freesync_on_streams(struct core_freesync *core_freesync, |
560 | struct dc_stream **streams, int num_streams) | 560 | struct dc_stream_state **streams, int num_streams) |
561 | { | 561 | { |
562 | int v_total_nominal = 0, v_total_min = 0, v_total_max = 0; | 562 | int v_total_nominal = 0, v_total_min = 0, v_total_max = 0; |
563 | unsigned int stream_idx, map_index = 0; | 563 | unsigned int stream_idx, map_index = 0; |
@@ -729,7 +729,7 @@ static void set_static_ramp_variables(struct core_freesync *core_freesync, | |||
729 | } | 729 | } |
730 | 730 | ||
731 | void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync, | 731 | void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync, |
732 | struct dc_stream **streams, int num_streams) | 732 | struct dc_stream_state **streams, int num_streams) |
733 | { | 733 | { |
734 | unsigned int index, v_total, inserted_frame_v_total = 0; | 734 | unsigned int index, v_total, inserted_frame_v_total = 0; |
735 | unsigned int min_frame_duration_in_ns, vmax, vmin = 0; | 735 | unsigned int min_frame_duration_in_ns, vmax, vmin = 0; |
@@ -839,7 +839,7 @@ void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync, | |||
839 | } | 839 | } |
840 | 840 | ||
841 | void mod_freesync_update_state(struct mod_freesync *mod_freesync, | 841 | void mod_freesync_update_state(struct mod_freesync *mod_freesync, |
842 | struct dc_stream **streams, int num_streams, | 842 | struct dc_stream_state **streams, int num_streams, |
843 | struct mod_freesync_params *freesync_params) | 843 | struct mod_freesync_params *freesync_params) |
844 | { | 844 | { |
845 | bool freesync_program_required = false; | 845 | bool freesync_program_required = false; |
@@ -929,7 +929,7 @@ void mod_freesync_update_state(struct mod_freesync *mod_freesync, | |||
929 | 929 | ||
930 | 930 | ||
931 | bool mod_freesync_get_state(struct mod_freesync *mod_freesync, | 931 | bool mod_freesync_get_state(struct mod_freesync *mod_freesync, |
932 | struct dc_stream *stream, | 932 | struct dc_stream_state *stream, |
933 | struct mod_freesync_params *freesync_params) | 933 | struct mod_freesync_params *freesync_params) |
934 | { | 934 | { |
935 | unsigned int index = 0; | 935 | unsigned int index = 0; |
@@ -965,7 +965,7 @@ bool mod_freesync_get_state(struct mod_freesync *mod_freesync, | |||
965 | } | 965 | } |
966 | 966 | ||
967 | bool mod_freesync_set_user_enable(struct mod_freesync *mod_freesync, | 967 | bool mod_freesync_set_user_enable(struct mod_freesync *mod_freesync, |
968 | struct dc_stream **streams, int num_streams, | 968 | struct dc_stream_state **streams, int num_streams, |
969 | struct mod_freesync_user_enable *user_enable) | 969 | struct mod_freesync_user_enable *user_enable) |
970 | { | 970 | { |
971 | unsigned int stream_index, map_index; | 971 | unsigned int stream_index, map_index; |
@@ -1017,7 +1017,7 @@ bool mod_freesync_set_user_enable(struct mod_freesync *mod_freesync, | |||
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | bool mod_freesync_get_user_enable(struct mod_freesync *mod_freesync, | 1019 | bool mod_freesync_get_user_enable(struct mod_freesync *mod_freesync, |
1020 | struct dc_stream *stream, | 1020 | struct dc_stream_state *stream, |
1021 | struct mod_freesync_user_enable *user_enable) | 1021 | struct mod_freesync_user_enable *user_enable) |
1022 | { | 1022 | { |
1023 | unsigned int index = 0; | 1023 | unsigned int index = 0; |
@@ -1035,7 +1035,7 @@ bool mod_freesync_get_user_enable(struct mod_freesync *mod_freesync, | |||
1035 | } | 1035 | } |
1036 | 1036 | ||
1037 | bool mod_freesync_get_static_ramp_active(struct mod_freesync *mod_freesync, | 1037 | bool mod_freesync_get_static_ramp_active(struct mod_freesync *mod_freesync, |
1038 | struct dc_stream *stream, | 1038 | struct dc_stream_state *stream, |
1039 | bool *is_ramp_active) | 1039 | bool *is_ramp_active) |
1040 | { | 1040 | { |
1041 | unsigned int index = 0; | 1041 | unsigned int index = 0; |
@@ -1054,7 +1054,7 @@ bool mod_freesync_get_static_ramp_active(struct mod_freesync *mod_freesync, | |||
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | bool mod_freesync_override_min_max(struct mod_freesync *mod_freesync, | 1056 | bool mod_freesync_override_min_max(struct mod_freesync *mod_freesync, |
1057 | struct dc_stream *streams, | 1057 | struct dc_stream_state *streams, |
1058 | unsigned int min_refresh, | 1058 | unsigned int min_refresh, |
1059 | unsigned int max_refresh, | 1059 | unsigned int max_refresh, |
1060 | struct mod_freesync_caps *caps) | 1060 | struct mod_freesync_caps *caps) |
@@ -1107,7 +1107,7 @@ bool mod_freesync_override_min_max(struct mod_freesync *mod_freesync, | |||
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | bool mod_freesync_get_min_max(struct mod_freesync *mod_freesync, | 1109 | bool mod_freesync_get_min_max(struct mod_freesync *mod_freesync, |
1110 | struct dc_stream *stream, | 1110 | struct dc_stream_state *stream, |
1111 | unsigned int *min_refresh, | 1111 | unsigned int *min_refresh, |
1112 | unsigned int *max_refresh) | 1112 | unsigned int *max_refresh) |
1113 | { | 1113 | { |
@@ -1129,7 +1129,7 @@ bool mod_freesync_get_min_max(struct mod_freesync *mod_freesync, | |||
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | bool mod_freesync_get_vmin_vmax(struct mod_freesync *mod_freesync, | 1131 | bool mod_freesync_get_vmin_vmax(struct mod_freesync *mod_freesync, |
1132 | struct dc_stream *stream, | 1132 | struct dc_stream_state *stream, |
1133 | unsigned int *vmin, | 1133 | unsigned int *vmin, |
1134 | unsigned int *vmax) | 1134 | unsigned int *vmax) |
1135 | { | 1135 | { |
@@ -1151,7 +1151,7 @@ bool mod_freesync_get_vmin_vmax(struct mod_freesync *mod_freesync, | |||
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | bool mod_freesync_get_v_position(struct mod_freesync *mod_freesync, | 1153 | bool mod_freesync_get_v_position(struct mod_freesync *mod_freesync, |
1154 | struct dc_stream *stream, | 1154 | struct dc_stream_state *stream, |
1155 | unsigned int *nom_v_pos, | 1155 | unsigned int *nom_v_pos, |
1156 | unsigned int *v_pos) | 1156 | unsigned int *v_pos) |
1157 | { | 1157 | { |
@@ -1179,7 +1179,7 @@ bool mod_freesync_get_v_position(struct mod_freesync *mod_freesync, | |||
1179 | } | 1179 | } |
1180 | 1180 | ||
1181 | void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync, | 1181 | void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync, |
1182 | struct dc_stream **streams, int num_streams) | 1182 | struct dc_stream_state **streams, int num_streams) |
1183 | { | 1183 | { |
1184 | unsigned int stream_index, map_index; | 1184 | unsigned int stream_index, map_index; |
1185 | struct freesync_state *state; | 1185 | struct freesync_state *state; |
@@ -1239,7 +1239,7 @@ void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync, | |||
1239 | * is required, depending on the times calculated | 1239 | * is required, depending on the times calculated |
1240 | */ | 1240 | */ |
1241 | static void update_timestamps(struct core_freesync *core_freesync, | 1241 | static void update_timestamps(struct core_freesync *core_freesync, |
1242 | const struct dc_stream *stream, unsigned int map_index, | 1242 | const struct dc_stream_state *stream, unsigned int map_index, |
1243 | unsigned int last_render_time_in_us) | 1243 | unsigned int last_render_time_in_us) |
1244 | { | 1244 | { |
1245 | struct freesync_state *state = &core_freesync->map[map_index].state; | 1245 | struct freesync_state *state = &core_freesync->map[map_index].state; |
@@ -1304,7 +1304,7 @@ static void update_timestamps(struct core_freesync *core_freesync, | |||
1304 | } | 1304 | } |
1305 | 1305 | ||
1306 | static void apply_below_the_range(struct core_freesync *core_freesync, | 1306 | static void apply_below_the_range(struct core_freesync *core_freesync, |
1307 | struct dc_stream *stream, unsigned int map_index, | 1307 | struct dc_stream_state *stream, unsigned int map_index, |
1308 | unsigned int last_render_time_in_us) | 1308 | unsigned int last_render_time_in_us) |
1309 | { | 1309 | { |
1310 | unsigned int inserted_frame_duration_in_us = 0; | 1310 | unsigned int inserted_frame_duration_in_us = 0; |
@@ -1403,7 +1403,7 @@ static void apply_below_the_range(struct core_freesync *core_freesync, | |||
1403 | } | 1403 | } |
1404 | 1404 | ||
1405 | static void apply_fixed_refresh(struct core_freesync *core_freesync, | 1405 | static void apply_fixed_refresh(struct core_freesync *core_freesync, |
1406 | struct dc_stream *stream, unsigned int map_index) | 1406 | struct dc_stream_state *stream, unsigned int map_index) |
1407 | { | 1407 | { |
1408 | unsigned int vmin = 0, vmax = 0; | 1408 | unsigned int vmin = 0, vmax = 0; |
1409 | struct freesync_state *state = &core_freesync->map[map_index].state; | 1409 | struct freesync_state *state = &core_freesync->map[map_index].state; |
@@ -1434,7 +1434,7 @@ static void apply_fixed_refresh(struct core_freesync *core_freesync, | |||
1434 | } | 1434 | } |
1435 | 1435 | ||
1436 | void mod_freesync_pre_update_plane_addresses(struct mod_freesync *mod_freesync, | 1436 | void mod_freesync_pre_update_plane_addresses(struct mod_freesync *mod_freesync, |
1437 | struct dc_stream **streams, int num_streams, | 1437 | struct dc_stream_state **streams, int num_streams, |
1438 | unsigned int curr_time_stamp_in_us) | 1438 | unsigned int curr_time_stamp_in_us) |
1439 | { | 1439 | { |
1440 | unsigned int stream_index, map_index, last_render_time_in_us = 0; | 1440 | unsigned int stream_index, map_index, last_render_time_in_us = 0; |
diff --git a/drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h b/drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h index 2b9d45100bdd..84b53425f2c8 100644 --- a/drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h +++ b/drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h | |||
@@ -101,67 +101,67 @@ struct mod_freesync_params { | |||
101 | * Add stream to be tracked by module | 101 | * Add stream to be tracked by module |
102 | */ | 102 | */ |
103 | bool mod_freesync_add_stream(struct mod_freesync *mod_freesync, | 103 | bool mod_freesync_add_stream(struct mod_freesync *mod_freesync, |
104 | struct dc_stream *stream, struct mod_freesync_caps *caps); | 104 | struct dc_stream_state *stream, struct mod_freesync_caps *caps); |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Remove stream to be tracked by module | 107 | * Remove stream to be tracked by module |
108 | */ | 108 | */ |
109 | bool mod_freesync_remove_stream(struct mod_freesync *mod_freesync, | 109 | bool mod_freesync_remove_stream(struct mod_freesync *mod_freesync, |
110 | struct dc_stream *stream); | 110 | struct dc_stream_state *stream); |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * Update the freesync state flags for each display and program | 113 | * Update the freesync state flags for each display and program |
114 | * freesync accordingly | 114 | * freesync accordingly |
115 | */ | 115 | */ |
116 | void mod_freesync_update_state(struct mod_freesync *mod_freesync, | 116 | void mod_freesync_update_state(struct mod_freesync *mod_freesync, |
117 | struct dc_stream **streams, int num_streams, | 117 | struct dc_stream_state **streams, int num_streams, |
118 | struct mod_freesync_params *freesync_params); | 118 | struct mod_freesync_params *freesync_params); |
119 | 119 | ||
120 | bool mod_freesync_get_state(struct mod_freesync *mod_freesync, | 120 | bool mod_freesync_get_state(struct mod_freesync *mod_freesync, |
121 | struct dc_stream *stream, | 121 | struct dc_stream_state *stream, |
122 | struct mod_freesync_params *freesync_params); | 122 | struct mod_freesync_params *freesync_params); |
123 | 123 | ||
124 | bool mod_freesync_set_user_enable(struct mod_freesync *mod_freesync, | 124 | bool mod_freesync_set_user_enable(struct mod_freesync *mod_freesync, |
125 | struct dc_stream **streams, int num_streams, | 125 | struct dc_stream_state **streams, int num_streams, |
126 | struct mod_freesync_user_enable *user_enable); | 126 | struct mod_freesync_user_enable *user_enable); |
127 | 127 | ||
128 | bool mod_freesync_get_user_enable(struct mod_freesync *mod_freesync, | 128 | bool mod_freesync_get_user_enable(struct mod_freesync *mod_freesync, |
129 | struct dc_stream *stream, | 129 | struct dc_stream_state *stream, |
130 | struct mod_freesync_user_enable *user_enable); | 130 | struct mod_freesync_user_enable *user_enable); |
131 | 131 | ||
132 | bool mod_freesync_get_static_ramp_active(struct mod_freesync *mod_freesync, | 132 | bool mod_freesync_get_static_ramp_active(struct mod_freesync *mod_freesync, |
133 | struct dc_stream *stream, | 133 | struct dc_stream_state *stream, |
134 | bool *is_ramp_active); | 134 | bool *is_ramp_active); |
135 | 135 | ||
136 | bool mod_freesync_override_min_max(struct mod_freesync *mod_freesync, | 136 | bool mod_freesync_override_min_max(struct mod_freesync *mod_freesync, |
137 | struct dc_stream *streams, | 137 | struct dc_stream_state *streams, |
138 | unsigned int min_refresh, | 138 | unsigned int min_refresh, |
139 | unsigned int max_refresh, | 139 | unsigned int max_refresh, |
140 | struct mod_freesync_caps *caps); | 140 | struct mod_freesync_caps *caps); |
141 | 141 | ||
142 | bool mod_freesync_get_min_max(struct mod_freesync *mod_freesync, | 142 | bool mod_freesync_get_min_max(struct mod_freesync *mod_freesync, |
143 | struct dc_stream *stream, | 143 | struct dc_stream_state *stream, |
144 | unsigned int *min_refresh, | 144 | unsigned int *min_refresh, |
145 | unsigned int *max_refresh); | 145 | unsigned int *max_refresh); |
146 | 146 | ||
147 | bool mod_freesync_get_vmin_vmax(struct mod_freesync *mod_freesync, | 147 | bool mod_freesync_get_vmin_vmax(struct mod_freesync *mod_freesync, |
148 | struct dc_stream *stream, | 148 | struct dc_stream_state *stream, |
149 | unsigned int *vmin, | 149 | unsigned int *vmin, |
150 | unsigned int *vmax); | 150 | unsigned int *vmax); |
151 | 151 | ||
152 | bool mod_freesync_get_v_position(struct mod_freesync *mod_freesync, | 152 | bool mod_freesync_get_v_position(struct mod_freesync *mod_freesync, |
153 | struct dc_stream *stream, | 153 | struct dc_stream_state *stream, |
154 | unsigned int *nom_v_pos, | 154 | unsigned int *nom_v_pos, |
155 | unsigned int *v_pos); | 155 | unsigned int *v_pos); |
156 | 156 | ||
157 | void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync, | 157 | void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync, |
158 | struct dc_stream **streams, int num_streams); | 158 | struct dc_stream_state **streams, int num_streams); |
159 | 159 | ||
160 | void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync, | 160 | void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync, |
161 | struct dc_stream **streams, int num_streams); | 161 | struct dc_stream_state **streams, int num_streams); |
162 | 162 | ||
163 | void mod_freesync_pre_update_plane_addresses(struct mod_freesync *mod_freesync, | 163 | void mod_freesync_pre_update_plane_addresses(struct mod_freesync *mod_freesync, |
164 | struct dc_stream **streams, int num_streams, | 164 | struct dc_stream_state **streams, int num_streams, |
165 | unsigned int curr_time_stamp); | 165 | unsigned int curr_time_stamp); |
166 | 166 | ||
167 | #endif | 167 | #endif |