Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
00c55507
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看板
提交
00c55507
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/imem: switch to subdev printk macros
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
18019e95
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
13 deletion
+17
-13
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+15
-11
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c
+2
-2
未找到文件。
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
浏览文件 @
00c55507
...
...
@@ -207,6 +207,7 @@ gk20a_instobj_ctor_dma(struct nvkm_object *parent, struct nvkm_object *engine,
{
struct
gk20a_instobj_dma
*
node
;
struct
gk20a_instmem
*
imem
=
(
void
*
)
nvkm_instmem
(
parent
);
struct
nvkm_subdev
*
subdev
=
&
imem
->
base
.
subdev
;
struct
device
*
dev
=
nv_device_base
(
nv_device
(
parent
));
int
ret
;
...
...
@@ -220,14 +221,15 @@ gk20a_instobj_ctor_dma(struct nvkm_object *parent, struct nvkm_object *engine,
&
node
->
handle
,
GFP_KERNEL
,
&
imem
->
attrs
);
if
(
!
node
->
cpuaddr
)
{
nv
_error
(
imem
,
"cannot allocate DMA memory
\n
"
);
nv
km_error
(
subdev
,
"cannot allocate DMA memory
\n
"
);
return
-
ENOMEM
;
}
/* alignment check */
if
(
unlikely
(
node
->
handle
&
(
align
-
1
)))
nv_warn
(
imem
,
"memory not aligned as requested: %pad (0x%x)
\n
"
,
&
node
->
handle
,
align
);
nvkm_warn
(
subdev
,
"memory not aligned as requested: %pad (0x%x)
\n
"
,
&
node
->
handle
,
align
);
/* present memory for being mapped using small pages */
node
->
r
.
type
=
12
;
...
...
@@ -249,6 +251,7 @@ gk20a_instobj_ctor_iommu(struct nvkm_object *parent, struct nvkm_object *engine,
{
struct
gk20a_instobj_iommu
*
node
;
struct
gk20a_instmem
*
imem
=
(
void
*
)
nvkm_instmem
(
parent
);
struct
nvkm_subdev
*
subdev
=
&
imem
->
base
.
subdev
;
struct
nvkm_mm_node
*
r
;
int
ret
;
int
i
;
...
...
@@ -277,7 +280,7 @@ gk20a_instobj_ctor_iommu(struct nvkm_object *parent, struct nvkm_object *engine,
align
>>
imem
->
iommu_pgshift
,
&
r
);
mutex_unlock
(
imem
->
mm_mutex
);
if
(
ret
)
{
nv
_error
(
imem
,
"virtual space is full!
\n
"
);
nv
km_error
(
subdev
,
"virtual space is full!
\n
"
);
goto
free_pages
;
}
...
...
@@ -289,7 +292,7 @@ gk20a_instobj_ctor_iommu(struct nvkm_object *parent, struct nvkm_object *engine,
ret
=
iommu_map
(
imem
->
domain
,
offset
,
page_to_phys
(
p
),
PAGE_SIZE
,
IOMMU_READ
|
IOMMU_WRITE
);
if
(
ret
<
0
)
{
nv
_error
(
imem
,
"IOMMU mapping failure: %d
\n
"
,
ret
);
nv
km_error
(
subdev
,
"IOMMU mapping failure: %d
\n
"
,
ret
);
while
(
i
--
>
0
)
{
offset
-=
PAGE_SIZE
;
...
...
@@ -329,11 +332,12 @@ gk20a_instobj_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_instobj_args
*
args
=
data
;
struct
gk20a_instmem
*
imem
=
(
void
*
)
nvkm_instmem
(
parent
);
struct
gk20a_instobj
*
node
;
struct
nvkm_subdev
*
subdev
=
&
imem
->
base
.
subdev
;
u32
size
,
align
;
int
ret
;
nv
_debug
(
parent
,
"%s (%s): size: %x align: %x
\n
"
,
__func__
,
imem
->
domain
?
"IOMMU"
:
"DMA"
,
args
->
size
,
args
->
align
);
nv
km_debug
(
subdev
,
"%s (%s): size: %x align: %x
\n
"
,
__func__
,
imem
->
domain
?
"IOMMU"
:
"DMA"
,
args
->
size
,
args
->
align
);
/* Round size and align to page bounds */
size
=
max
(
roundup
(
args
->
size
,
PAGE_SIZE
),
PAGE_SIZE
);
...
...
@@ -359,8 +363,8 @@ gk20a_instobj_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
node
->
base
.
addr
=
node
->
mem
->
offset
;
node
->
base
.
size
=
size
;
nv
_debug
(
parent
,
"alloc size: 0x%x, align: 0x%x, gaddr: 0x%llx
\n
"
,
size
,
align
,
node
->
mem
->
offset
);
nv
km_debug
(
subdev
,
"alloc size: 0x%x, align: 0x%x, gaddr: 0x%llx
\n
"
,
size
,
align
,
node
->
mem
->
offset
);
return
0
;
}
...
...
@@ -410,7 +414,7 @@ gk20a_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
imem
->
iommu_pgshift
=
plat
->
gpu
->
iommu
.
pgshift
;
imem
->
mm_mutex
=
&
plat
->
gpu
->
iommu
.
mutex
;
nv
_info
(
imem
,
"using IOMMU
\n
"
);
nv
km_info
(
&
imem
->
base
.
subdev
,
"using IOMMU
\n
"
);
}
else
{
init_dma_attrs
(
&
imem
->
attrs
);
/*
...
...
@@ -422,7 +426,7 @@ gk20a_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
dma_set_attr
(
DMA_ATTR_WRITE_COMBINE
,
&
imem
->
attrs
);
dma_set_attr
(
DMA_ATTR_NO_KERNEL_MAPPING
,
&
imem
->
attrs
);
nv
_info
(
imem
,
"using DMA API
\n
"
);
nv
km_info
(
&
imem
->
base
.
subdev
,
"using DMA API
\n
"
);
}
return
0
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c
浏览文件 @
00c55507
...
...
@@ -49,7 +49,7 @@ nv40_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nvkm_object
**
pobject
)
{
struct
nvkm_device
*
device
=
nv_device
(
parent
)
;
struct
nvkm_device
*
device
=
(
void
*
)
parent
;
struct
nv04_instmem
*
imem
;
int
ret
,
bar
,
vs
;
...
...
@@ -67,7 +67,7 @@ nv40_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
imem
->
iomem
=
ioremap
(
nv_device_resource_start
(
device
,
bar
),
nv_device_resource_len
(
device
,
bar
));
if
(
!
imem
->
iomem
)
{
nv
_error
(
imem
,
"unable to map PRAMIN BAR
\n
"
);
nv
km_error
(
&
imem
->
base
.
subdev
,
"unable to map PRAMIN BAR
\n
"
);
return
-
EFAULT
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录