Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3b333c55
Commit
3b333c55
authored
Apr 24, 2014
by
Christian König
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/radeon: avoid high jitter with small frac divs
Signed-off-by:
Christian König
<
christian.koenig@amd.com
>
parent
695daf1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
drivers/gpu/drm/radeon/radeon_display.c
drivers/gpu/drm/radeon/radeon_display.c
+12
-2
No files found.
drivers/gpu/drm/radeon/radeon_display.c
View file @
3b333c55
...
@@ -830,14 +830,14 @@ static void avivo_reduce_ratio(unsigned *nom, unsigned *den,
...
@@ -830,14 +830,14 @@ static void avivo_reduce_ratio(unsigned *nom, unsigned *den,
/* make sure nominator is large enough */
/* make sure nominator is large enough */
if
(
*
nom
<
nom_min
)
{
if
(
*
nom
<
nom_min
)
{
tmp
=
(
nom_min
+
*
nom
-
1
)
/
*
nom
;
tmp
=
DIV_ROUND_UP
(
nom_min
,
*
nom
)
;
*
nom
*=
tmp
;
*
nom
*=
tmp
;
*
den
*=
tmp
;
*
den
*=
tmp
;
}
}
/* make sure the denominator is large enough */
/* make sure the denominator is large enough */
if
(
*
den
<
den_min
)
{
if
(
*
den
<
den_min
)
{
tmp
=
(
den_min
+
*
den
-
1
)
/
*
den
;
tmp
=
DIV_ROUND_UP
(
den_min
,
*
den
)
;
*
nom
*=
tmp
;
*
nom
*=
tmp
;
*
den
*=
tmp
;
*
den
*=
tmp
;
}
}
...
@@ -997,6 +997,16 @@ void radeon_compute_pll_avivo(struct radeon_pll *pll,
...
@@ -997,6 +997,16 @@ void radeon_compute_pll_avivo(struct radeon_pll *pll,
/* this also makes sure that the reference divider is large enough */
/* this also makes sure that the reference divider is large enough */
avivo_reduce_ratio
(
&
fb_div
,
&
ref_div
,
fb_div_min
,
ref_div_min
);
avivo_reduce_ratio
(
&
fb_div
,
&
ref_div
,
fb_div_min
,
ref_div_min
);
/* avoid high jitter with small fractional dividers */
if
(
pll
->
flags
&
RADEON_PLL_USE_FRAC_FB_DIV
&&
(
fb_div
%
10
))
{
fb_div_min
=
max
(
fb_div_min
,
(
9
-
(
fb_div
%
10
))
*
20
+
60
);
if
(
fb_div
<
fb_div_min
)
{
unsigned
tmp
=
DIV_ROUND_UP
(
fb_div_min
,
fb_div
);
fb_div
*=
tmp
;
ref_div
*=
tmp
;
}
}
/* and finally save the result */
/* and finally save the result */
if
(
pll
->
flags
&
RADEON_PLL_USE_FRAC_FB_DIV
)
{
if
(
pll
->
flags
&
RADEON_PLL_USE_FRAC_FB_DIV
)
{
*
fb_div_p
=
fb_div
/
10
;
*
fb_div_p
=
fb_div
/
10
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment