drm/radeon: lower the ref * post PLL maximum once more
authorChristian König <christian.koenig@amd.com>
Wed, 21 May 2014 13:25:41 +0000 (15:25 +0200)
committerChristian König <christian.koenig@amd.com>
Fri, 30 May 2014 12:13:30 +0000 (14:13 +0200)
Let's be conservative and use 100 here until we find something better.

Bugs: https://bugzilla.kernel.org/show_bug.cgi?id=75241

Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/radeon/radeon_display.c

index f00dbbf4d806511a86b034a73c2d68adac971b99..356b733caafeb84093b75ba8ad00191ebfe4c5b5 100644 (file)
@@ -862,7 +862,7 @@ static void avivo_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div,
                                 unsigned *fb_div, unsigned *ref_div)
 {
        /* limit reference * post divider to a maximum */
-       ref_div_max = min(128 / post_div, ref_div_max);
+       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);