Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Line Buffer changes

DCN 3x increased Line buffer size for DCHUB latency hiding, from 4 lines
of 4K resolution lines to 5 lines of 4K resolution lines. All Line
Buffer can be used as extended memory for P State change latency hiding.
The maximum number of lines is increased to 32 lines. Finally,
LB_MEMORY_CONFIG_1 (LB memory piece 1) and LB_MEMORY _CONFIG_2 (LB
memory piece 2) are not affected, no change in size, only 3 pieces is
affected, i.e., when all 3 pieces are used in both LB_MEMORY_CONFIG_0
and LB_MEMORY_CONFIG_3 (for 4:2:0) modes.

Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Nevenko Stupar <Nevenko.Stupar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Nevenko Stupar and committed by
Alex Deucher
ba16b22d e0f65a85

+10 -19
+6 -1
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c
··· 217 217 const struct line_buffer_params *lb_params, 218 218 enum lb_memory_config mem_size_config) 219 219 { 220 + uint32_t max_partitions = 63; /* Currently hardcoded on all ASICs before DCN 3.2 */ 221 + 220 222 /* LB */ 221 223 if (dpp->base.caps->dscl_data_proc_format == DSCL_DATA_PRCESSING_FIXED_FORMAT) { 222 224 /* DSCL caps: pixel data processed in fixed format */ ··· 241 239 LB_DATA_FORMAT__ALPHA_EN, lb_params->alpha_en); /* Alpha enable */ 242 240 } 243 241 242 + if (dpp->base.caps->max_lb_partitions == 31) 243 + max_partitions = 31; 244 + 244 245 REG_SET_2(LB_MEMORY_CTRL, 0, 245 246 MEMORY_CONFIG, mem_size_config, 246 - LB_MAX_PARTITIONS, 63); 247 + LB_MAX_PARTITIONS, max_partitions); 247 248 } 248 249 249 250 static const uint16_t *dpp1_dscl_get_filter_coeffs_64p(int taps, struct fixed31_32 ratio)
-16
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
··· 383 383 int min_taps_y, min_taps_c; 384 384 enum lb_memory_config lb_config; 385 385 386 - /* Some ASICs does not support FP16 scaling, so we reject modes require this*/ 387 - if (scl_data->viewport.width != scl_data->h_active && 388 - scl_data->viewport.height != scl_data->v_active && 389 - dpp->caps->dscl_data_proc_format == DSCL_DATA_PRCESSING_FIXED_FORMAT && 390 - scl_data->format == PIXEL_FORMAT_FP16) 391 - return false; 392 - 393 386 if (scl_data->viewport.width > scl_data->h_active && 394 387 dpp->ctx->dc->debug.max_downscale_src_width != 0 && 395 388 scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width) ··· 1432 1439 dpp->tf_regs = tf_regs; 1433 1440 dpp->tf_shift = tf_shift; 1434 1441 dpp->tf_mask = tf_mask; 1435 - 1436 - dpp->lb_pixel_depth_supported = 1437 - LB_PIXEL_DEPTH_18BPP | 1438 - LB_PIXEL_DEPTH_24BPP | 1439 - LB_PIXEL_DEPTH_30BPP | 1440 - LB_PIXEL_DEPTH_36BPP; 1441 - 1442 - dpp->lb_bits_per_entry = LB_BITS_PER_ENTRY; 1443 - dpp->lb_memory_size = LB_TOTAL_NUMBER_OF_ENTRIES; /*0x1404*/ 1444 1442 1445 1443 return true; 1446 1444 }
+1 -2
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.h
··· 154 154 SRI(COLOR_KEYER_BLUE, CNVC_CFG, id), \ 155 155 SRI(CURSOR_CONTROL, CURSOR0_, id),\ 156 156 SRI(OBUF_MEM_PWR_CTRL, DSCL, id),\ 157 + SRI(DSCL_MEM_PWR_STATUS, DSCL, id), \ 157 158 SRI(DSCL_MEM_PWR_CTRL, DSCL, id) 158 159 159 160 #define DPP_REG_LIST_DCN30(id)\ ··· 164 163 SRI(CM_SHAPER_LUT_DATA, CM, id),\ 165 164 SRI(CM_MEM_PWR_CTRL2, CM, id), \ 166 165 SRI(CM_MEM_PWR_STATUS2, CM, id), \ 167 - SRI(DSCL_MEM_PWR_STATUS, DSCL, id), \ 168 - SRI(DSCL_MEM_PWR_CTRL, DSCL, id), \ 169 166 SRI(CM_BLNDGAM_RAMA_START_SLOPE_CNTL_B, CM, id),\ 170 167 SRI(CM_BLNDGAM_RAMA_START_SLOPE_CNTL_G, CM, id),\ 171 168 SRI(CM_BLNDGAM_RAMA_START_SLOPE_CNTL_R, CM, id),\
+3
drivers/gpu/drm/amd/display/dc/inc/hw/transform.h
··· 289 289 /* DSCL processing pixel data in fixed or float format */ 290 290 enum dscl_data_processing_format dscl_data_proc_format; 291 291 292 + /* max LB partitions */ 293 + unsigned int max_lb_partitions; 294 + 292 295 /* Calculates the number of partitions in the line buffer. 293 296 * The implementation of this function is overloaded for 294 297 * different versions of DSCL LB.