Skip to content

Commit ab2cf4c

Browse files
George Shenalexdeucher
authored andcommitted
drm/amd/display: Change null plane state swizzle mode to 4kb_s
[Why] During SetPathMode and UpdatePlanes, the plane state can be null. We default to linear swizzle mode when plane state is null. This resulted in bandwidth validation failing when trying to set 8K60 mode (which previously passed validation during rebuild timing list). [How] Change the default swizzle mode from linear to 4kb_s and update pitch accordingly. Signed-off-by: George Shen <[email protected]> Reviewed-by: Dmytro Laktyushkin <[email protected]> Acked-by: Aurabindo Pillai <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent bd42538 commit ab2cf4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ int dcn20_populate_dml_pipes_from_context(
22232223
if (!res_ctx->pipe_ctx[i].plane_state) {
22242224
pipes[pipe_cnt].pipe.src.is_hsplit = pipes[pipe_cnt].pipe.dest.odm_combine != dm_odm_combine_mode_disabled;
22252225
pipes[pipe_cnt].pipe.src.source_scan = dm_horz;
2226-
pipes[pipe_cnt].pipe.src.sw_mode = dm_sw_linear;
2226+
pipes[pipe_cnt].pipe.src.sw_mode = dm_sw_4kb_s;
22272227
pipes[pipe_cnt].pipe.src.macro_tile_size = dm_64k_tile;
22282228
pipes[pipe_cnt].pipe.src.viewport_width = timing->h_addressable;
22292229
if (pipes[pipe_cnt].pipe.src.viewport_width > 1920)
@@ -2235,7 +2235,7 @@ int dcn20_populate_dml_pipes_from_context(
22352235
pipes[pipe_cnt].pipe.src.surface_width_y = pipes[pipe_cnt].pipe.src.viewport_width;
22362236
pipes[pipe_cnt].pipe.src.surface_height_c = pipes[pipe_cnt].pipe.src.viewport_height;
22372237
pipes[pipe_cnt].pipe.src.surface_width_c = pipes[pipe_cnt].pipe.src.viewport_width;
2238-
pipes[pipe_cnt].pipe.src.data_pitch = ((pipes[pipe_cnt].pipe.src.viewport_width + 63) / 64) * 64; /* linear sw only */
2238+
pipes[pipe_cnt].pipe.src.data_pitch = ((pipes[pipe_cnt].pipe.src.viewport_width + 255) / 256) * 256;
22392239
pipes[pipe_cnt].pipe.src.source_format = dm_444_32;
22402240
pipes[pipe_cnt].pipe.dest.recout_width = pipes[pipe_cnt].pipe.src.viewport_width; /*vp_width/hratio*/
22412241
pipes[pipe_cnt].pipe.dest.recout_height = pipes[pipe_cnt].pipe.src.viewport_height; /*vp_height/vratio*/

0 commit comments

Comments
 (0)