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
6387e2cb
Commit
6387e2cb
authored
Jul 26, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/therm: add hook for clk to suggest fanspeed to therm
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
547807b8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
1 deletion
+17
-1
drivers/gpu/drm/nouveau/core/include/core/device.h
drivers/gpu/drm/nouveau/core/include/core/device.h
+1
-1
drivers/gpu/drm/nouveau/core/include/subdev/therm.h
drivers/gpu/drm/nouveau/core/include/subdev/therm.h
+2
-0
drivers/gpu/drm/nouveau/core/subdev/therm/base.c
drivers/gpu/drm/nouveau/core/subdev/therm/base.c
+13
-0
drivers/gpu/drm/nouveau/core/subdev/therm/priv.h
drivers/gpu/drm/nouveau/core/subdev/therm/priv.h
+1
-0
No files found.
drivers/gpu/drm/nouveau/core/include/core/device.h
View file @
6387e2cb
...
...
@@ -35,8 +35,8 @@ enum nv_subdev_type {
NVDEV_SUBDEV_BAR
,
NVDEV_SUBDEV_PWR
,
NVDEV_SUBDEV_VOLT
,
NVDEV_SUBDEV_CLOCK
,
NVDEV_SUBDEV_THERM
,
NVDEV_SUBDEV_CLOCK
,
NVDEV_ENGINE_DMAOBJ
,
NVDEV_ENGINE_FIFO
,
...
...
drivers/gpu/drm/nouveau/core/include/subdev/therm.h
View file @
6387e2cb
...
...
@@ -71,6 +71,8 @@ void _nouveau_therm_dtor(struct nouveau_object *);
int
_nouveau_therm_init
(
struct
nouveau_object
*
);
int
_nouveau_therm_fini
(
struct
nouveau_object
*
,
bool
);
int
nouveau_therm_cstate
(
struct
nouveau_therm
*
,
int
,
int
);
extern
struct
nouveau_oclass
nv40_therm_oclass
;
extern
struct
nouveau_oclass
nv50_therm_oclass
;
extern
struct
nouveau_oclass
nv84_therm_oclass
;
...
...
drivers/gpu/drm/nouveau/core/subdev/therm/base.c
View file @
6387e2cb
...
...
@@ -127,6 +127,19 @@ nouveau_therm_update(struct nouveau_therm *therm, int mode)
spin_unlock_irqrestore
(
&
priv
->
lock
,
flags
);
}
int
nouveau_therm_cstate
(
struct
nouveau_therm
*
ptherm
,
int
fan
,
int
dir
)
{
struct
nouveau_therm_priv
*
priv
=
(
void
*
)
ptherm
;
if
(
!
dir
||
(
dir
<
0
&&
fan
<
priv
->
cstate
)
||
(
dir
>
0
&&
fan
>
priv
->
cstate
))
{
nv_debug
(
ptherm
,
"default fan speed -> %d%%
\n
"
,
fan
);
priv
->
cstate
=
fan
;
nouveau_therm_update
(
ptherm
,
-
1
);
}
return
0
;
}
static
void
nouveau_therm_alarm
(
struct
nouveau_alarm
*
alarm
)
{
...
...
drivers/gpu/drm/nouveau/core/subdev/therm/priv.h
View file @
6387e2cb
...
...
@@ -76,6 +76,7 @@ struct nouveau_therm_priv {
spinlock_t
lock
;
struct
nouveau_therm_trip_point
*
last_trip
;
int
mode
;
int
cstate
;
int
suspend
;
/* bios */
...
...
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