drm/radeon: prefer lower reference dividers
Subsystems (2)
PATCH 1/1 drm/radeon: prefer lower reference dividers
Instead of the closest reference divider prefer the lowest, this fixes flickering issues on HP Compaq nx9420.
Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=108514
--- drivers/gpu/drm/radeon/radeon_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/radeon_display.c +2 -2
@@ -921,12 +921,12 @@ static void avivo_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div, ref_div_max =max (min (100 / post_div, ref_div_max),1u );/* get matching reference and feedback divider */ - *ref_div =min (max (DIV_ROUND_CLOSEST (den, post_div),1u ), ref_div_max); + *ref_div =min (max (den/post_div,1u ), ref_div_max); *fb_div =DIV_ROUND_CLOSEST (nom * *ref_div * post_div, den);/* limit fb divider to its maximum */ if (*fb_div > fb_div_max) { - *ref_div =DIV_ROUND_CLOSEST (*ref_div * fb_div_max, *fb_div); + *ref_div = (*ref_div * fb_div_max)/(*fb_div); *fb_div = fb_div_max; } }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190506180140.2733-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Acked-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Christian König <[email protected]>
Sent: Monday, May 6, 2019 2:01 PM
To: [email protected]; [email protected]; [email protected]
Subject: [PATCH] drm/radeon: prefer lower reference dividers
[CAUTION: External Email]
Instead of the closest reference divider prefer the lowest, this fixes flickering issues on HP Compaq nx9420.
Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=108514
--- drivers/gpu/drm/radeon/radeon_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/radeon_display.c +2 -2
@@ -921,12 +921,12 @@ static void avivo_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div, ref_div_max =max (min (100 / post_div, ref_div_max),1u );/* get matching reference and feedback divider */ - *ref_div =min (max (DIV_ROUND_CLOSEST (den, post_div),1u ), ref_div_max); + *ref_div =min (max (den/post_div,1u ), ref_div_max); *fb_div =DIV_ROUND_CLOSEST (nom * *ref_div * post_div, den);/* limit fb divider to its maximum */ if (*fb_div > fb_div_max) { - *ref_div =DIV_ROUND_CLOSEST (*ref_div * fb_div_max, *fb_div); + *ref_div = (*ref_div * fb_div_max)/(*fb_div); *fb_div = fb_div_max; } }
--
2.17.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx