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
36faa2fc
Commit
36faa2fc
authored
Jul 26, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/therm: if no bios trip/linear info, default to perf-suggested speed
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
6387e2cb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
drivers/gpu/drm/nouveau/core/subdev/therm/base.c
drivers/gpu/drm/nouveau/core/subdev/therm/base.c
+12
-3
drivers/gpu/drm/nouveau/core/subdev/therm/fan.c
drivers/gpu/drm/nouveau/core/subdev/therm/fan.c
+3
-0
No files found.
drivers/gpu/drm/nouveau/core/subdev/therm/base.c
View file @
36faa2fc
...
...
@@ -92,6 +92,7 @@ nouveau_therm_update(struct nouveau_therm *therm, int mode)
struct
nouveau_timer
*
ptimer
=
nouveau_timer
(
therm
);
struct
nouveau_therm_priv
*
priv
=
(
void
*
)
therm
;
unsigned
long
flags
;
bool
poll
=
true
;
int
duty
;
spin_lock_irqsave
(
&
priv
->
lock
,
flags
);
...
...
@@ -105,16 +106,24 @@ nouveau_therm_update(struct nouveau_therm *therm, int mode)
duty
=
nouveau_therm_fan_get
(
therm
);
if
(
duty
<
0
)
duty
=
100
;
poll
=
false
;
break
;
case
NOUVEAU_THERM_CTRL_AUTO
:
if
(
priv
->
fan
->
bios
.
nr_fan_trip
)
if
(
priv
->
fan
->
bios
.
nr_fan_trip
)
{
duty
=
nouveau_therm_update_trip
(
therm
);
else
}
else
if
(
priv
->
fan
->
bios
.
linear_min_temp
||
priv
->
fan
->
bios
.
linear_max_temp
)
{
duty
=
nouveau_therm_update_linear
(
therm
);
}
else
{
duty
=
priv
->
cstate
;
poll
=
false
;
}
break
;
case
NOUVEAU_THERM_CTRL_NONE
:
default:
ptimer
->
alarm_cancel
(
ptimer
,
&
priv
->
alarm
);
poll
=
false
;
goto
done
;
}
...
...
@@ -122,7 +131,7 @@ nouveau_therm_update(struct nouveau_therm *therm, int mode)
nouveau_therm_fan_set
(
therm
,
(
mode
!=
NOUVEAU_THERM_CTRL_AUTO
),
duty
);
done:
if
(
list_empty
(
&
priv
->
alarm
.
head
)
&&
(
mode
==
NOUVEAU_THERM_CTRL_AUTO
)
)
if
(
list_empty
(
&
priv
->
alarm
.
head
)
&&
poll
)
ptimer
->
alarm
(
ptimer
,
1000000000ULL
,
&
priv
->
alarm
);
spin_unlock_irqrestore
(
&
priv
->
lock
,
flags
);
}
...
...
drivers/gpu/drm/nouveau/core/subdev/therm/fan.c
View file @
36faa2fc
...
...
@@ -185,8 +185,11 @@ nouveau_therm_fan_set_defaults(struct nouveau_therm *therm)
priv
->
fan
->
bios
.
max_duty
=
100
;
priv
->
fan
->
bios
.
bump_period
=
500
;
priv
->
fan
->
bios
.
slow_down_period
=
2000
;
/*XXX: talk to mupuf */
#if 0
priv->fan->bios.linear_min_temp = 40;
priv->fan->bios.linear_max_temp = 85;
#endif
}
static
void
...
...
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