Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
01f349fc
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
01f349fc
编写于
11月 01, 2017
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/fifo/gf100-: use new interfaces for vmm operations
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
8c967c55
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
28 addition
and
36 deletion
+28
-36
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changf100.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changf100.h
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
+6
-6
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+6
-6
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c
+6
-10
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c
+6
-10
未找到文件。
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changf100.h
浏览文件 @
01f349fc
...
@@ -13,7 +13,7 @@ struct gf100_fifo_chan {
...
@@ -13,7 +13,7 @@ struct gf100_fifo_chan {
struct
{
struct
{
struct
nvkm_gpuobj
*
inst
;
struct
nvkm_gpuobj
*
inst
;
struct
nvkm_vma
vma
;
struct
nvkm_vma
*
vma
;
}
engn
[
NVKM_SUBDEV_NR
];
}
engn
[
NVKM_SUBDEV_NR
];
};
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h
浏览文件 @
01f349fc
...
@@ -14,7 +14,7 @@ struct gk104_fifo_chan {
...
@@ -14,7 +14,7 @@ struct gk104_fifo_chan {
struct
{
struct
{
struct
nvkm_gpuobj
*
inst
;
struct
nvkm_gpuobj
*
inst
;
struct
nvkm_vma
vma
;
struct
nvkm_vma
*
vma
;
}
engn
[
NVKM_SUBDEV_NR
];
}
engn
[
NVKM_SUBDEV_NR
];
};
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
浏览文件 @
01f349fc
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
#include <core/enum.h>
#include <core/enum.h>
#include <core/gpuobj.h>
#include <core/gpuobj.h>
#include <subdev/bar.h>
#include <subdev/bar.h>
#include <subdev/fb.h>
#include <engine/sw.h>
#include <engine/sw.h>
#include <nvif/class.h>
#include <nvif/class.h>
...
@@ -586,12 +585,12 @@ gf100_fifo_oneinit(struct nvkm_fifo *base)
...
@@ -586,12 +585,12 @@ gf100_fifo_oneinit(struct nvkm_fifo *base)
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
nvkm_vm
_get
(
bar
,
nvkm_memory_size
(
fifo
->
user
.
mem
),
12
,
ret
=
nvkm_vm
m_get
(
bar
,
12
,
nvkm_memory_size
(
fifo
->
user
.
mem
)
,
NV_MEM_ACCESS_RW
,
&
fifo
->
user
.
bar
);
&
fifo
->
user
.
bar
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
nvkm_memory_map
(
fifo
->
user
.
mem
,
0
,
bar
,
&
fifo
->
user
.
bar
,
NULL
,
0
);
return
nvkm_memory_map
(
fifo
->
user
.
mem
,
0
,
bar
,
fifo
->
user
.
bar
,
NULL
,
0
);
}
}
static
void
static
void
...
@@ -630,7 +629,7 @@ gf100_fifo_init(struct nvkm_fifo *base)
...
@@ -630,7 +629,7 @@ gf100_fifo_init(struct nvkm_fifo *base)
}
}
nvkm_mask
(
device
,
0x002200
,
0x00000001
,
0x00000001
);
nvkm_mask
(
device
,
0x002200
,
0x00000001
,
0x00000001
);
nvkm_wr32
(
device
,
0x002254
,
0x10000000
|
fifo
->
user
.
bar
.
offset
>>
12
);
nvkm_wr32
(
device
,
0x002254
,
0x10000000
|
fifo
->
user
.
bar
->
addr
>>
12
);
nvkm_wr32
(
device
,
0x002100
,
0xffffffff
);
nvkm_wr32
(
device
,
0x002100
,
0xffffffff
);
nvkm_wr32
(
device
,
0x002140
,
0x7fffffff
);
nvkm_wr32
(
device
,
0x002140
,
0x7fffffff
);
...
@@ -641,7 +640,8 @@ static void *
...
@@ -641,7 +640,8 @@ static void *
gf100_fifo_dtor
(
struct
nvkm_fifo
*
base
)
gf100_fifo_dtor
(
struct
nvkm_fifo
*
base
)
{
{
struct
gf100_fifo
*
fifo
=
gf100_fifo
(
base
);
struct
gf100_fifo
*
fifo
=
gf100_fifo
(
base
);
nvkm_vm_put
(
&
fifo
->
user
.
bar
);
struct
nvkm_device
*
device
=
fifo
->
base
.
engine
.
subdev
.
device
;
nvkm_vmm_put
(
nvkm_bar_bar1_vmm
(
device
),
&
fifo
->
user
.
bar
);
nvkm_memory_unref
(
&
fifo
->
user
.
mem
);
nvkm_memory_unref
(
&
fifo
->
user
.
mem
);
nvkm_memory_unref
(
&
fifo
->
runlist
.
mem
[
0
]);
nvkm_memory_unref
(
&
fifo
->
runlist
.
mem
[
0
]);
nvkm_memory_unref
(
&
fifo
->
runlist
.
mem
[
1
]);
nvkm_memory_unref
(
&
fifo
->
runlist
.
mem
[
1
]);
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h
浏览文件 @
01f349fc
...
@@ -26,7 +26,7 @@ struct gf100_fifo {
...
@@ -26,7 +26,7 @@ struct gf100_fifo {
struct
{
struct
{
struct
nvkm_memory
*
mem
;
struct
nvkm_memory
*
mem
;
struct
nvkm_vma
bar
;
struct
nvkm_vma
*
bar
;
}
user
;
}
user
;
};
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
浏览文件 @
01f349fc
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include <core/client.h>
#include <core/client.h>
#include <core/gpuobj.h>
#include <core/gpuobj.h>
#include <subdev/bar.h>
#include <subdev/bar.h>
#include <subdev/fb.h>
#include <subdev/timer.h>
#include <subdev/timer.h>
#include <subdev/top.h>
#include <subdev/top.h>
#include <engine/sw.h>
#include <engine/sw.h>
...
@@ -836,12 +835,12 @@ gk104_fifo_oneinit(struct nvkm_fifo *base)
...
@@ -836,12 +835,12 @@ gk104_fifo_oneinit(struct nvkm_fifo *base)
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
nvkm_vm
_get
(
bar
,
nvkm_memory_size
(
fifo
->
user
.
mem
),
12
,
ret
=
nvkm_vm
m_get
(
bar
,
12
,
nvkm_memory_size
(
fifo
->
user
.
mem
)
,
NV_MEM_ACCESS_RW
,
&
fifo
->
user
.
bar
);
&
fifo
->
user
.
bar
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
nvkm_memory_map
(
fifo
->
user
.
mem
,
0
,
bar
,
&
fifo
->
user
.
bar
,
NULL
,
0
);
return
nvkm_memory_map
(
fifo
->
user
.
mem
,
0
,
bar
,
fifo
->
user
.
bar
,
NULL
,
0
);
}
}
static
void
static
void
...
@@ -867,7 +866,7 @@ gk104_fifo_init(struct nvkm_fifo *base)
...
@@ -867,7 +866,7 @@ gk104_fifo_init(struct nvkm_fifo *base)
nvkm_wr32
(
device
,
0x04014c
+
(
i
*
0x2000
),
0xffffffff
);
/* INTREN */
nvkm_wr32
(
device
,
0x04014c
+
(
i
*
0x2000
),
0xffffffff
);
/* INTREN */
}
}
nvkm_wr32
(
device
,
0x002254
,
0x10000000
|
fifo
->
user
.
bar
.
offset
>>
12
);
nvkm_wr32
(
device
,
0x002254
,
0x10000000
|
fifo
->
user
.
bar
->
addr
>>
12
);
nvkm_wr32
(
device
,
0x002100
,
0xffffffff
);
nvkm_wr32
(
device
,
0x002100
,
0xffffffff
);
nvkm_wr32
(
device
,
0x002140
,
0x7fffffff
);
nvkm_wr32
(
device
,
0x002140
,
0x7fffffff
);
...
@@ -877,9 +876,10 @@ static void *
...
@@ -877,9 +876,10 @@ static void *
gk104_fifo_dtor
(
struct
nvkm_fifo
*
base
)
gk104_fifo_dtor
(
struct
nvkm_fifo
*
base
)
{
{
struct
gk104_fifo
*
fifo
=
gk104_fifo
(
base
);
struct
gk104_fifo
*
fifo
=
gk104_fifo
(
base
);
struct
nvkm_device
*
device
=
fifo
->
base
.
engine
.
subdev
.
device
;
int
i
;
int
i
;
nvkm_vm
_put
(
&
fifo
->
user
.
bar
);
nvkm_vm
m_put
(
nvkm_bar_bar1_vmm
(
device
),
&
fifo
->
user
.
bar
);
nvkm_memory_unref
(
&
fifo
->
user
.
mem
);
nvkm_memory_unref
(
&
fifo
->
user
.
mem
);
for
(
i
=
0
;
i
<
fifo
->
runlist_nr
;
i
++
)
{
for
(
i
=
0
;
i
<
fifo
->
runlist_nr
;
i
++
)
{
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
浏览文件 @
01f349fc
...
@@ -37,7 +37,7 @@ struct gk104_fifo {
...
@@ -37,7 +37,7 @@ struct gk104_fifo {
struct
{
struct
{
struct
nvkm_memory
*
mem
;
struct
nvkm_memory
*
mem
;
struct
nvkm_vma
bar
;
struct
nvkm_vma
*
bar
;
}
user
;
}
user
;
};
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c
浏览文件 @
01f349fc
...
@@ -111,7 +111,7 @@ gf100_fifo_gpfifo_engine_init(struct nvkm_fifo_chan *base,
...
@@ -111,7 +111,7 @@ gf100_fifo_gpfifo_engine_init(struct nvkm_fifo_chan *base,
struct
nvkm_gpuobj
*
inst
=
chan
->
base
.
inst
;
struct
nvkm_gpuobj
*
inst
=
chan
->
base
.
inst
;
if
(
offset
)
{
if
(
offset
)
{
u64
addr
=
chan
->
engn
[
engine
->
subdev
.
index
].
vma
.
offset
;
u64
addr
=
chan
->
engn
[
engine
->
subdev
.
index
].
vma
->
addr
;
nvkm_kmap
(
inst
);
nvkm_kmap
(
inst
);
nvkm_wo32
(
inst
,
offset
+
0x00
,
lower_32_bits
(
addr
)
|
4
);
nvkm_wo32
(
inst
,
offset
+
0x00
,
lower_32_bits
(
addr
)
|
4
);
nvkm_wo32
(
inst
,
offset
+
0x04
,
upper_32_bits
(
addr
));
nvkm_wo32
(
inst
,
offset
+
0x04
,
upper_32_bits
(
addr
));
...
@@ -126,11 +126,7 @@ gf100_fifo_gpfifo_engine_dtor(struct nvkm_fifo_chan *base,
...
@@ -126,11 +126,7 @@ gf100_fifo_gpfifo_engine_dtor(struct nvkm_fifo_chan *base,
struct
nvkm_engine
*
engine
)
struct
nvkm_engine
*
engine
)
{
{
struct
gf100_fifo_chan
*
chan
=
gf100_fifo_chan
(
base
);
struct
gf100_fifo_chan
*
chan
=
gf100_fifo_chan
(
base
);
struct
nvkm_vma
*
vma
=
&
chan
->
engn
[
engine
->
subdev
.
index
].
vma
;
nvkm_vmm_put
(
chan
->
base
.
vmm
,
&
chan
->
engn
[
engine
->
subdev
.
index
].
vma
);
if
(
vma
->
vm
)
{
nvkm_vm_unmap
(
vma
);
nvkm_vm_put
(
vma
);
}
nvkm_gpuobj_del
(
&
chan
->
engn
[
engine
->
subdev
.
index
].
inst
);
nvkm_gpuobj_del
(
&
chan
->
engn
[
engine
->
subdev
.
index
].
inst
);
}
}
...
@@ -150,13 +146,13 @@ gf100_fifo_gpfifo_engine_ctor(struct nvkm_fifo_chan *base,
...
@@ -150,13 +146,13 @@ gf100_fifo_gpfifo_engine_ctor(struct nvkm_fifo_chan *base,
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
nvkm_vm
_get
(
chan
->
base
.
vmm
,
chan
->
engn
[
engn
].
inst
->
size
,
12
,
ret
=
nvkm_vm
m_get
(
chan
->
base
.
vmm
,
12
,
chan
->
engn
[
engn
].
inst
->
size
,
NV_MEM_ACCESS_RW
,
&
chan
->
engn
[
engn
].
vma
);
&
chan
->
engn
[
engn
].
vma
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
nvkm_memory_map
(
chan
->
engn
[
engn
].
inst
,
0
,
chan
->
base
.
vmm
,
return
nvkm_memory_map
(
chan
->
engn
[
engn
].
inst
,
0
,
chan
->
base
.
vmm
,
&
chan
->
engn
[
engn
].
vma
,
NULL
,
0
);
chan
->
engn
[
engn
].
vma
,
NULL
,
0
);
}
}
static
void
static
void
...
@@ -252,7 +248,7 @@ gf100_fifo_gpfifo_new(struct nvkm_fifo *base, const struct nvkm_oclass *oclass,
...
@@ -252,7 +248,7 @@ gf100_fifo_gpfifo_new(struct nvkm_fifo *base, const struct nvkm_oclass *oclass,
(
1ULL
<<
NVKM_ENGINE_MSPPP
)
|
(
1ULL
<<
NVKM_ENGINE_MSPPP
)
|
(
1ULL
<<
NVKM_ENGINE_MSVLD
)
|
(
1ULL
<<
NVKM_ENGINE_MSVLD
)
|
(
1ULL
<<
NVKM_ENGINE_SW
),
(
1ULL
<<
NVKM_ENGINE_SW
),
1
,
fifo
->
user
.
bar
.
offset
,
0x1000
,
1
,
fifo
->
user
.
bar
->
addr
,
0x1000
,
oclass
,
&
chan
->
base
);
oclass
,
&
chan
->
base
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c
浏览文件 @
01f349fc
...
@@ -117,7 +117,7 @@ gk104_fifo_gpfifo_engine_init(struct nvkm_fifo_chan *base,
...
@@ -117,7 +117,7 @@ gk104_fifo_gpfifo_engine_init(struct nvkm_fifo_chan *base,
u32
offset
=
gk104_fifo_gpfifo_engine_addr
(
engine
);
u32
offset
=
gk104_fifo_gpfifo_engine_addr
(
engine
);
if
(
offset
)
{
if
(
offset
)
{
u64
addr
=
chan
->
engn
[
engine
->
subdev
.
index
].
vma
.
offset
;
u64
addr
=
chan
->
engn
[
engine
->
subdev
.
index
].
vma
->
addr
;
u32
datalo
=
lower_32_bits
(
addr
)
|
0x00000004
;
u32
datalo
=
lower_32_bits
(
addr
)
|
0x00000004
;
u32
datahi
=
upper_32_bits
(
addr
);
u32
datahi
=
upper_32_bits
(
addr
);
nvkm_kmap
(
inst
);
nvkm_kmap
(
inst
);
...
@@ -138,11 +138,7 @@ gk104_fifo_gpfifo_engine_dtor(struct nvkm_fifo_chan *base,
...
@@ -138,11 +138,7 @@ gk104_fifo_gpfifo_engine_dtor(struct nvkm_fifo_chan *base,
struct
nvkm_engine
*
engine
)
struct
nvkm_engine
*
engine
)
{
{
struct
gk104_fifo_chan
*
chan
=
gk104_fifo_chan
(
base
);
struct
gk104_fifo_chan
*
chan
=
gk104_fifo_chan
(
base
);
struct
nvkm_vma
*
vma
=
&
chan
->
engn
[
engine
->
subdev
.
index
].
vma
;
nvkm_vmm_put
(
chan
->
base
.
vmm
,
&
chan
->
engn
[
engine
->
subdev
.
index
].
vma
);
if
(
vma
->
vm
)
{
nvkm_vm_unmap
(
vma
);
nvkm_vm_put
(
vma
);
}
nvkm_gpuobj_del
(
&
chan
->
engn
[
engine
->
subdev
.
index
].
inst
);
nvkm_gpuobj_del
(
&
chan
->
engn
[
engine
->
subdev
.
index
].
inst
);
}
}
...
@@ -162,13 +158,13 @@ gk104_fifo_gpfifo_engine_ctor(struct nvkm_fifo_chan *base,
...
@@ -162,13 +158,13 @@ gk104_fifo_gpfifo_engine_ctor(struct nvkm_fifo_chan *base,
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
nvkm_vm
_get
(
chan
->
base
.
vmm
,
chan
->
engn
[
engn
].
inst
->
size
,
12
,
ret
=
nvkm_vm
m_get
(
chan
->
base
.
vmm
,
12
,
chan
->
engn
[
engn
].
inst
->
size
,
NV_MEM_ACCESS_RW
,
&
chan
->
engn
[
engn
].
vma
);
&
chan
->
engn
[
engn
].
vma
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
nvkm_memory_map
(
chan
->
engn
[
engn
].
inst
,
0
,
chan
->
base
.
vmm
,
return
nvkm_memory_map
(
chan
->
engn
[
engn
].
inst
,
0
,
chan
->
base
.
vmm
,
&
chan
->
engn
[
engn
].
vma
,
NULL
,
0
);
chan
->
engn
[
engn
].
vma
,
NULL
,
0
);
}
}
static
void
static
void
...
@@ -291,7 +287,7 @@ gk104_fifo_gpfifo_new_(const struct gk104_fifo_chan_func *func,
...
@@ -291,7 +287,7 @@ gk104_fifo_gpfifo_new_(const struct gk104_fifo_chan_func *func,
ret
=
nvkm_fifo_chan_ctor
(
&
gk104_fifo_gpfifo_func
,
&
fifo
->
base
,
ret
=
nvkm_fifo_chan_ctor
(
&
gk104_fifo_gpfifo_func
,
&
fifo
->
base
,
0x1000
,
0x1000
,
true
,
vm
,
0
,
subdevs
,
0x1000
,
0x1000
,
true
,
vm
,
0
,
subdevs
,
1
,
fifo
->
user
.
bar
.
offset
,
0x200
,
1
,
fifo
->
user
.
bar
->
addr
,
0x200
,
oclass
,
&
chan
->
base
);
oclass
,
&
chan
->
base
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录