drm/amd/display: Increase linebuffer pixel depth to 36bpp.
Testing with the photometer shows that at least Raven Ridge DCN-1.0 does not achieve more than 10 bpc effective output precision with a 16 bpc unorm surface of type SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616, unless linebuffer depth is increased from LB_PIXEL_DEPTH_30BPP to LB_PIXEL_DEPTH_36BPP. Otherwise precision gets truncated somewhere to 10 bpc effective depth. Strangely this increase was not needed on Polaris11 DCE-11.2 during testing to get 12 bpc effective precision. It also is not needed for fp16 framebuffers. Tested on DCN-1.0 and DCE-11.2. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
050cd3d616
commit
a316db7209
8 changed files with 19 additions and 10 deletions
|
@ -1039,9 +1039,12 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)
|
|||
/*
|
||||
* LB calculations depend on vp size, h/v_active and scaling ratios
|
||||
* Setting line buffer pixel depth to 24bpp yields banding
|
||||
* on certain displays, such as the Sharp 4k
|
||||
* on certain displays, such as the Sharp 4k. 36bpp is needed
|
||||
* to support SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616 and
|
||||
* SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616 with actual > 10 bpc
|
||||
* precision on at least DCN display engines.
|
||||
*/
|
||||
pipe_ctx->plane_res.scl_data.lb_params.depth = LB_PIXEL_DEPTH_30BPP;
|
||||
pipe_ctx->plane_res.scl_data.lb_params.depth = LB_PIXEL_DEPTH_36BPP;
|
||||
pipe_ctx->plane_res.scl_data.lb_params.alpha_en = plane_state->per_pixel_alpha;
|
||||
|
||||
if (pipe_ctx->plane_res.xfm != NULL)
|
||||
|
|
|
@ -1647,7 +1647,8 @@ void dce_transform_construct(
|
|||
xfm_dce->lb_pixel_depth_supported =
|
||||
LB_PIXEL_DEPTH_18BPP |
|
||||
LB_PIXEL_DEPTH_24BPP |
|
||||
LB_PIXEL_DEPTH_30BPP;
|
||||
LB_PIXEL_DEPTH_30BPP |
|
||||
LB_PIXEL_DEPTH_36BPP;
|
||||
|
||||
xfm_dce->lb_bits_per_entry = LB_BITS_PER_ENTRY;
|
||||
xfm_dce->lb_memory_size = LB_TOTAL_NUMBER_OF_ENTRIES; /*0x6B0*/
|
||||
|
@ -1675,7 +1676,8 @@ void dce60_transform_construct(
|
|||
xfm_dce->lb_pixel_depth_supported =
|
||||
LB_PIXEL_DEPTH_18BPP |
|
||||
LB_PIXEL_DEPTH_24BPP |
|
||||
LB_PIXEL_DEPTH_30BPP;
|
||||
LB_PIXEL_DEPTH_30BPP |
|
||||
LB_PIXEL_DEPTH_36BPP;
|
||||
|
||||
xfm_dce->lb_bits_per_entry = LB_BITS_PER_ENTRY;
|
||||
xfm_dce->lb_memory_size = LB_TOTAL_NUMBER_OF_ENTRIES; /*0x6B0*/
|
||||
|
|
|
@ -708,7 +708,8 @@ bool dce110_transform_v_construct(
|
|||
xfm_dce->lb_pixel_depth_supported =
|
||||
LB_PIXEL_DEPTH_18BPP |
|
||||
LB_PIXEL_DEPTH_24BPP |
|
||||
LB_PIXEL_DEPTH_30BPP;
|
||||
LB_PIXEL_DEPTH_30BPP |
|
||||
LB_PIXEL_DEPTH_36BPP;
|
||||
|
||||
xfm_dce->prescaler_on = true;
|
||||
xfm_dce->lb_bits_per_entry = LB_BITS_PER_ENTRY;
|
||||
|
|
|
@ -568,7 +568,8 @@ void dpp1_construct(
|
|||
dpp->lb_pixel_depth_supported =
|
||||
LB_PIXEL_DEPTH_18BPP |
|
||||
LB_PIXEL_DEPTH_24BPP |
|
||||
LB_PIXEL_DEPTH_30BPP;
|
||||
LB_PIXEL_DEPTH_30BPP |
|
||||
LB_PIXEL_DEPTH_36BPP;
|
||||
|
||||
dpp->lb_bits_per_entry = LB_BITS_PER_ENTRY;
|
||||
dpp->lb_memory_size = LB_TOTAL_NUMBER_OF_ENTRIES; /*0x1404*/
|
||||
|
|
|
@ -2593,7 +2593,7 @@ static void update_scaler(struct pipe_ctx *pipe_ctx)
|
|||
pipe_ctx->plane_state->per_pixel_alpha && pipe_ctx->bottom_pipe;
|
||||
|
||||
pipe_ctx->plane_res.scl_data.lb_params.alpha_en = per_pixel_alpha;
|
||||
pipe_ctx->plane_res.scl_data.lb_params.depth = LB_PIXEL_DEPTH_30BPP;
|
||||
pipe_ctx->plane_res.scl_data.lb_params.depth = LB_PIXEL_DEPTH_36BPP;
|
||||
/* scaler configuration */
|
||||
pipe_ctx->plane_res.dpp->funcs->dpp_set_scaler(
|
||||
pipe_ctx->plane_res.dpp, &pipe_ctx->plane_res.scl_data);
|
||||
|
|
|
@ -432,7 +432,8 @@ bool dpp2_construct(
|
|||
dpp->lb_pixel_depth_supported =
|
||||
LB_PIXEL_DEPTH_18BPP |
|
||||
LB_PIXEL_DEPTH_24BPP |
|
||||
LB_PIXEL_DEPTH_30BPP;
|
||||
LB_PIXEL_DEPTH_30BPP |
|
||||
LB_PIXEL_DEPTH_36BPP;
|
||||
|
||||
dpp->lb_bits_per_entry = LB_BITS_PER_ENTRY;
|
||||
dpp->lb_memory_size = LB_TOTAL_NUMBER_OF_ENTRIES; /*0x1404*/
|
||||
|
|
|
@ -1473,7 +1473,7 @@ static void dcn20_update_dchubp_dpp(
|
|||
plane_state->update_flags.bits.per_pixel_alpha_change ||
|
||||
pipe_ctx->stream->update_flags.bits.scaling) {
|
||||
pipe_ctx->plane_res.scl_data.lb_params.alpha_en = pipe_ctx->plane_state->per_pixel_alpha;
|
||||
ASSERT(pipe_ctx->plane_res.scl_data.lb_params.depth == LB_PIXEL_DEPTH_30BPP);
|
||||
ASSERT(pipe_ctx->plane_res.scl_data.lb_params.depth == LB_PIXEL_DEPTH_36BPP);
|
||||
/* scaler configuration */
|
||||
pipe_ctx->plane_res.dpp->funcs->dpp_set_scaler(
|
||||
pipe_ctx->plane_res.dpp, &pipe_ctx->plane_res.scl_data);
|
||||
|
|
|
@ -1443,7 +1443,8 @@ bool dpp3_construct(
|
|||
dpp->lb_pixel_depth_supported =
|
||||
LB_PIXEL_DEPTH_18BPP |
|
||||
LB_PIXEL_DEPTH_24BPP |
|
||||
LB_PIXEL_DEPTH_30BPP;
|
||||
LB_PIXEL_DEPTH_30BPP |
|
||||
LB_PIXEL_DEPTH_36BPP;
|
||||
|
||||
dpp->lb_bits_per_entry = LB_BITS_PER_ENTRY;
|
||||
dpp->lb_memory_size = LB_TOTAL_NUMBER_OF_ENTRIES; /*0x1404*/
|
||||
|
|
Loading…
Add table
Reference in a new issue