Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
7e24c114
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看板
提交
7e24c114
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/fuse: remove object accessor functions
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
7f5f518f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
27 addition
and
11 deletion
+27
-11
drivers/gpu/drm/nouveau/include/nvkm/subdev/fuse.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/fuse.h
+5
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gf100.c
+7
-3
drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c
drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c
+6
-3
drivers/gpu/drm/nouveau/nvkm/subdev/fuse/nv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/fuse/nv50.c
+7
-3
drivers/gpu/drm/nouveau/nvkm/subdev/therm/g84.c
drivers/gpu/drm/nouveau/nvkm/subdev/therm/g84.c
+2
-2
未找到文件。
drivers/gpu/drm/nouveau/include/nvkm/subdev/fuse.h
浏览文件 @
7e24c114
...
...
@@ -5,6 +5,11 @@
struct
nvkm_fuse
{
struct
nvkm_subdev
subdev
;
const
struct
nvkm_fuse_func
*
func
;
};
struct
nvkm_fuse_func
{
u32
(
*
read
)(
struct
nvkm_fuse
*
,
u32
addr
);
};
static
inline
struct
nvkm_fuse
*
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gf100.c
浏览文件 @
7e24c114
...
...
@@ -30,9 +30,9 @@ struct gf100_fuse {
};
static
u32
gf100_fuse_r
d32
(
struct
nvkm_object
*
object
,
u64
addr
)
gf100_fuse_r
ead
(
struct
nvkm_fuse
*
obj
,
u32
addr
)
{
struct
gf100_fuse
*
fuse
=
(
void
*
)
object
;
struct
gf100_fuse
*
fuse
=
container_of
(
obj
,
typeof
(
*
fuse
),
base
)
;
struct
nvkm_device
*
device
=
fuse
->
base
.
subdev
.
device
;
unsigned
long
flags
;
u32
fuse_enable
,
unk
,
val
;
...
...
@@ -48,6 +48,10 @@ gf100_fuse_rd32(struct nvkm_object *object, u64 addr)
return
val
;
}
static
const
struct
nvkm_fuse_func
gf100_fuse_func
=
{
.
read
=
gf100_fuse_read
,
};
static
int
gf100_fuse_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
...
...
@@ -63,6 +67,7 @@ gf100_fuse_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
spin_lock_init
(
&
fuse
->
fuse_enable_lock
);
fuse
->
base
.
func
=
&
gf100_fuse_func
;
return
0
;
}
...
...
@@ -74,6 +79,5 @@ gf100_fuse_oclass = {
.
dtor
=
_nvkm_fuse_dtor
,
.
init
=
_nvkm_fuse_init
,
.
fini
=
_nvkm_fuse_fini
,
.
rd32
=
gf100_fuse_rd32
,
},
};
drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c
浏览文件 @
7e24c114
...
...
@@ -24,13 +24,16 @@
#include "priv.h"
static
u32
gm107_fuse_r
d32
(
struct
nvkm_object
*
object
,
u64
addr
)
gm107_fuse_r
ead
(
struct
nvkm_fuse
*
fuse
,
u32
addr
)
{
struct
nvkm_fuse
*
fuse
=
(
void
*
)
object
;
struct
nvkm_device
*
device
=
fuse
->
subdev
.
device
;
return
nvkm_rd32
(
device
,
0x21100
+
addr
);
}
static
const
struct
nvkm_fuse_func
gm107_fuse_func
=
{
.
read
=
gm107_fuse_read
,
};
static
int
gm107_fuse_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
...
...
@@ -43,6 +46,7 @@ gm107_fuse_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
ret
=
nvkm_fuse_create
(
parent
,
engine
,
oclass
,
&
fuse
);
*
pobject
=
nv_object
(
fuse
);
fuse
->
func
=
&
gm107_fuse_func
;
return
ret
;
}
...
...
@@ -54,6 +58,5 @@ gm107_fuse_oclass = {
.
dtor
=
_nvkm_fuse_dtor
,
.
init
=
_nvkm_fuse_init
,
.
fini
=
_nvkm_fuse_fini
,
.
rd32
=
gm107_fuse_rd32
,
},
};
drivers/gpu/drm/nouveau/nvkm/subdev/fuse/nv50.c
浏览文件 @
7e24c114
...
...
@@ -30,9 +30,9 @@ struct nv50_fuse {
};
static
u32
nv50_fuse_r
d32
(
struct
nvkm_object
*
object
,
u64
addr
)
nv50_fuse_r
ead
(
struct
nvkm_fuse
*
obj
,
u32
addr
)
{
struct
nv50_fuse
*
fuse
=
(
void
*
)
object
;
struct
nv50_fuse
*
fuse
=
container_of
(
obj
,
typeof
(
*
fuse
),
base
)
;
struct
nvkm_device
*
device
=
fuse
->
base
.
subdev
.
device
;
unsigned
long
flags
;
u32
fuse_enable
,
val
;
...
...
@@ -46,6 +46,10 @@ nv50_fuse_rd32(struct nvkm_object *object, u64 addr)
return
val
;
}
static
const
struct
nvkm_fuse_func
nv50_fuse_func
=
{
.
read
=
&
nv50_fuse_read
,
};
static
int
nv50_fuse_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
...
...
@@ -61,6 +65,7 @@ nv50_fuse_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
spin_lock_init
(
&
fuse
->
fuse_enable_lock
);
fuse
->
base
.
func
=
&
nv50_fuse_func
;
return
0
;
}
...
...
@@ -72,6 +77,5 @@ nv50_fuse_oclass = {
.
dtor
=
_nvkm_fuse_dtor
,
.
init
=
_nvkm_fuse_init
,
.
fini
=
_nvkm_fuse_fini
,
.
rd32
=
nv50_fuse_rd32
,
},
};
drivers/gpu/drm/nouveau/nvkm/subdev/therm/g84.c
浏览文件 @
7e24c114
...
...
@@ -32,7 +32,7 @@ g84_temp_get(struct nvkm_therm *therm)
struct
nvkm_device
*
device
=
therm
->
subdev
.
device
;
struct
nvkm_fuse
*
fuse
=
nvkm_fuse
(
therm
);
if
(
nv_ro32
(
fuse
,
0x1a8
)
==
1
)
if
(
fuse
->
func
->
read
(
fuse
,
0x1a8
)
==
1
)
return
nvkm_rd32
(
device
,
0x20400
);
else
return
-
ENODEV
;
...
...
@@ -45,7 +45,7 @@ g84_sensor_setup(struct nvkm_therm *therm)
struct
nvkm_fuse
*
fuse
=
nvkm_fuse
(
therm
);
/* enable temperature reading for cards with insane defaults */
if
(
nv_ro32
(
fuse
,
0x1a8
)
==
1
)
{
if
(
fuse
->
func
->
read
(
fuse
,
0x1a8
)
==
1
)
{
nvkm_mask
(
device
,
0x20008
,
0x80008000
,
0x80000000
);
nvkm_mask
(
device
,
0x2000c
,
0x80000003
,
0x00000000
);
mdelay
(
20
);
/* wait for the temperature to stabilize */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录