Skip to content

Commit 0f984c9

Browse files
Nevenko Stuparalexdeucher
authored andcommitted
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 <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Nevenko Stupar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6580b28 commit 0f984c9

File tree

4 files changed

+10
-19
lines changed

4 files changed

+10
-19
lines changed

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ static void dpp1_dscl_set_lb(
217217
const struct line_buffer_params *lb_params,
218218
enum lb_memory_config mem_size_config)
219219
{
220+
uint32_t max_partitions = 63; /* Currently hardcoded on all ASICs before DCN 3.2 */
221+
220222
/* LB */
221223
if (dpp->base.caps->dscl_data_proc_format == DSCL_DATA_PRCESSING_FIXED_FORMAT) {
222224
/* DSCL caps: pixel data processed in fixed format */
@@ -239,9 +241,12 @@ static void dpp1_dscl_set_lb(
239241
LB_DATA_FORMAT__ALPHA_EN, lb_params->alpha_en); /* Alpha enable */
240242
}
241243

244+
if (dpp->base.caps->max_lb_partitions == 31)
245+
max_partitions = 31;
246+
242247
REG_SET_2(LB_MEMORY_CTRL, 0,
243248
MEMORY_CONFIG, mem_size_config,
244-
LB_MAX_PARTITIONS, 63);
249+
LB_MAX_PARTITIONS, max_partitions);
245250
}
246251

247252
static const uint16_t *dpp1_dscl_get_filter_coeffs_64p(int taps, struct fixed31_32 ratio)

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,6 @@ bool dpp3_get_optimal_number_of_taps(
383383
int min_taps_y, min_taps_c;
384384
enum lb_memory_config lb_config;
385385

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-
393386
if (scl_data->viewport.width > scl_data->h_active &&
394387
dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
395388
scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
@@ -1440,15 +1433,6 @@ bool dpp3_construct(
14401433
dpp->tf_shift = tf_shift;
14411434
dpp->tf_mask = tf_mask;
14421435

1443-
dpp->lb_pixel_depth_supported =
1444-
LB_PIXEL_DEPTH_18BPP |
1445-
LB_PIXEL_DEPTH_24BPP |
1446-
LB_PIXEL_DEPTH_30BPP |
1447-
LB_PIXEL_DEPTH_36BPP;
1448-
1449-
dpp->lb_bits_per_entry = LB_BITS_PER_ENTRY;
1450-
dpp->lb_memory_size = LB_TOTAL_NUMBER_OF_ENTRIES; /*0x1404*/
1451-
14521436
return true;
14531437
}
14541438

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
SRI(COLOR_KEYER_BLUE, CNVC_CFG, id), \
155155
SRI(CURSOR_CONTROL, CURSOR0_, id),\
156156
SRI(OBUF_MEM_PWR_CTRL, DSCL, id),\
157+
SRI(DSCL_MEM_PWR_STATUS, DSCL, id), \
157158
SRI(DSCL_MEM_PWR_CTRL, DSCL, id)
158159

159160
#define DPP_REG_LIST_DCN30(id)\
@@ -163,8 +164,6 @@
163164
SRI(CM_SHAPER_LUT_DATA, CM, id),\
164165
SRI(CM_MEM_PWR_CTRL2, CM, id), \
165166
SRI(CM_MEM_PWR_STATUS2, CM, id), \
166-
SRI(DSCL_MEM_PWR_STATUS, DSCL, id), \
167-
SRI(DSCL_MEM_PWR_CTRL, DSCL, id), \
168167
SRI(CM_BLNDGAM_RAMA_START_SLOPE_CNTL_B, CM, id),\
169168
SRI(CM_BLNDGAM_RAMA_START_SLOPE_CNTL_G, CM, id),\
170169
SRI(CM_BLNDGAM_RAMA_START_SLOPE_CNTL_R, CM, id),\

drivers/gpu/drm/amd/display/dc/inc/hw/transform.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ struct dpp_caps {
289289
/* DSCL processing pixel data in fixed or float format */
290290
enum dscl_data_processing_format dscl_data_proc_format;
291291

292+
/* max LB partitions */
293+
unsigned int max_lb_partitions;
294+
292295
/* Calculates the number of partitions in the line buffer.
293296
* The implementation of this function is overloaded for
294297
* different versions of DSCL LB.

0 commit comments

Comments
 (0)