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
ff2b6c6e
Commit
ff2b6c6e
authored
Oct 27, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/pm: remove the older interfaces completely
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
36f1317e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
60 deletions
+10
-60
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+0
-5
drivers/gpu/drm/nouveau/nouveau_pm.c
drivers/gpu/drm/nouveau/nouveau_pm.c
+8
-54
drivers/gpu/drm/nouveau/nv04_timer.c
drivers/gpu/drm/nouveau/nv04_timer.c
+2
-1
No files found.
drivers/gpu/drm/nouveau/nouveau_drv.h
View file @
ff2b6c6e
...
@@ -549,11 +549,6 @@ struct nouveau_pm_engine {
...
@@ -549,11 +549,6 @@ struct nouveau_pm_engine {
struct
device
*
hwmon
;
struct
device
*
hwmon
;
struct
notifier_block
acpi_nb
;
struct
notifier_block
acpi_nb
;
int
(
*
clock_get
)(
struct
drm_device
*
,
u32
id
);
void
*
(
*
clock_pre
)(
struct
drm_device
*
,
struct
nouveau_pm_level
*
,
u32
id
,
int
khz
);
void
(
*
clock_set
)(
struct
drm_device
*
,
void
*
);
int
(
*
clocks_get
)(
struct
drm_device
*
,
struct
nouveau_pm_level
*
);
int
(
*
clocks_get
)(
struct
drm_device
*
,
struct
nouveau_pm_level
*
);
void
*
(
*
clocks_pre
)(
struct
drm_device
*
,
struct
nouveau_pm_level
*
);
void
*
(
*
clocks_pre
)(
struct
drm_device
*
,
struct
nouveau_pm_level
*
);
int
(
*
clocks_set
)(
struct
drm_device
*
,
void
*
);
int
(
*
clocks_set
)(
struct
drm_device
*
,
void
*
);
...
...
drivers/gpu/drm/nouveau/nouveau_pm.c
View file @
ff2b6c6e
...
@@ -96,31 +96,12 @@ nouveau_pwmfan_set(struct drm_device *dev, int percent)
...
@@ -96,31 +96,12 @@ nouveau_pwmfan_set(struct drm_device *dev, int percent)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
static
int
nouveau_pm_clock_set
(
struct
drm_device
*
dev
,
struct
nouveau_pm_level
*
perflvl
,
u8
id
,
u32
khz
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_pm_engine
*
pm
=
&
dev_priv
->
engine
.
pm
;
void
*
pre_state
;
if
(
khz
==
0
)
return
0
;
pre_state
=
pm
->
clock_pre
(
dev
,
perflvl
,
id
,
khz
);
if
(
IS_ERR
(
pre_state
))
return
PTR_ERR
(
pre_state
);
if
(
pre_state
)
pm
->
clock_set
(
dev
,
pre_state
);
return
0
;
}
static
int
static
int
nouveau_pm_perflvl_set
(
struct
drm_device
*
dev
,
struct
nouveau_pm_level
*
perflvl
)
nouveau_pm_perflvl_set
(
struct
drm_device
*
dev
,
struct
nouveau_pm_level
*
perflvl
)
{
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_pm_engine
*
pm
=
&
dev_priv
->
engine
.
pm
;
struct
nouveau_pm_engine
*
pm
=
&
dev_priv
->
engine
.
pm
;
void
*
state
;
int
ret
;
int
ret
;
if
(
perflvl
==
pm
->
cur
)
if
(
perflvl
==
pm
->
cur
)
...
@@ -144,18 +125,10 @@ nouveau_pm_perflvl_set(struct drm_device *dev, struct nouveau_pm_level *perflvl)
...
@@ -144,18 +125,10 @@ nouveau_pm_perflvl_set(struct drm_device *dev, struct nouveau_pm_level *perflvl)
}
}
}
}
if
(
pm
->
clocks_pre
)
{
state
=
pm
->
clocks_pre
(
dev
,
perflvl
);
void
*
state
=
pm
->
clocks_pre
(
dev
,
perflvl
);
if
(
IS_ERR
(
state
))
if
(
IS_ERR
(
state
))
return
PTR_ERR
(
state
);
return
PTR_ERR
(
state
);
pm
->
clocks_set
(
dev
,
state
);
pm
->
clocks_set
(
dev
,
state
);
}
else
if
(
pm
->
clock_set
)
{
nouveau_pm_clock_set
(
dev
,
perflvl
,
PLL_CORE
,
perflvl
->
core
);
nouveau_pm_clock_set
(
dev
,
perflvl
,
PLL_SHADER
,
perflvl
->
shader
);
nouveau_pm_clock_set
(
dev
,
perflvl
,
PLL_MEMORY
,
perflvl
->
memory
);
nouveau_pm_clock_set
(
dev
,
perflvl
,
PLL_VDEC
,
perflvl
->
vdec
);
}
pm
->
cur
=
perflvl
;
pm
->
cur
=
perflvl
;
return
0
;
return
0
;
...
@@ -202,28 +175,9 @@ nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)
...
@@ -202,28 +175,9 @@ nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)
memset
(
perflvl
,
0
,
sizeof
(
*
perflvl
));
memset
(
perflvl
,
0
,
sizeof
(
*
perflvl
));
if
(
pm
->
clocks_get
)
{
ret
=
pm
->
clocks_get
(
dev
,
perflvl
);
ret
=
pm
->
clocks_get
(
dev
,
perflvl
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
}
else
if
(
pm
->
clock_get
)
{
ret
=
pm
->
clock_get
(
dev
,
PLL_CORE
);
if
(
ret
>
0
)
perflvl
->
core
=
ret
;
ret
=
pm
->
clock_get
(
dev
,
PLL_MEMORY
);
if
(
ret
>
0
)
perflvl
->
memory
=
ret
;
ret
=
pm
->
clock_get
(
dev
,
PLL_SHADER
);
if
(
ret
>
0
)
perflvl
->
shader
=
ret
;
ret
=
pm
->
clock_get
(
dev
,
PLL_VDEC
);
if
(
ret
>
0
)
perflvl
->
vdec
=
ret
;
}
if
(
pm
->
voltage
.
supported
&&
pm
->
voltage_get
)
{
if
(
pm
->
voltage
.
supported
&&
pm
->
voltage_get
)
{
ret
=
pm
->
voltage_get
(
dev
);
ret
=
pm
->
voltage_get
(
dev
);
...
...
drivers/gpu/drm/nouveau/nv04_timer.c
View file @
ff2b6c6e
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#include "drm.h"
#include "drm.h"
#include "nouveau_drv.h"
#include "nouveau_drv.h"
#include "nouveau_drm.h"
#include "nouveau_drm.h"
#include "nouveau_hw.h"
int
int
nv04_timer_init
(
struct
drm_device
*
dev
)
nv04_timer_init
(
struct
drm_device
*
dev
)
...
@@ -17,7 +18,7 @@ nv04_timer_init(struct drm_device *dev)
...
@@ -17,7 +18,7 @@ nv04_timer_init(struct drm_device *dev)
/* determine base clock for timer source */
/* determine base clock for timer source */
if
(
dev_priv
->
chipset
<
0x40
)
{
if
(
dev_priv
->
chipset
<
0x40
)
{
n
=
dev_priv
->
engine
.
pm
.
clock_get
(
dev
,
PLL_CORE
);
n
=
nouveau_hw_get_clock
(
dev
,
PLL_CORE
);
}
else
}
else
if
(
dev_priv
->
chipset
==
0x40
)
{
if
(
dev_priv
->
chipset
==
0x40
)
{
/*XXX: figure this out */
/*XXX: figure this out */
...
...
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