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
Kirill Smelkov
linux
Commits
9dd9333b
Commit
9dd9333b
authored
Apr 29, 2013
by
Alex Deucher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/radeon: adjust si_dpm function for code sharing
Signed-off-by:
Alex Deucher
<
alexander.deucher@amd.com
>
parent
286d9cc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
drivers/gpu/drm/radeon/si_dpm.c
drivers/gpu/drm/radeon/si_dpm.c
+14
-7
No files found.
drivers/gpu/drm/radeon/si_dpm.c
View file @
9dd9333b
...
@@ -3759,19 +3759,20 @@ static bool si_validate_phase_shedding_tables(struct radeon_device *rdev,
...
@@ -3759,19 +3759,20 @@ static bool si_validate_phase_shedding_tables(struct radeon_device *rdev,
}
}
static
void
si_trim_voltage_table_to_fit_state_table
(
struct
radeon_device
*
rdev
,
static
void
si_trim_voltage_table_to_fit_state_table
(
struct
radeon_device
*
rdev
,
u32
max_voltage_steps
,
struct
atom_voltage_table
*
voltage_table
)
struct
atom_voltage_table
*
voltage_table
)
{
{
unsigned
int
i
,
diff
;
unsigned
int
i
,
diff
;
if
(
voltage_table
->
count
<=
SISLANDS_MAX_NO_VREG_STEPS
)
if
(
voltage_table
->
count
<=
max_voltage_steps
)
return
;
return
;
diff
=
voltage_table
->
count
-
SISLANDS_MAX_NO_VREG_STEPS
;
diff
=
voltage_table
->
count
-
max_voltage_steps
;
for
(
i
=
0
;
i
<
SISLANDS_MAX_NO_VREG_STEPS
;
i
++
)
for
(
i
=
0
;
i
<
max_voltage_steps
;
i
++
)
voltage_table
->
entries
[
i
]
=
voltage_table
->
entries
[
i
+
diff
];
voltage_table
->
entries
[
i
]
=
voltage_table
->
entries
[
i
+
diff
];
voltage_table
->
count
=
SISLANDS_MAX_NO_VREG_STEPS
;
voltage_table
->
count
=
max_voltage_steps
;
}
}
static
int
si_construct_voltage_tables
(
struct
radeon_device
*
rdev
)
static
int
si_construct_voltage_tables
(
struct
radeon_device
*
rdev
)
...
@@ -3787,7 +3788,9 @@ static int si_construct_voltage_tables(struct radeon_device *rdev)
...
@@ -3787,7 +3788,9 @@ static int si_construct_voltage_tables(struct radeon_device *rdev)
return
ret
;
return
ret
;
if
(
eg_pi
->
vddc_voltage_table
.
count
>
SISLANDS_MAX_NO_VREG_STEPS
)
if
(
eg_pi
->
vddc_voltage_table
.
count
>
SISLANDS_MAX_NO_VREG_STEPS
)
si_trim_voltage_table_to_fit_state_table
(
rdev
,
&
eg_pi
->
vddc_voltage_table
);
si_trim_voltage_table_to_fit_state_table
(
rdev
,
SISLANDS_MAX_NO_VREG_STEPS
,
&
eg_pi
->
vddc_voltage_table
);
if
(
eg_pi
->
vddci_control
)
{
if
(
eg_pi
->
vddci_control
)
{
ret
=
radeon_atom_get_voltage_table
(
rdev
,
VOLTAGE_TYPE_VDDCI
,
ret
=
radeon_atom_get_voltage_table
(
rdev
,
VOLTAGE_TYPE_VDDCI
,
...
@@ -3796,7 +3799,9 @@ static int si_construct_voltage_tables(struct radeon_device *rdev)
...
@@ -3796,7 +3799,9 @@ static int si_construct_voltage_tables(struct radeon_device *rdev)
return
ret
;
return
ret
;
if
(
eg_pi
->
vddci_voltage_table
.
count
>
SISLANDS_MAX_NO_VREG_STEPS
)
if
(
eg_pi
->
vddci_voltage_table
.
count
>
SISLANDS_MAX_NO_VREG_STEPS
)
si_trim_voltage_table_to_fit_state_table
(
rdev
,
&
eg_pi
->
vddci_voltage_table
);
si_trim_voltage_table_to_fit_state_table
(
rdev
,
SISLANDS_MAX_NO_VREG_STEPS
,
&
eg_pi
->
vddci_voltage_table
);
}
}
if
(
pi
->
mvdd_control
)
{
if
(
pi
->
mvdd_control
)
{
...
@@ -3814,7 +3819,9 @@ static int si_construct_voltage_tables(struct radeon_device *rdev)
...
@@ -3814,7 +3819,9 @@ static int si_construct_voltage_tables(struct radeon_device *rdev)
}
}
if
(
si_pi
->
mvdd_voltage_table
.
count
>
SISLANDS_MAX_NO_VREG_STEPS
)
if
(
si_pi
->
mvdd_voltage_table
.
count
>
SISLANDS_MAX_NO_VREG_STEPS
)
si_trim_voltage_table_to_fit_state_table
(
rdev
,
&
si_pi
->
mvdd_voltage_table
);
si_trim_voltage_table_to_fit_state_table
(
rdev
,
SISLANDS_MAX_NO_VREG_STEPS
,
&
si_pi
->
mvdd_voltage_table
);
}
}
if
(
si_pi
->
vddc_phase_shed_control
)
{
if
(
si_pi
->
vddc_phase_shed_control
)
{
...
...
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