Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
58786017
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看板
提交
58786017
编写于
11月 18, 2016
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/bios/boost: pointers are 32-bit
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
ed828666
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
23 deletion
+23
-23
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h
+6
-6
drivers/gpu/drm/nouveau/nvkm/subdev/bios/boost.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/boost.c
+15
-15
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
+2
-2
未找到文件。
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h
浏览文件 @
58786017
#ifndef __NVBIOS_BOOST_H__
#ifndef __NVBIOS_BOOST_H__
#define __NVBIOS_BOOST_H__
#define __NVBIOS_BOOST_H__
u
16
nvbios_boostTe
(
struct
nvkm_bios
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
);
u
32
nvbios_boostTe
(
struct
nvkm_bios
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
);
struct
nvbios_boostE
{
struct
nvbios_boostE
{
u8
pstate
;
u8
pstate
;
...
@@ -8,10 +8,10 @@ struct nvbios_boostE {
...
@@ -8,10 +8,10 @@ struct nvbios_boostE {
u32
max
;
u32
max
;
};
};
u
16
nvbios_boostEe
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
,
u8
*
,
u8
*
,
u8
*
);
u
32
nvbios_boostEe
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
,
u8
*
,
u8
*
,
u8
*
);
u
16
nvbios_boostEp
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u
32
nvbios_boostEp
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
struct
nvbios_boostE
*
);
struct
nvbios_boostE
*
);
u
16
nvbios_boostEm
(
struct
nvkm_bios
*
,
u8
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u
32
nvbios_boostEm
(
struct
nvkm_bios
*
,
u8
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
struct
nvbios_boostE
*
);
struct
nvbios_boostE
*
);
struct
nvbios_boostS
{
struct
nvbios_boostS
{
...
@@ -21,7 +21,7 @@ struct nvbios_boostS {
...
@@ -21,7 +21,7 @@ struct nvbios_boostS {
u32
max
;
u32
max
;
};
};
u
16
nvbios_boostSe
(
struct
nvkm_bios
*
,
int
,
u16
,
u8
*
,
u8
*
,
u8
,
u8
);
u
32
nvbios_boostSe
(
struct
nvkm_bios
*
,
int
,
u32
,
u8
*
,
u8
*
,
u8
,
u8
);
u
16
nvbios_boostSp
(
struct
nvkm_bios
*
,
int
,
u16
,
u8
*
,
u8
*
,
u8
,
u8
,
u
32
nvbios_boostSp
(
struct
nvkm_bios
*
,
int
,
u32
,
u8
*
,
u8
*
,
u8
,
u8
,
struct
nvbios_boostS
*
);
struct
nvbios_boostS
*
);
#endif
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/bios/boost.c
浏览文件 @
58786017
...
@@ -25,16 +25,16 @@
...
@@ -25,16 +25,16 @@
#include <subdev/bios/bit.h>
#include <subdev/bios/bit.h>
#include <subdev/bios/boost.h>
#include <subdev/bios/boost.h>
u
16
u
32
nvbios_boostTe
(
struct
nvkm_bios
*
bios
,
nvbios_boostTe
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u8
*
snr
,
u8
*
ssz
)
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u8
*
snr
,
u8
*
ssz
)
{
{
struct
bit_entry
bit_P
;
struct
bit_entry
bit_P
;
u
16
boost
=
0x000
0
;
u
32
boost
=
0
;
if
(
!
bit_entry
(
bios
,
'P'
,
&
bit_P
))
{
if
(
!
bit_entry
(
bios
,
'P'
,
&
bit_P
))
{
if
(
bit_P
.
version
==
2
)
if
(
bit_P
.
version
==
2
)
boost
=
nvbios_rd
16
(
bios
,
bit_P
.
offset
+
0x30
);
boost
=
nvbios_rd
32
(
bios
,
bit_P
.
offset
+
0x30
);
if
(
boost
)
{
if
(
boost
)
{
*
ver
=
nvbios_rd08
(
bios
,
boost
+
0
);
*
ver
=
nvbios_rd08
(
bios
,
boost
+
0
);
...
@@ -52,15 +52,15 @@ nvbios_boostTe(struct nvkm_bios *bios,
...
@@ -52,15 +52,15 @@ nvbios_boostTe(struct nvkm_bios *bios,
}
}
}
}
return
0
x0000
;
return
0
;
}
}
u
16
u
32
nvbios_boostEe
(
struct
nvkm_bios
*
bios
,
int
idx
,
nvbios_boostEe
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
{
{
u8
snr
,
ssz
;
u8
snr
,
ssz
;
u
16
data
=
nvbios_boostTe
(
bios
,
ver
,
hdr
,
cnt
,
len
,
&
snr
,
&
ssz
);
u
32
data
=
nvbios_boostTe
(
bios
,
ver
,
hdr
,
cnt
,
len
,
&
snr
,
&
ssz
);
if
(
data
&&
idx
<
*
cnt
)
{
if
(
data
&&
idx
<
*
cnt
)
{
data
=
data
+
*
hdr
+
(
idx
*
(
*
len
+
(
snr
*
ssz
)));
data
=
data
+
*
hdr
+
(
idx
*
(
*
len
+
(
snr
*
ssz
)));
*
hdr
=
*
len
;
*
hdr
=
*
len
;
...
@@ -68,14 +68,14 @@ nvbios_boostEe(struct nvkm_bios *bios, int idx,
...
@@ -68,14 +68,14 @@ nvbios_boostEe(struct nvkm_bios *bios, int idx,
*
len
=
ssz
;
*
len
=
ssz
;
return
data
;
return
data
;
}
}
return
0
x0000
;
return
0
;
}
}
u
16
u
32
nvbios_boostEp
(
struct
nvkm_bios
*
bios
,
int
idx
,
nvbios_boostEp
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_boostE
*
info
)
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_boostE
*
info
)
{
{
u
16
data
=
nvbios_boostEe
(
bios
,
idx
,
ver
,
hdr
,
cnt
,
len
);
u
32
data
=
nvbios_boostEe
(
bios
,
idx
,
ver
,
hdr
,
cnt
,
len
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
memset
(
info
,
0x00
,
sizeof
(
*
info
));
if
(
data
)
{
if
(
data
)
{
info
->
pstate
=
(
nvbios_rd16
(
bios
,
data
+
0x00
)
&
0x01e0
)
>>
5
;
info
->
pstate
=
(
nvbios_rd16
(
bios
,
data
+
0x00
)
&
0x01e0
)
>>
5
;
...
@@ -85,7 +85,7 @@ nvbios_boostEp(struct nvkm_bios *bios, int idx,
...
@@ -85,7 +85,7 @@ nvbios_boostEp(struct nvkm_bios *bios, int idx,
return
data
;
return
data
;
}
}
u
16
u
32
nvbios_boostEm
(
struct
nvkm_bios
*
bios
,
u8
pstate
,
nvbios_boostEm
(
struct
nvkm_bios
*
bios
,
u8
pstate
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_boostE
*
info
)
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_boostE
*
info
)
{
{
...
@@ -97,21 +97,21 @@ nvbios_boostEm(struct nvkm_bios *bios, u8 pstate,
...
@@ -97,21 +97,21 @@ nvbios_boostEm(struct nvkm_bios *bios, u8 pstate,
return
data
;
return
data
;
}
}
u
16
u
32
nvbios_boostSe
(
struct
nvkm_bios
*
bios
,
int
idx
,
nvbios_boostSe
(
struct
nvkm_bios
*
bios
,
int
idx
,
u
16
data
,
u8
*
ver
,
u8
*
hdr
,
u8
cnt
,
u8
len
)
u
32
data
,
u8
*
ver
,
u8
*
hdr
,
u8
cnt
,
u8
len
)
{
{
if
(
data
&&
idx
<
cnt
)
{
if
(
data
&&
idx
<
cnt
)
{
data
=
data
+
*
hdr
+
(
idx
*
len
);
data
=
data
+
*
hdr
+
(
idx
*
len
);
*
hdr
=
len
;
*
hdr
=
len
;
return
data
;
return
data
;
}
}
return
0
x0000
;
return
0
;
}
}
u
16
u
32
nvbios_boostSp
(
struct
nvkm_bios
*
bios
,
int
idx
,
nvbios_boostSp
(
struct
nvkm_bios
*
bios
,
int
idx
,
u
16
data
,
u8
*
ver
,
u8
*
hdr
,
u8
cnt
,
u8
len
,
u
32
data
,
u8
*
ver
,
u8
*
hdr
,
u8
cnt
,
u8
len
,
struct
nvbios_boostS
*
info
)
struct
nvbios_boostS
*
info
)
{
{
data
=
nvbios_boostSe
(
bios
,
idx
,
data
,
ver
,
hdr
,
cnt
,
len
);
data
=
nvbios_boostSe
(
bios
,
idx
,
data
,
ver
,
hdr
,
cnt
,
len
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
浏览文件 @
58786017
...
@@ -44,13 +44,13 @@ nvkm_clk_adjust(struct nvkm_clk *clk, bool adjust,
...
@@ -44,13 +44,13 @@ nvkm_clk_adjust(struct nvkm_clk *clk, bool adjust,
struct
nvkm_bios
*
bios
=
clk
->
subdev
.
device
->
bios
;
struct
nvkm_bios
*
bios
=
clk
->
subdev
.
device
->
bios
;
struct
nvbios_boostE
boostE
;
struct
nvbios_boostE
boostE
;
u8
ver
,
hdr
,
cnt
,
len
;
u8
ver
,
hdr
,
cnt
,
len
;
u
16
data
;
u
32
data
;
data
=
nvbios_boostEm
(
bios
,
pstate
,
&
ver
,
&
hdr
,
&
cnt
,
&
len
,
&
boostE
);
data
=
nvbios_boostEm
(
bios
,
pstate
,
&
ver
,
&
hdr
,
&
cnt
,
&
len
,
&
boostE
);
if
(
data
)
{
if
(
data
)
{
struct
nvbios_boostS
boostS
;
struct
nvbios_boostS
boostS
;
u8
idx
=
0
,
sver
,
shdr
;
u8
idx
=
0
,
sver
,
shdr
;
u
16
subd
;
u
32
subd
;
input
=
max
(
boostE
.
min
,
input
);
input
=
max
(
boostE
.
min
,
input
);
input
=
min
(
boostE
.
max
,
input
);
input
=
min
(
boostE
.
max
,
input
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录