Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d2ee3605
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看板
提交
d2ee3605
编写于
5月 10, 2016
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/core/memory: distinguish between coherent/non-coherent targets
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
134fdc1a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
27 addition
and
13 deletion
+27
-13
drivers/gpu/drm/nouveau/include/nvkm/core/memory.h
drivers/gpu/drm/nouveau/include/nvkm/core/memory.h
+4
-3
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
+8
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+7
-4
drivers/gpu/drm/nouveau/nvkm/falcon/v1.c
drivers/gpu/drm/nouveau/nvkm/falcon/v1.c
+7
-4
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+1
-1
未找到文件。
drivers/gpu/drm/nouveau/include/nvkm/core/memory.h
浏览文件 @
d2ee3605
...
...
@@ -6,9 +6,10 @@ struct nvkm_vma;
struct
nvkm_vm
;
enum
nvkm_memory_target
{
NVKM_MEM_TARGET_INST
,
NVKM_MEM_TARGET_VRAM
,
NVKM_MEM_TARGET_HOST
,
NVKM_MEM_TARGET_INST
,
/* instance memory */
NVKM_MEM_TARGET_VRAM
,
/* video memory */
NVKM_MEM_TARGET_HOST
,
/* coherent system memory */
NVKM_MEM_TARGET_NCOH
,
/* non-coherent system memory */
};
struct
nvkm_memory
{
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
浏览文件 @
d2ee3605
...
...
@@ -68,7 +68,14 @@ gf100_fifo_runlist_commit(struct gf100_fifo *fifo)
}
nvkm_done
(
cur
);
target
=
(
nvkm_memory_target
(
cur
)
==
NVKM_MEM_TARGET_HOST
)
?
0x3
:
0x0
;
switch
(
nvkm_memory_target
(
cur
))
{
case
NVKM_MEM_TARGET_VRAM
:
target
=
0
;
break
;
case
NVKM_MEM_TARGET_NCOH
:
target
=
3
;
break
;
default:
mutex_unlock
(
&
subdev
->
mutex
);
WARN_ON
(
1
);
return
;
}
nvkm_wr32
(
device
,
0x002270
,
(
nvkm_memory_addr
(
cur
)
>>
12
)
|
(
target
<<
28
));
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
浏览文件 @
d2ee3605
...
...
@@ -83,10 +83,13 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, int runl)
}
nvkm_done
(
mem
);
if
(
nvkm_memory_target
(
mem
)
==
NVKM_MEM_TARGET_VRAM
)
target
=
0
;
else
target
=
3
;
switch
(
nvkm_memory_target
(
mem
))
{
case
NVKM_MEM_TARGET_VRAM
:
target
=
0
;
break
;
case
NVKM_MEM_TARGET_NCOH
:
target
=
3
;
break
;
default:
WARN_ON
(
1
);
return
;
}
nvkm_wr32
(
device
,
0x002270
,
(
nvkm_memory_addr
(
mem
)
>>
12
)
|
(
target
<<
28
));
...
...
drivers/gpu/drm/nouveau/nvkm/falcon/v1.c
浏览文件 @
d2ee3605
...
...
@@ -136,10 +136,13 @@ nvkm_falcon_v1_bind_context(struct nvkm_falcon *falcon, struct nvkm_gpuobj *ctx)
nvkm_falcon_wr32
(
falcon
,
0xe00
+
4
*
FALCON_DMAIDX_PHYS_SYS_NCOH
,
0x6
);
/* Set context */
if
(
nvkm_memory_target
(
ctx
->
memory
)
==
NVKM_MEM_TARGET_VRAM
)
inst_loc
=
0x0
;
/* FB */
else
inst_loc
=
0x3
;
/* Non-coherent sysmem */
switch
(
nvkm_memory_target
(
ctx
->
memory
))
{
case
NVKM_MEM_TARGET_VRAM
:
inst_loc
=
0
;
break
;
case
NVKM_MEM_TARGET_NCOH
:
inst_loc
=
3
;
break
;
default:
WARN_ON
(
1
);
return
;
}
/* Enable context */
nvkm_falcon_mask
(
falcon
,
0x048
,
0x1
,
0x1
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
浏览文件 @
d2ee3605
...
...
@@ -116,7 +116,7 @@ struct gk20a_instmem {
static
enum
nvkm_memory_target
gk20a_instobj_target
(
struct
nvkm_memory
*
memory
)
{
return
NVKM_MEM_TARGET_
HOST
;
return
NVKM_MEM_TARGET_
NCOH
;
}
static
u64
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录