Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Bricked
ville
Commits
0c16cc86
Commit
0c16cc86
authored
12 years ago
by
Dennis Rassmann
Browse files
Options
Download
Email Patches
Plain Diff
msm_mpdecision: make earlysuspend/lateresume core independent
Signed-off-by:
Dennis Rassmann
<
showp1984@gmail.com
>
parent
3a80f929
master
exp
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
arch/arm/mach-msm/msm_mpdecision.c
arch/arm/mach-msm/msm_mpdecision.c
+9
-16
No files found.
arch/arm/mach-msm/msm_mpdecision.c
View file @
0c16cc86
...
...
@@ -273,38 +273,31 @@ out:
static
void
msm_mpdec_early_suspend
(
struct
early_suspend
*
h
)
{
int
cpu
=
0
;
int
cpu
=
nr_cpu_ids
;
for_each_possible_cpu
(
cpu
)
{
mutex_lock
(
&
per_cpu
(
msm_mpdec_cpudata
,
cpu
).
suspend_mutex
);
if
((
(
cpu
>=
(
CONFIG_NR_CPUS
-
1
)
)
&&
(
num
_online
_
cpu
s
()
>
1
))
&&
(
msm_mpdec_tuners_ins
.
scroff_single_core
))
{
cpu_down
(
cpu
);
pr_info
(
MPDEC_TAG
"Screen -> off. Suspended CPU%d | Mask=[%d%d]
\n
"
,
cpu
,
cpu_online
(
0
),
cpu_online
(
1
));
if
((
cpu
>=
1
)
&&
(
cpu
_online
(
cpu
)
))
{
cpu_down
(
cpu
);
pr_info
(
MPDEC_TAG
"Screen -> off. Suspended CPU
[
%d
]
| Mask=[%d%d
%d%d
]
\n
"
,
cpu
,
cpu_online
(
0
),
cpu_online
(
1
)
,
cpu_online
(
2
),
cpu_online
(
3
)
);
per_cpu
(
msm_mpdec_cpudata
,
cpu
).
online
=
false
;
}
per_cpu
(
msm_mpdec_cpudata
,
cpu
).
device_suspended
=
true
;
mutex_unlock
(
&
per_cpu
(
msm_mpdec_cpudata
,
cpu
).
suspend_mutex
);
}
pr_info
(
MPDEC_TAG
"Screen -> off. Deactivated mpdecision.
\n
"
);
}
static
void
msm_mpdec_late_resume
(
struct
early_suspend
*
h
)
{
int
cpu
=
0
;
int
cpu
=
nr_cpu_ids
;
for_each_possible_cpu
(
cpu
)
{
mutex_lock
(
&
per_cpu
(
msm_mpdec_cpudata
,
cpu
).
suspend_mutex
);
if
((
cpu
>=
(
CONFIG_NR_CPUS
-
1
))
&&
(
num_online_cpus
()
<
CONFIG_NR_CPUS
))
{
/* Always enable cpus when screen comes online.
* This boosts the wakeup process.
*/
cpu_up
(
cpu
);
per_cpu
(
msm_mpdec_cpudata
,
cpu
).
on_time
=
ktime_to_ms
(
ktime_get
());
per_cpu
(
msm_mpdec_cpudata
,
cpu
).
online
=
true
;
pr_info
(
MPDEC_TAG
"Screen -> on. Hot plugged CPU%d | Mask=[%d%d]
\n
"
,
cpu
,
cpu_online
(
0
),
cpu_online
(
1
));
}
per_cpu
(
msm_mpdec_cpudata
,
cpu
).
device_suspended
=
false
;
mutex_unlock
(
&
per_cpu
(
msm_mpdec_cpudata
,
cpu
).
suspend_mutex
);
}
pr_info
(
MPDEC_TAG
"Screen -> on. Activated mpdecision. | Mask=[%d%d%d%d]
\n
"
,
cpu_online
(
0
),
cpu_online
(
1
),
cpu_online
(
2
),
cpu_online
(
3
))
}
static
struct
early_suspend
msm_mpdec_early_suspend_handler
=
{
...
...
This diff is collapsed.
Click to expand it.
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