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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: fix dcn315 single stream crb allocation

Change to improve avoiding asymetric crb calculations for single stream
scenarios.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Acked-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Dmytro Laktyushkin and committed by
Alex Deucher
49f26218 869bcf59

+12 -3
+12 -3
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
··· 1628 1628 int i; 1629 1629 struct resource_context *res_ctx = &context->res_ctx; 1630 1630 1631 + /*Don't apply for single stream*/ 1632 + if (context->stream_count < 2) 1633 + return false; 1634 + 1631 1635 for (i = 0; i < dc->res_pool->pipe_count; i++) { 1632 1636 if (!res_ctx->pipe_ctx[i].stream) 1633 1637 continue; ··· 1731 1727 pipe_cnt++; 1732 1728 } 1733 1729 1734 - /* Spread remaining unreserved crb evenly among all pipes, use default policy if not enough det or single pipe */ 1730 + /* Spread remaining unreserved crb evenly among all pipes*/ 1735 1731 if (pixel_rate_crb) { 1736 1732 for (i = 0, pipe_cnt = 0, crb_idx = 0; i < dc->res_pool->pipe_count; i++) { 1737 1733 pipe = &res_ctx->pipe_ctx[i]; 1738 1734 if (!pipe->stream) 1739 1735 continue; 1740 1736 1737 + /* Do not use asymetric crb if not enough for pstate support */ 1738 + if (remaining_det_segs < 0) { 1739 + pipes[pipe_cnt].pipe.src.det_size_override = 0; 1740 + continue; 1741 + } 1742 + 1741 1743 if (!pipe->top_pipe && !pipe->prev_odm_pipe) { 1742 1744 bool split_required = pipe->stream->timing.pix_clk_100hz >= dcn_get_max_non_odm_pix_rate_100hz(&dc->dml.soc) 1743 1745 || (pipe->plane_state && pipe->plane_state->src_rect.width > 5120); 1744 1746 1745 - if (remaining_det_segs < 0 || crb_pipes == 1) 1746 - pipes[pipe_cnt].pipe.src.det_size_override = 0; 1747 1747 if (remaining_det_segs > MIN_RESERVED_DET_SEGS) 1748 1748 pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs - MIN_RESERVED_DET_SEGS) / crb_pipes + 1749 1749 (crb_idx < (remaining_det_segs - MIN_RESERVED_DET_SEGS) % crb_pipes ? 1 : 0); ··· 1763 1755 } 1764 1756 /* Convert segments into size for DML use */ 1765 1757 pipes[pipe_cnt].pipe.src.det_size_override *= DCN3_15_CRB_SEGMENT_SIZE_KB; 1758 + 1766 1759 crb_idx++; 1767 1760 } 1768 1761 pipe_cnt++;