Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
fc584e1a
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看板
提交
fc584e1a
编写于
11月 01, 2017
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/bar/nv50: initialise vmm with new interfaces
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
f9463a4b
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
19 addition
and
18 deletion
+19
-18
drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
+17
-16
drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h
drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h
+2
-2
未找到文件。
drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
浏览文件 @
fc584e1a
...
@@ -46,7 +46,7 @@ nv50_bar_flush(struct nvkm_bar *base)
...
@@ -46,7 +46,7 @@ nv50_bar_flush(struct nvkm_bar *base)
struct
nvkm_vmm
*
struct
nvkm_vmm
*
nv50_bar_bar1_vmm
(
struct
nvkm_bar
*
base
)
nv50_bar_bar1_vmm
(
struct
nvkm_bar
*
base
)
{
{
return
nv50_bar
(
base
)
->
bar1_vm
;
return
nv50_bar
(
base
)
->
bar1_vm
m
;
}
}
void
void
...
@@ -72,7 +72,7 @@ nv50_bar_bar1_init(struct nvkm_bar *base)
...
@@ -72,7 +72,7 @@ nv50_bar_bar1_init(struct nvkm_bar *base)
struct
nvkm_vmm
*
struct
nvkm_vmm
*
nv50_bar_bar2_vmm
(
struct
nvkm_bar
*
base
)
nv50_bar_bar2_vmm
(
struct
nvkm_bar
*
base
)
{
{
return
nv50_bar
(
base
)
->
bar2_vm
;
return
nv50_bar
(
base
)
->
bar2_vm
m
;
}
}
void
void
...
@@ -109,7 +109,6 @@ nv50_bar_oneinit(struct nvkm_bar *base)
...
@@ -109,7 +109,6 @@ nv50_bar_oneinit(struct nvkm_bar *base)
struct
nvkm_device
*
device
=
bar
->
base
.
subdev
.
device
;
struct
nvkm_device
*
device
=
bar
->
base
.
subdev
.
device
;
static
struct
lock_class_key
bar1_lock
;
static
struct
lock_class_key
bar1_lock
;
static
struct
lock_class_key
bar2_lock
;
static
struct
lock_class_key
bar2_lock
;
struct
nvkm_vm
*
vm
;
u64
start
,
limit
;
u64
start
,
limit
;
int
ret
;
int
ret
;
...
@@ -130,18 +129,19 @@ nv50_bar_oneinit(struct nvkm_bar *base)
...
@@ -130,18 +129,19 @@ nv50_bar_oneinit(struct nvkm_bar *base)
start
=
0x0100000000ULL
;
start
=
0x0100000000ULL
;
limit
=
start
+
device
->
func
->
resource_size
(
device
,
3
);
limit
=
start
+
device
->
func
->
resource_size
(
device
,
3
);
ret
=
nvkm_vm_new
(
device
,
start
,
limit
-
start
,
start
,
&
bar2_lock
,
&
vm
);
ret
=
nvkm_vmm_new
(
device
,
start
,
limit
--
-
start
,
NULL
,
0
,
&
bar2_lock
,
"bar2"
,
&
bar
->
bar2_vmm
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
atomic_inc
(
&
vm
->
engref
[
NVKM_SUBDEV_BAR
]);
atomic_inc
(
&
bar
->
bar2_vmm
->
engref
[
NVKM_SUBDEV_BAR
]);
bar
->
bar2_vmm
->
debug
=
bar
->
base
.
subdev
.
debug
;
ret
=
nvkm_vm
_boot
(
vm
,
limit
--
-
start
);
ret
=
nvkm_vm
m_boot
(
bar
->
bar2_vmm
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
nvkm_vm_ref
(
vm
,
&
bar
->
bar2_vm
,
bar
->
mem
->
memory
);
ret
=
nvkm_vmm_join
(
bar
->
bar2_vmm
,
bar
->
mem
->
memory
);
nvkm_vm_ref
(
NULL
,
&
vm
,
NULL
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -166,14 +166,13 @@ nv50_bar_oneinit(struct nvkm_bar *base)
...
@@ -166,14 +166,13 @@ nv50_bar_oneinit(struct nvkm_bar *base)
start
=
0x0000000000ULL
;
start
=
0x0000000000ULL
;
limit
=
start
+
device
->
func
->
resource_size
(
device
,
1
);
limit
=
start
+
device
->
func
->
resource_size
(
device
,
1
);
ret
=
nvkm_vm_new
(
device
,
start
,
limit
--
-
start
,
start
,
&
bar1_lock
,
&
vm
);
ret
=
nvkm_vmm_new
(
device
,
start
,
limit
--
-
start
,
NULL
,
0
,
if
(
ret
)
&
bar1_lock
,
"bar1"
,
&
bar
->
bar1_vmm
);
return
ret
;
atomic_inc
(
&
vm
->
engref
[
NVKM_SUBDEV_BAR
]);
atomic_inc
(
&
bar
->
bar1_vmm
->
engref
[
NVKM_SUBDEV_BAR
]);
bar
->
bar1_vmm
->
debug
=
bar
->
base
.
subdev
.
debug
;
ret
=
nvkm_vm_ref
(
vm
,
&
bar
->
bar1_vm
,
bar
->
mem
->
memory
);
ret
=
nvkm_vmm_join
(
bar
->
bar1_vmm
,
bar
->
mem
->
memory
);
nvkm_vm_ref
(
NULL
,
&
vm
,
NULL
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -199,9 +198,11 @@ nv50_bar_dtor(struct nvkm_bar *base)
...
@@ -199,9 +198,11 @@ nv50_bar_dtor(struct nvkm_bar *base)
struct
nv50_bar
*
bar
=
nv50_bar
(
base
);
struct
nv50_bar
*
bar
=
nv50_bar
(
base
);
if
(
bar
->
mem
)
{
if
(
bar
->
mem
)
{
nvkm_gpuobj_del
(
&
bar
->
bar1
);
nvkm_gpuobj_del
(
&
bar
->
bar1
);
nvkm_vm_ref
(
NULL
,
&
bar
->
bar1_vm
,
bar
->
mem
->
memory
);
nvkm_vmm_part
(
bar
->
bar1_vmm
,
bar
->
mem
->
memory
);
nvkm_vmm_unref
(
&
bar
->
bar1_vmm
);
nvkm_gpuobj_del
(
&
bar
->
bar2
);
nvkm_gpuobj_del
(
&
bar
->
bar2
);
nvkm_vm_ref
(
NULL
,
&
bar
->
bar2_vm
,
bar
->
mem
->
memory
);
nvkm_vmm_part
(
bar
->
bar2_vmm
,
bar
->
mem
->
memory
);
nvkm_vmm_unref
(
&
bar
->
bar2_vmm
);
nvkm_gpuobj_del
(
&
bar
->
pgd
);
nvkm_gpuobj_del
(
&
bar
->
pgd
);
nvkm_gpuobj_del
(
&
bar
->
pad
);
nvkm_gpuobj_del
(
&
bar
->
pad
);
nvkm_gpuobj_del
(
&
bar
->
mem
);
nvkm_gpuobj_del
(
&
bar
->
mem
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h
浏览文件 @
fc584e1a
...
@@ -9,9 +9,9 @@ struct nv50_bar {
...
@@ -9,9 +9,9 @@ struct nv50_bar {
struct
nvkm_gpuobj
*
mem
;
struct
nvkm_gpuobj
*
mem
;
struct
nvkm_gpuobj
*
pad
;
struct
nvkm_gpuobj
*
pad
;
struct
nvkm_gpuobj
*
pgd
;
struct
nvkm_gpuobj
*
pgd
;
struct
nvkm_vm
*
bar1_v
m
;
struct
nvkm_vm
m
*
bar1_vm
m
;
struct
nvkm_gpuobj
*
bar1
;
struct
nvkm_gpuobj
*
bar1
;
struct
nvkm_vm
*
bar2_v
m
;
struct
nvkm_vm
m
*
bar2_vm
m
;
struct
nvkm_gpuobj
*
bar2
;
struct
nvkm_gpuobj
*
bar2
;
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录