Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a4747426
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看板
提交
a4747426
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/imem: remove object accessor functions
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
7e24c114
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
40 addition
and
23 deletion
+40
-23
drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h
+7
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
+3
-3
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv40.c
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv40.c
+3
-3
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c
+14
-10
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c
+12
-6
未找到文件。
drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h
浏览文件 @
a4747426
...
...
@@ -26,6 +26,13 @@ struct nvkm_instmem {
u32
reserved
;
int
(
*
alloc
)(
struct
nvkm_instmem
*
,
struct
nvkm_object
*
,
u32
size
,
u32
align
,
struct
nvkm_object
**
);
const
struct
nvkm_instmem_func
*
func
;
};
struct
nvkm_instmem_func
{
u32
(
*
rd32
)(
struct
nvkm_instmem
*
,
u32
addr
);
void
(
*
wr32
)(
struct
nvkm_instmem
*
,
u32
addr
,
u32
data
);
};
static
inline
struct
nvkm_instmem
*
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c
浏览文件 @
a4747426
...
...
@@ -573,7 +573,7 @@ nv04_gr_mthd_bind_class(struct nvkm_object *object, u32 *args, u32 size)
{
struct
nvkm_instmem
*
imem
=
nvkm_instmem
(
object
);
u32
inst
=
*
(
u32
*
)
args
<<
4
;
return
nv_ro
32
(
imem
,
inst
);
return
imem
->
func
->
rd
32
(
imem
,
inst
);
}
static
int
...
...
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
浏览文件 @
a4747426
...
...
@@ -63,9 +63,9 @@ nv31_mpeg_mthd_dma(struct nvkm_object *object, u32 mthd, void *arg, u32 len)
struct
nvkm_device
*
device
=
mpeg
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_instmem
*
imem
=
device
->
imem
;
u32
inst
=
*
(
u32
*
)
arg
<<
4
;
u32
dma0
=
nv_ro
32
(
imem
,
inst
+
0
);
u32
dma1
=
nv_ro
32
(
imem
,
inst
+
4
);
u32
dma2
=
nv_ro
32
(
imem
,
inst
+
8
);
u32
dma0
=
imem
->
func
->
rd
32
(
imem
,
inst
+
0
);
u32
dma1
=
imem
->
func
->
rd
32
(
imem
,
inst
+
4
);
u32
dma2
=
imem
->
func
->
rd
32
(
imem
,
inst
+
8
);
u32
base
=
(
dma2
&
0xfffff000
)
|
(
dma0
>>
20
);
u32
size
=
dma1
+
1
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv40.c
浏览文件 @
a4747426
...
...
@@ -36,9 +36,9 @@ nv40_mpeg_mthd_dma(struct nvkm_object *object, u32 mthd, void *arg, u32 len)
struct
nvkm_device
*
device
=
mpeg
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_instmem
*
imem
=
device
->
imem
;
u32
inst
=
*
(
u32
*
)
arg
<<
4
;
u32
dma0
=
nv_ro
32
(
imem
,
inst
+
0
);
u32
dma1
=
nv_ro
32
(
imem
,
inst
+
4
);
u32
dma2
=
nv_ro
32
(
imem
,
inst
+
8
);
u32
dma0
=
imem
->
func
->
rd
32
(
imem
,
inst
+
0
);
u32
dma1
=
imem
->
func
->
rd
32
(
imem
,
inst
+
4
);
u32
dma2
=
imem
->
func
->
rd
32
(
imem
,
inst
+
8
);
u32
base
=
(
dma2
&
0xfffff000
)
|
(
dma0
>>
20
);
u32
size
=
dma1
+
1
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c
浏览文件 @
a4747426
...
...
@@ -32,17 +32,17 @@
static
u32
nv04_instobj_rd32
(
struct
nvkm_object
*
object
,
u64
addr
)
{
struct
nv
04_instmem
*
imem
=
(
void
*
)
nvkm_instmem
(
object
);
struct
nv
km_instmem
*
imem
=
nvkm_instmem
(
object
);
struct
nv04_instobj
*
node
=
(
void
*
)
object
;
return
nv_ro
32
(
imem
,
node
->
mem
->
offset
+
addr
);
return
imem
->
func
->
rd
32
(
imem
,
node
->
mem
->
offset
+
addr
);
}
static
void
nv04_instobj_wr32
(
struct
nvkm_object
*
object
,
u64
addr
,
u32
data
)
{
struct
nv
04_instmem
*
imem
=
(
void
*
)
nvkm_instmem
(
object
);
struct
nv
km_instmem
*
imem
=
nvkm_instmem
(
object
);
struct
nv04_instobj
*
node
=
(
void
*
)
object
;
nv_wo
32
(
imem
,
node
->
mem
->
offset
+
addr
,
data
);
imem
->
func
->
wr
32
(
imem
,
node
->
mem
->
offset
+
addr
,
data
);
}
static
void
...
...
@@ -103,16 +103,14 @@ nv04_instobj_oclass = {
*****************************************************************************/
static
u32
nv04_instmem_rd32
(
struct
nvkm_
object
*
object
,
u64
addr
)
nv04_instmem_rd32
(
struct
nvkm_
instmem
*
imem
,
u32
addr
)
{
struct
nvkm_instmem
*
imem
=
(
void
*
)
object
;
return
nvkm_rd32
(
imem
->
subdev
.
device
,
0x700000
+
addr
);
}
static
void
nv04_instmem_wr32
(
struct
nvkm_
object
*
object
,
u64
addr
,
u32
data
)
nv04_instmem_wr32
(
struct
nvkm_
instmem
*
imem
,
u32
addr
,
u32
data
)
{
struct
nvkm_instmem
*
imem
=
(
void
*
)
object
;
nvkm_wr32
(
imem
->
subdev
.
device
,
0x700000
+
addr
,
data
);
}
...
...
@@ -130,6 +128,12 @@ nv04_instmem_dtor(struct nvkm_object *object)
nvkm_instmem_destroy
(
&
imem
->
base
);
}
static
const
struct
nvkm_instmem_func
nv04_instmem_func
=
{
.
rd32
=
nv04_instmem_rd32
,
.
wr32
=
nv04_instmem_wr32
,
};
static
int
nv04_instmem_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
...
...
@@ -143,6 +147,8 @@ nv04_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
imem
->
base
.
func
=
&
nv04_instmem_func
;
/* PRAMIN aperture maps over the end of VRAM, reserve it */
imem
->
base
.
reserved
=
512
*
1024
;
...
...
@@ -184,8 +190,6 @@ nv04_instmem_oclass = &(struct nvkm_instmem_impl) {
.
dtor
=
nv04_instmem_dtor
,
.
init
=
_nvkm_instmem_init
,
.
fini
=
_nvkm_instmem_fini
,
.
rd32
=
nv04_instmem_rd32
,
.
wr32
=
nv04_instmem_wr32
,
},
.
instobj
=
&
nv04_instobj_oclass
.
base
,
}.
base
;
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c
浏览文件 @
a4747426
...
...
@@ -31,19 +31,25 @@
*****************************************************************************/
static
u32
nv40_instmem_rd32
(
struct
nvkm_
object
*
object
,
u64
addr
)
nv40_instmem_rd32
(
struct
nvkm_
instmem
*
obj
,
u32
addr
)
{
struct
nv04_instmem
*
imem
=
(
void
*
)
object
;
struct
nv04_instmem
*
imem
=
container_of
(
obj
,
typeof
(
*
imem
),
base
)
;
return
ioread32_native
(
imem
->
iomem
+
addr
);
}
static
void
nv40_instmem_wr32
(
struct
nvkm_
object
*
object
,
u64
addr
,
u32
data
)
nv40_instmem_wr32
(
struct
nvkm_
instmem
*
obj
,
u32
addr
,
u32
data
)
{
struct
nv04_instmem
*
imem
=
(
void
*
)
object
;
struct
nv04_instmem
*
imem
=
container_of
(
obj
,
typeof
(
*
imem
),
base
)
;
iowrite32_native
(
data
,
imem
->
iomem
+
addr
);
}
static
const
struct
nvkm_instmem_func
nv40_instmem_func
=
{
.
rd32
=
nv40_instmem_rd32
,
.
wr32
=
nv40_instmem_wr32
,
};
static
int
nv40_instmem_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
...
...
@@ -58,6 +64,8 @@ nv40_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
imem
->
base
.
func
=
&
nv40_instmem_func
;
/* map bar */
if
(
nv_device_resource_len
(
device
,
2
))
bar
=
2
;
...
...
@@ -129,8 +137,6 @@ nv40_instmem_oclass = &(struct nvkm_instmem_impl) {
.
dtor
=
nv04_instmem_dtor
,
.
init
=
_nvkm_instmem_init
,
.
fini
=
_nvkm_instmem_fini
,
.
rd32
=
nv40_instmem_rd32
,
.
wr32
=
nv40_instmem_wr32
,
},
.
instobj
=
&
nv04_instobj_oclass
.
base
,
}.
base
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录