mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
drm/amd/display: Fix refresh rate round up case
[Why & How] fix refresh rate round up case Reviewed-by: Robin Chen <robin.chen@amd.com> Signed-off-by: ChunTao Tso <ChunTao.Tso@amd.com> Signed-off-by: James Lin <pinglei.lin@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
5da1e1dfd1
commit
4be20905ba
|
|
@ -993,8 +993,8 @@ bool psr_su_set_dsc_slice_height(struct dc *dc, struct dc_link *link,
|
|||
|
||||
void set_replay_frame_skip_number(struct dc_link *link,
|
||||
enum replay_coasting_vtotal_type type,
|
||||
uint32_t coasting_vtotal_refresh_rate_mhz,
|
||||
uint32_t flicker_free_refresh_rate_mhz,
|
||||
uint32_t coasting_vtotal_refresh_rate_uhz,
|
||||
uint32_t flicker_free_refresh_rate_uhz,
|
||||
bool is_defer)
|
||||
{
|
||||
uint32_t *frame_skip_number_array = NULL;
|
||||
|
|
@ -1006,7 +1006,7 @@ void set_replay_frame_skip_number(struct dc_link *link,
|
|||
if (false == link->replay_settings.config.frame_skip_supported)
|
||||
return;
|
||||
|
||||
if (flicker_free_refresh_rate_mhz == 0 || coasting_vtotal_refresh_rate_mhz == 0)
|
||||
if (flicker_free_refresh_rate_uhz == 0 || coasting_vtotal_refresh_rate_uhz == 0)
|
||||
return;
|
||||
|
||||
if (is_defer)
|
||||
|
|
@ -1017,7 +1017,7 @@ void set_replay_frame_skip_number(struct dc_link *link,
|
|||
if (frame_skip_number_array == NULL)
|
||||
return;
|
||||
|
||||
frame_skip_number = coasting_vtotal_refresh_rate_mhz / flicker_free_refresh_rate_mhz;
|
||||
frame_skip_number = (coasting_vtotal_refresh_rate_uhz + 500000) / flicker_free_refresh_rate_uhz;
|
||||
|
||||
if (frame_skip_number >= 1)
|
||||
frame_skip_number_array[type] = frame_skip_number - 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user