ACK: [PATCH 1/1] drm/radeon: prefer lower reference dividers
Connor Kuehl
connor.kuehl at canonical.com
Thu Jun 27 15:09:30 UTC 2019
On 6/17/19 8:10 PM, Kai-Heng Feng wrote:
> From: Christian König <christian.koenig at amd.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1791312
>
> 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
> Suggested-by: Paul Dufresne <dufresnep at gmail.com>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> Acked-by: Alex Deucher <alexander.deucher at amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> Cc: stable at vger.kernel.org
> (cherry picked from commit 2e26ccb119bde03584be53406bbd22e711b0d6e6)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
Acked-by: Connor Kuehl <connor.kuehl at canonical.com>
> ---
> drivers/gpu/drm/radeon/radeon_display.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
> index 9d3ac8b981da..d8e2d7b3b836 100644
> --- a/drivers/gpu/drm/radeon/radeon_display.c
> +++ b/drivers/gpu/drm/radeon/radeon_display.c
> @@ -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;
> }
> }
>
--
Connor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 5950 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20190627/e712a712/attachment.key>
More information about the kernel-team
mailing list