Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
159045cd
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看板
提交
159045cd
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/nvif: replace pushbuf with vm in fermi/kepler gpfifo class args
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
22827fa4
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
77 addition
and
34 deletion
+77
-34
drivers/gpu/drm/nouveau/include/nvif/class.h
drivers/gpu/drm/nouveau/include/nvif/class.h
+20
-1
drivers/gpu/drm/nouveau/nouveau_chan.c
drivers/gpu/drm/nouveau/nouveau_chan.c
+14
-2
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
+18
-16
drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c
+5
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
+6
-5
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+5
-4
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c
+5
-1
未找到文件。
drivers/gpu/drm/nouveau/include/nvif/class.h
浏览文件 @
159045cd
...
...
@@ -354,9 +354,18 @@ struct nvif_control_pstate_user_v0 {
******************************************************************************/
struct
nv03_channel_dma_v0
{
__u8
version
;
__u8
chid
;
__u8
pad02
[
2
];
__u32
offset
;
__u64
pushbuf
;
};
struct
nv50_channel_dma_v0
{
__u8
version
;
__u8
chid
;
__u8
pad02
[
6
];
__u64
vm
;
__u64
pushbuf
;
__u64
offset
;
};
...
...
@@ -374,6 +383,16 @@ struct nv50_channel_gpfifo_v0 {
__u32
ilength
;
__u64
ioffset
;
__u64
pushbuf
;
__u64
vm
;
};
struct
fermi_channel_gpfifo_v0
{
__u8
version
;
__u8
chid
;
__u8
pad02
[
2
];
__u32
ilength
;
__u64
ioffset
;
__u64
vm
;
};
struct
kepler_channel_gpfifo_a_v0
{
...
...
@@ -389,7 +408,7 @@ struct kepler_channel_gpfifo_a_v0 {
__u16
chid
;
__u32
ilength
;
__u64
ioffset
;
__u64
pushbuf
;
__u64
vm
;
};
/*******************************************************************************
...
...
drivers/gpu/drm/nouveau/nouveau_chan.c
浏览文件 @
159045cd
...
...
@@ -193,6 +193,7 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nvif_device *device,
const
u16
*
oclass
=
oclasses
;
union
{
struct
nv50_channel_gpfifo_v0
nv50
;
struct
fermi_channel_gpfifo_v0
fermi
;
struct
kepler_channel_gpfifo_a_v0
kepler
;
}
args
;
struct
nouveau_channel
*
chan
;
...
...
@@ -210,15 +211,23 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nvif_device *device,
if
(
oclass
[
0
]
>=
KEPLER_CHANNEL_GPFIFO_A
)
{
args
.
kepler
.
version
=
0
;
args
.
kepler
.
engine
=
engine
;
args
.
kepler
.
pushbuf
=
nvif_handle
(
&
chan
->
push
.
ctxdma
);
args
.
kepler
.
ilength
=
0x02000
;
args
.
kepler
.
ioffset
=
0x10000
+
chan
->
push
.
vma
.
offset
;
args
.
kepler
.
vm
=
0
;
size
=
sizeof
(
args
.
kepler
);
}
else
if
(
oclass
[
0
]
>=
FERMI_CHANNEL_GPFIFO
)
{
args
.
fermi
.
version
=
0
;
args
.
fermi
.
ilength
=
0x02000
;
args
.
fermi
.
ioffset
=
0x10000
+
chan
->
push
.
vma
.
offset
;
args
.
fermi
.
vm
=
0
;
size
=
sizeof
(
args
.
fermi
);
}
else
{
args
.
nv50
.
version
=
0
;
args
.
nv50
.
pushbuf
=
nvif_handle
(
&
chan
->
push
.
ctxdma
);
args
.
nv50
.
ilength
=
0x02000
;
args
.
nv50
.
ioffset
=
0x10000
+
chan
->
push
.
vma
.
offset
;
args
.
nv50
.
pushbuf
=
nvif_handle
(
&
chan
->
push
.
ctxdma
);
args
.
nv50
.
vm
=
0
;
size
=
sizeof
(
args
.
nv50
);
}
...
...
@@ -227,6 +236,9 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nvif_device *device,
if
(
ret
==
0
)
{
if
(
chan
->
user
.
oclass
>=
KEPLER_CHANNEL_GPFIFO_A
)
chan
->
chid
=
args
.
kepler
.
chid
;
else
if
(
chan
->
user
.
oclass
>=
FERMI_CHANNEL_GPFIFO
)
chan
->
chid
=
args
.
fermi
.
chid
;
else
chan
->
chid
=
args
.
nv50
.
chid
;
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
浏览文件 @
159045cd
...
...
@@ -76,6 +76,7 @@ nvkm_fifo_channel_create_(struct nvkm_object *parent,
return
ret
;
/* validate dma object representing push buffer */
if
(
pushbuf
)
{
handle
=
nvkm_client_search
(
client
,
pushbuf
);
if
(
!
handle
)
return
-
ENOENT
;
...
...
@@ -93,6 +94,7 @@ nvkm_fifo_channel_create_(struct nvkm_object *parent,
ret
=
dmaeng
->
bind
(
dmaobj
,
parent
,
&
chan
->
pushgpu
);
if
(
ret
)
return
ret
;
}
/* find a free fifo channel */
spin_lock_irqsave
(
&
fifo
->
lock
,
flags
);
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c
浏览文件 @
159045cd
...
...
@@ -173,7 +173,7 @@ g84_fifo_chan_ctor_dma(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_object
**
pobject
)
{
union
{
struct
nv
03
_channel_dma_v0
v0
;
struct
nv
50
_channel_dma_v0
v0
;
}
*
args
=
data
;
struct
nvkm_bar
*
bar
=
nvkm_bar
(
parent
);
struct
nv50_fifo_base
*
base
=
(
void
*
)
parent
;
...
...
@@ -185,6 +185,8 @@ g84_fifo_chan_ctor_dma(struct nvkm_object *parent, struct nvkm_object *engine,
nvif_ioctl
(
parent
,
"create channel dma vers %d pushbuf %llx "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
if
(
args
->
v0
.
vm
)
return
-
ENOENT
;
}
else
return
ret
;
...
...
@@ -262,6 +264,8 @@ g84_fifo_chan_ctor_ind(struct nvkm_object *parent, struct nvkm_object *engine,
"ioffset %016llx ilength %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
);
if
(
args
->
v0
.
vm
)
return
-
ENOENT
;
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
浏览文件 @
159045cd
...
...
@@ -199,7 +199,7 @@ gf100_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_object
**
pobject
)
{
union
{
struct
nv50
_channel_gpfifo_v0
v0
;
struct
fermi
_channel_gpfifo_v0
v0
;
}
*
args
=
data
;
struct
nvkm_bar
*
bar
=
nvkm_bar
(
parent
);
struct
gf100_fifo
*
fifo
=
(
void
*
)
engine
;
...
...
@@ -211,16 +211,17 @@ gf100_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
nvif_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nvif_ioctl
(
parent
,
"create channel gpfifo vers %d
pushbuf %llx
"
nvif_ioctl
(
parent
,
"create channel gpfifo vers %d "
"ioffset %016llx ilength %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
version
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
);
if
(
args
->
v0
.
vm
)
return
-
ENOENT
;
}
else
return
ret
;
ret
=
nvkm_fifo_channel_create
(
parent
,
engine
,
oclass
,
1
,
fifo
->
user
.
bar
.
offset
,
0x1000
,
args
->
v0
.
pushbuf
,
fifo
->
user
.
bar
.
offset
,
0x1000
,
0
,
(
1ULL
<<
NVDEV_ENGINE_SW
)
|
(
1ULL
<<
NVDEV_ENGINE_GR
)
|
(
1ULL
<<
NVDEV_ENGINE_CE0
)
|
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
浏览文件 @
159045cd
...
...
@@ -252,10 +252,12 @@ gk104_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
nvif_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nvif_ioctl
(
parent
,
"create channel gpfifo vers %d
pushbuf %llx
"
nvif_ioctl
(
parent
,
"create channel gpfifo vers %d "
"ioffset %016llx ilength %08x engine %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
version
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
,
args
->
v0
.
engine
);
if
(
args
->
v0
.
vm
)
return
-
ENOENT
;
}
else
return
ret
;
...
...
@@ -282,8 +284,7 @@ gk104_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
i
=
__ffs
(
engines
);
ret
=
nvkm_fifo_channel_create
(
parent
,
engine
,
oclass
,
1
,
fifo
->
user
.
bar
.
offset
,
0x200
,
args
->
v0
.
pushbuf
,
fifo
->
user
.
bar
.
offset
,
0x200
,
0
,
fifo_engine
[
i
].
mask
,
&
chan
);
*
pobject
=
nv_object
(
chan
);
if
(
ret
)
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c
浏览文件 @
159045cd
...
...
@@ -121,7 +121,7 @@ nv04_fifo_chan_ctor(struct nvkm_object *parent,
nvif_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nvif_ioctl
(
parent
,
"create channel dma vers %d pushbuf %llx "
"offset %0
16ll
x
\n
"
,
args
->
v0
.
version
,
"offset %0
8
x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c
浏览文件 @
159045cd
...
...
@@ -65,7 +65,7 @@ nv10_fifo_chan_ctor(struct nvkm_object *parent,
nvif_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nvif_ioctl
(
parent
,
"create channel dma vers %d pushbuf %llx "
"offset %0
16ll
x
\n
"
,
args
->
v0
.
version
,
"offset %0
8
x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c
浏览文件 @
159045cd
...
...
@@ -70,7 +70,7 @@ nv17_fifo_chan_ctor(struct nvkm_object *parent,
nvif_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nvif_ioctl
(
parent
,
"create channel dma vers %d pushbuf %llx "
"offset %0
16ll
x
\n
"
,
args
->
v0
.
version
,
"offset %0
8
x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
浏览文件 @
159045cd
...
...
@@ -193,7 +193,7 @@ nv40_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
nvif_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nvif_ioctl
(
parent
,
"create channel dma vers %d pushbuf %llx "
"offset %0
16ll
x
\n
"
,
args
->
v0
.
version
,
"offset %0
8
x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c
浏览文件 @
159045cd
...
...
@@ -203,7 +203,7 @@ nv50_fifo_chan_ctor_dma(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_object
**
pobject
)
{
union
{
struct
nv
03
_channel_dma_v0
v0
;
struct
nv
50
_channel_dma_v0
v0
;
}
*
args
=
data
;
struct
nvkm_bar
*
bar
=
nvkm_bar
(
parent
);
struct
nv50_fifo_base
*
base
=
(
void
*
)
parent
;
...
...
@@ -215,6 +215,8 @@ nv50_fifo_chan_ctor_dma(struct nvkm_object *parent, struct nvkm_object *engine,
nvif_ioctl
(
parent
,
"create channel dma vers %d pushbuf %llx "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
if
(
args
->
v0
.
vm
)
return
-
ENOENT
;
}
else
return
ret
;
...
...
@@ -280,6 +282,8 @@ nv50_fifo_chan_ctor_ind(struct nvkm_object *parent, struct nvkm_object *engine,
"ioffset %016llx ilength %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
);
if
(
args
->
v0
.
vm
)
return
-
ENOENT
;
}
else
return
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录