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
682b1fc7
Commit
682b1fc7
authored
Nov 04, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/therm: update target fanspeed outside of therm lock
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
208cf0b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
drivers/gpu/drm/nouveau/core/subdev/therm/base.c
drivers/gpu/drm/nouveau/core/subdev/therm/base.c
+8
-6
No files found.
drivers/gpu/drm/nouveau/core/subdev/therm/base.c
View file @
682b1fc7
...
@@ -92,8 +92,9 @@ nouveau_therm_update(struct nouveau_therm *therm, int mode)
...
@@ -92,8 +92,9 @@ nouveau_therm_update(struct nouveau_therm *therm, int mode)
struct
nouveau_timer
*
ptimer
=
nouveau_timer
(
therm
);
struct
nouveau_timer
*
ptimer
=
nouveau_timer
(
therm
);
struct
nouveau_therm_priv
*
priv
=
(
void
*
)
therm
;
struct
nouveau_therm_priv
*
priv
=
(
void
*
)
therm
;
unsigned
long
flags
;
unsigned
long
flags
;
bool
immd
=
true
;
bool
poll
=
true
;
bool
poll
=
true
;
int
duty
;
int
duty
=
-
1
;
spin_lock_irqsave
(
&
priv
->
lock
,
flags
);
spin_lock_irqsave
(
&
priv
->
lock
,
flags
);
if
(
mode
<
0
)
if
(
mode
<
0
)
...
@@ -119,21 +120,22 @@ nouveau_therm_update(struct nouveau_therm *therm, int mode)
...
@@ -119,21 +120,22 @@ nouveau_therm_update(struct nouveau_therm *therm, int mode)
duty
=
priv
->
cstate
;
duty
=
priv
->
cstate
;
poll
=
false
;
poll
=
false
;
}
}
immd
=
false
;
break
;
break
;
case
NOUVEAU_THERM_CTRL_NONE
:
case
NOUVEAU_THERM_CTRL_NONE
:
default:
default:
ptimer
->
alarm_cancel
(
ptimer
,
&
priv
->
alarm
);
ptimer
->
alarm_cancel
(
ptimer
,
&
priv
->
alarm
);
poll
=
false
;
poll
=
false
;
goto
done
;
}
}
nv_debug
(
therm
,
"FAN target request: %d%%
\n
"
,
duty
);
nouveau_therm_fan_set
(
therm
,
(
mode
!=
NOUVEAU_THERM_CTRL_AUTO
),
duty
);
done:
if
(
list_empty
(
&
priv
->
alarm
.
head
)
&&
poll
)
if
(
list_empty
(
&
priv
->
alarm
.
head
)
&&
poll
)
ptimer
->
alarm
(
ptimer
,
1000000000ULL
,
&
priv
->
alarm
);
ptimer
->
alarm
(
ptimer
,
1000000000ULL
,
&
priv
->
alarm
);
spin_unlock_irqrestore
(
&
priv
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
priv
->
lock
,
flags
);
if
(
duty
>=
0
)
{
nv_debug
(
therm
,
"FAN target request: %d%%
\n
"
,
duty
);
nouveau_therm_fan_set
(
therm
,
immd
,
duty
);
}
}
}
int
int
...
...
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