Skip to content

Commit

Permalink
drm/amd/display: Use the correct max downscaling value for DCN3.x family
Browse files Browse the repository at this point in the history
[why]
As per spec, DCN3.x can do 6:1 downscaling and DCN2.x can do 4:1. The
max downscaling limit value for DCN2.x is 250, which means it's
calculated as 1000 / 4 = 250. For DCN3.x this then gives 1000 / 6 = 167.

[how]
Set maximum downscaling limit to 167 for DCN3.x

Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
  • Loading branch information
Nikola Cornij authored and Alex Deucher committed May 19, 2021
1 parent d07f6ca commit 84c63d0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,11 @@ static const struct dc_plane_cap plane_cap = {
.fp16 = 16000
},

/* 6:1 downscaling ratio: 1000/6 = 166.666 */
.max_downscale_factor = {
.argb8888 = 600,
.nv12 = 600,
.fp16 = 600
.argb8888 = 167,
.nv12 = 167,
.fp16 = 167
}
};

Expand Down
7 changes: 4 additions & 3 deletions drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,10 +843,11 @@ static const struct dc_plane_cap plane_cap = {
.fp16 = 16000
},

/* 6:1 downscaling ratio: 1000/6 = 166.666 */
.max_downscale_factor = {
.argb8888 = 600,
.nv12 = 600,
.fp16 = 600
.argb8888 = 167,
.nv12 = 167,
.fp16 = 167
},
64,
64
Expand Down
7 changes: 4 additions & 3 deletions drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,11 @@ static const struct dc_plane_cap plane_cap = {
.nv12 = 16000,
.fp16 = 16000
},
/* 6:1 downscaling ratio: 1000/6 = 166.666 */
.max_downscale_factor = {
.argb8888 = 600,
.nv12 = 600,
.fp16 = 600
.argb8888 = 167,
.nv12 = 167,
.fp16 = 167
},
16,
16
Expand Down

0 comments on commit 84c63d0

Please sign in to comment.