Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
7ada785f
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7ada785f
编写于
3月 05, 2013
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau: pass generic subdev to calculation routines
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
aca78e91
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
17 addition
and
18 deletion
+17
-18
drivers/gpu/drm/nouveau/core/subdev/clock/nv04.c
drivers/gpu/drm/nouveau/core/subdev/clock/nv04.c
+1
-1
drivers/gpu/drm/nouveau/core/subdev/clock/nv50.c
drivers/gpu/drm/nouveau/core/subdev/clock/nv50.c
+1
-1
drivers/gpu/drm/nouveau/core/subdev/clock/nva3.c
drivers/gpu/drm/nouveau/core/subdev/clock/nva3.c
+2
-2
drivers/gpu/drm/nouveau/core/subdev/clock/nvc0.c
drivers/gpu/drm/nouveau/core/subdev/clock/nvc0.c
+1
-1
drivers/gpu/drm/nouveau/core/subdev/clock/pll.h
drivers/gpu/drm/nouveau/core/subdev/clock/pll.h
+2
-2
drivers/gpu/drm/nouveau/core/subdev/clock/pllnv04.c
drivers/gpu/drm/nouveau/core/subdev/clock/pllnv04.c
+8
-9
drivers/gpu/drm/nouveau/core/subdev/clock/pllnva3.c
drivers/gpu/drm/nouveau/core/subdev/clock/pllnva3.c
+2
-2
未找到文件。
drivers/gpu/drm/nouveau/core/subdev/clock/nv04.c
浏览文件 @
7ada785f
...
...
@@ -297,7 +297,7 @@ nv04_clock_pll_calc(struct nouveau_clock *clock, struct nvbios_pll *info,
int
clk
,
struct
nouveau_pll_vals
*
pv
)
{
int
N1
,
M1
,
N2
,
M2
,
P
;
int
ret
=
nv04_pll_calc
(
clock
,
info
,
clk
,
&
N1
,
&
M1
,
&
N2
,
&
M2
,
&
P
);
int
ret
=
nv04_pll_calc
(
nv_subdev
(
clock
)
,
info
,
clk
,
&
N1
,
&
M1
,
&
N2
,
&
M2
,
&
P
);
if
(
ret
)
{
pv
->
refclk
=
info
->
refclk
;
pv
->
N1
=
N1
;
...
...
drivers/gpu/drm/nouveau/core/subdev/clock/nv50.c
浏览文件 @
7ada785f
...
...
@@ -47,7 +47,7 @@ nv50_clock_pll_set(struct nouveau_clock *clk, u32 type, u32 freq)
return
ret
;
}
ret
=
nv04_pll_calc
(
clk
,
&
info
,
freq
,
&
N1
,
&
M1
,
&
N2
,
&
M2
,
&
P
);
ret
=
nv04_pll_calc
(
nv_subdev
(
clk
)
,
&
info
,
freq
,
&
N1
,
&
M1
,
&
N2
,
&
M2
,
&
P
);
if
(
!
ret
)
{
nv_error
(
clk
,
"failed pll calculation
\n
"
);
return
ret
;
...
...
drivers/gpu/drm/nouveau/core/subdev/clock/nva3.c
浏览文件 @
7ada785f
...
...
@@ -45,7 +45,7 @@ nva3_clock_pll_set(struct nouveau_clock *clk, u32 type, u32 freq)
if
(
ret
)
return
ret
;
ret
=
nva3_pll_calc
(
clk
,
&
info
,
freq
,
&
N
,
&
fN
,
&
M
,
&
P
);
ret
=
nva3_pll_calc
(
nv_subdev
(
clk
)
,
&
info
,
freq
,
&
N
,
&
fN
,
&
M
,
&
P
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -72,7 +72,7 @@ nva3_clock_pll_calc(struct nouveau_clock *clock, struct nvbios_pll *info,
{
int
ret
,
N
,
M
,
P
;
ret
=
nva3_pll_calc
(
clock
,
info
,
clk
,
&
N
,
NULL
,
&
M
,
&
P
);
ret
=
nva3_pll_calc
(
nv_subdev
(
clock
)
,
info
,
clk
,
&
N
,
NULL
,
&
M
,
&
P
);
if
(
ret
>
0
)
{
pv
->
refclk
=
info
->
refclk
;
...
...
drivers/gpu/drm/nouveau/core/subdev/clock/nvc0.c
浏览文件 @
7ada785f
...
...
@@ -45,7 +45,7 @@ nvc0_clock_pll_set(struct nouveau_clock *clk, u32 type, u32 freq)
if
(
ret
)
return
ret
;
ret
=
nva3_pll_calc
(
clk
,
&
info
,
freq
,
&
N
,
&
fN
,
&
M
,
&
P
);
ret
=
nva3_pll_calc
(
nv_subdev
(
clk
)
,
&
info
,
freq
,
&
N
,
&
fN
,
&
M
,
&
P
);
if
(
ret
<
0
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/core/subdev/clock/pll.h
浏览文件 @
7ada785f
#ifndef __NOUVEAU_PLL_H__
#define __NOUVEAU_PLL_H__
int
nv04_pll_calc
(
struct
nouveau_
clock
*
,
struct
nvbios_pll
*
,
u32
freq
,
int
nv04_pll_calc
(
struct
nouveau_
subdev
*
,
struct
nvbios_pll
*
,
u32
freq
,
int
*
N1
,
int
*
M1
,
int
*
N2
,
int
*
M2
,
int
*
P
);
int
nva3_pll_calc
(
struct
nouveau_
clock
*
,
struct
nvbios_pll
*
,
u32
freq
,
int
nva3_pll_calc
(
struct
nouveau_
subdev
*
,
struct
nvbios_pll
*
,
u32
freq
,
int
*
N
,
int
*
fN
,
int
*
M
,
int
*
P
);
#endif
drivers/gpu/drm/nouveau/core/subdev/clock/pllnv04.c
浏览文件 @
7ada785f
...
...
@@ -21,14 +21,13 @@
* SOFTWARE.
*/
#include <subdev/clock.h>
#include <subdev/bios.h>
#include <subdev/bios/pll.h>
#include "pll.h"
static
int
getMNP_single
(
struct
nouveau_
clock
*
clock
,
struct
nvbios_pll
*
info
,
int
clk
,
getMNP_single
(
struct
nouveau_
subdev
*
subdev
,
struct
nvbios_pll
*
info
,
int
clk
,
int
*
pN
,
int
*
pM
,
int
*
pP
)
{
/* Find M, N and P for a single stage PLL
...
...
@@ -39,7 +38,7 @@ getMNP_single(struct nouveau_clock *clock, struct nvbios_pll *info, int clk,
* "clk" parameter in kHz
* returns calculated clock
*/
int
cv
=
nouveau_bios
(
clock
)
->
version
.
chip
;
int
cv
=
nouveau_bios
(
subdev
)
->
version
.
chip
;
int
minvco
=
info
->
vco1
.
min_freq
,
maxvco
=
info
->
vco1
.
max_freq
;
int
minM
=
info
->
vco1
.
min_m
,
maxM
=
info
->
vco1
.
max_m
;
int
minN
=
info
->
vco1
.
min_n
,
maxN
=
info
->
vco1
.
max_n
;
...
...
@@ -124,7 +123,7 @@ getMNP_single(struct nouveau_clock *clock, struct nvbios_pll *info, int clk,
}
static
int
getMNP_double
(
struct
nouveau_
clock
*
clock
,
struct
nvbios_pll
*
info
,
int
clk
,
getMNP_double
(
struct
nouveau_
subdev
*
subdev
,
struct
nvbios_pll
*
info
,
int
clk
,
int
*
pN1
,
int
*
pM1
,
int
*
pN2
,
int
*
pM2
,
int
*
pP
)
{
/* Find M, N and P for a two stage PLL
...
...
@@ -135,7 +134,7 @@ getMNP_double(struct nouveau_clock *clock, struct nvbios_pll *info, int clk,
* "clk" parameter in kHz
* returns calculated clock
*/
int
chip_version
=
nouveau_bios
(
clock
)
->
version
.
chip
;
int
chip_version
=
nouveau_bios
(
subdev
)
->
version
.
chip
;
int
minvco1
=
info
->
vco1
.
min_freq
,
maxvco1
=
info
->
vco1
.
max_freq
;
int
minvco2
=
info
->
vco2
.
min_freq
,
maxvco2
=
info
->
vco2
.
max_freq
;
int
minU1
=
info
->
vco1
.
min_inputfreq
,
minU2
=
info
->
vco2
.
min_inputfreq
;
...
...
@@ -223,20 +222,20 @@ getMNP_double(struct nouveau_clock *clock, struct nvbios_pll *info, int clk,
}
int
nv04_pll_calc
(
struct
nouveau_
clock
*
clk
,
struct
nvbios_pll
*
info
,
u32
freq
,
nv04_pll_calc
(
struct
nouveau_
subdev
*
subdev
,
struct
nvbios_pll
*
info
,
u32
freq
,
int
*
N1
,
int
*
M1
,
int
*
N2
,
int
*
M2
,
int
*
P
)
{
int
ret
;
if
(
!
info
->
vco2
.
max_freq
)
{
ret
=
getMNP_single
(
clk
,
info
,
freq
,
N1
,
M1
,
P
);
ret
=
getMNP_single
(
subdev
,
info
,
freq
,
N1
,
M1
,
P
);
*
N2
=
1
;
*
M2
=
1
;
}
else
{
ret
=
getMNP_double
(
clk
,
info
,
freq
,
N1
,
M1
,
N2
,
M2
,
P
);
ret
=
getMNP_double
(
subdev
,
info
,
freq
,
N1
,
M1
,
N2
,
M2
,
P
);
}
if
(
!
ret
)
nv_error
(
clk
,
"unable to compute acceptable pll values
\n
"
);
nv_error
(
subdev
,
"unable to compute acceptable pll values
\n
"
);
return
ret
;
}
drivers/gpu/drm/nouveau/core/subdev/clock/pllnva3.c
浏览文件 @
7ada785f
...
...
@@ -29,7 +29,7 @@
#include "pll.h"
int
nva3_pll_calc
(
struct
nouveau_
clock
*
clock
,
struct
nvbios_pll
*
info
,
nva3_pll_calc
(
struct
nouveau_
subdev
*
subdev
,
struct
nvbios_pll
*
info
,
u32
freq
,
int
*
pN
,
int
*
pfN
,
int
*
pM
,
int
*
P
)
{
u32
best_err
=
~
0
,
err
;
...
...
@@ -72,7 +72,7 @@ nva3_pll_calc(struct nouveau_clock *clock, struct nvbios_pll *info,
}
if
(
unlikely
(
best_err
==
~
0
))
{
nv_error
(
clock
,
"unable to find matching pll values
\n
"
);
nv_error
(
subdev
,
"unable to find matching pll values
\n
"
);
return
-
EINVAL
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录