Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
dbff2dee
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
dbff2dee
编写于
8月 06, 2012
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nve0/fifo: support engine selection when creating fifo channels
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
43b1e9c9
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
64 addition
and
13 deletion
+64
-13
drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c
drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c
+1
-1
drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c
drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c
+1
-1
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
+1
-1
drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
+39
-6
drivers/gpu/drm/nouveau/core/include/core/class.h
drivers/gpu/drm/nouveau/core/include/core/class.h
+19
-2
drivers/gpu/drm/nouveau/core/include/core/device.h
drivers/gpu/drm/nouveau/core/include/core/device.h
+1
-1
drivers/gpu/drm/nouveau/nouveau_chan.c
drivers/gpu/drm/nouveau/nouveau_chan.c
+2
-1
未找到文件。
drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c
浏览文件 @
dbff2dee
...
...
@@ -182,7 +182,7 @@ nv50_fifo_chan_ctor(struct nouveau_object *parent,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv_channel_ind_class
*
args
=
data
;
struct
nv
50
_channel_ind_class
*
args
=
data
;
struct
nouveau_bar
*
bar
=
nouveau_bar
(
parent
);
struct
nv50_fifo_base
*
base
=
(
void
*
)
parent
;
struct
nv50_fifo_chan
*
chan
;
...
...
drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c
浏览文件 @
dbff2dee
...
...
@@ -150,7 +150,7 @@ nv84_fifo_chan_ctor(struct nouveau_object *parent,
struct
nouveau_bar
*
bar
=
nouveau_bar
(
parent
);
struct
nv50_fifo_base
*
base
=
(
void
*
)
parent
;
struct
nv50_fifo_chan
*
chan
;
struct
nv_channel_ind_class
*
args
=
data
;
struct
nv
50
_channel_ind_class
*
args
=
data
;
u64
ioffset
,
ilength
;
int
ret
;
...
...
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
浏览文件 @
dbff2dee
...
...
@@ -163,7 +163,7 @@ nvc0_fifo_chan_ctor(struct nouveau_object *parent,
struct
nvc0_fifo_priv
*
priv
=
(
void
*
)
engine
;
struct
nvc0_fifo_base
*
base
=
(
void
*
)
parent
;
struct
nvc0_fifo_chan
*
chan
;
struct
nv_channel_ind_class
*
args
=
data
;
struct
nv
50
_channel_ind_class
*
args
=
data
;
u64
usermem
,
ioffset
,
ilength
;
int
ret
,
i
;
...
...
drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
浏览文件 @
dbff2dee
...
...
@@ -38,6 +38,22 @@
#include <engine/dmaobj.h>
#include <engine/fifo.h>
#define _(a,b) { (a), ((1 << (a)) | (b)) }
static
const
struct
{
int
subdev
;
u32
mask
;
}
fifo_engine
[]
=
{
_
(
NVDEV_ENGINE_GR
,
(
1
<<
NVDEV_ENGINE_SW
)),
_
(
NVDEV_ENGINE_VP
,
0
),
_
(
NVDEV_ENGINE_PPP
,
0
),
_
(
NVDEV_ENGINE_BSP
,
0
),
_
(
NVDEV_ENGINE_COPY0
,
0
),
_
(
NVDEV_ENGINE_COPY1
,
0
),
_
(
NVDEV_ENGINE_VENC
,
0
),
};
#undef _
#define FIFO_ENGINE_NR ARRAY_SIZE(fifo_engine)
struct
nve0_fifo_engn
{
struct
nouveau_gpuobj
*
playlist
[
2
];
int
cur_playlist
;
...
...
@@ -45,7 +61,7 @@ struct nve0_fifo_engn {
struct
nve0_fifo_priv
{
struct
nouveau_fifo
base
;
struct
nve0_fifo_engn
engine
[
16
];
struct
nve0_fifo_engn
engine
[
FIFO_ENGINE_NR
];
struct
{
struct
nouveau_gpuobj
*
mem
;
struct
nouveau_vma
bar
;
...
...
@@ -119,7 +135,9 @@ nve0_fifo_context_attach(struct nouveau_object *parent,
switch
(
nv_engidx
(
object
->
engine
))
{
case
NVDEV_ENGINE_SW
:
return
0
;
case
NVDEV_ENGINE_GR
:
addr
=
0x0210
;
break
;
case
NVDEV_ENGINE_GR
:
case
NVDEV_ENGINE_COPY0
:
case
NVDEV_ENGINE_COPY1
:
addr
=
0x0210
;
break
;
default:
return
-
EINVAL
;
}
...
...
@@ -149,7 +167,9 @@ nve0_fifo_context_detach(struct nouveau_object *parent, bool suspend,
switch
(
nv_engidx
(
object
->
engine
))
{
case
NVDEV_ENGINE_SW
:
return
0
;
case
NVDEV_ENGINE_GR
:
addr
=
0x0210
;
break
;
case
NVDEV_ENGINE_GR
:
case
NVDEV_ENGINE_COPY0
:
case
NVDEV_ENGINE_COPY1
:
addr
=
0x0210
;
break
;
default:
return
-
EINVAL
;
}
...
...
@@ -178,24 +198,36 @@ nve0_fifo_chan_ctor(struct nouveau_object *parent,
struct
nve0_fifo_priv
*
priv
=
(
void
*
)
engine
;
struct
nve0_fifo_base
*
base
=
(
void
*
)
parent
;
struct
nve0_fifo_chan
*
chan
;
struct
nv_channel_ind_class
*
args
=
data
;
struct
nv
e0
_channel_ind_class
*
args
=
data
;
u64
usermem
,
ioffset
,
ilength
;
int
ret
,
i
;
if
(
size
<
sizeof
(
*
args
))
return
-
EINVAL
;
for
(
i
=
0
;
i
<
FIFO_ENGINE_NR
;
i
++
)
{
if
(
args
->
engine
&
(
1
<<
i
))
{
if
(
nouveau_engine
(
parent
,
fifo_engine
[
i
].
subdev
))
{
args
->
engine
=
(
1
<<
i
);
break
;
}
}
}
if
(
i
==
FIFO_ENGINE_NR
)
return
-
ENODEV
;
ret
=
nouveau_fifo_channel_create
(
parent
,
engine
,
oclass
,
1
,
priv
->
user
.
bar
.
offset
,
0x200
,
args
->
pushbuf
,
(
1
<<
NVDEV_ENGINE_SW
)
|
(
1
<<
NVDEV_ENGINE_GR
),
&
chan
);
fifo_engine
[
i
].
mask
,
&
chan
);
*
pobject
=
nv_object
(
chan
);
if
(
ret
)
return
ret
;
nv_parent
(
chan
)
->
context_attach
=
nve0_fifo_context_attach
;
nv_parent
(
chan
)
->
context_detach
=
nve0_fifo_context_detach
;
chan
->
engine
=
i
;
usermem
=
chan
->
base
.
chid
*
0x200
;
ioffset
=
args
->
ioffset
;
...
...
@@ -235,6 +267,7 @@ nve0_fifo_chan_init(struct nouveau_object *object)
if
(
ret
)
return
ret
;
nv_mask
(
priv
,
0x800004
+
(
chid
*
8
),
0x000f0000
,
chan
->
engine
<<
16
);
nv_wr32
(
priv
,
0x800000
+
(
chid
*
8
),
0x80000000
|
base
->
addr
>>
12
);
nv_mask
(
priv
,
0x800004
+
(
chid
*
8
),
0x00000400
,
0x00000400
);
nve0_fifo_playlist_update
(
priv
,
chan
->
engine
);
...
...
drivers/gpu/drm/nouveau/core/include/core/class.h
浏览文件 @
dbff2dee
...
...
@@ -65,13 +65,30 @@ struct nv_channel_dma_class {
/* 506f: NV50_CHANNEL_IND
* 826f: NV84_CHANNEL_IND
* 906f: NVC0_CHANNEL_IND
* a06f: NVE0_CHANNEL_IND
*/
struct
nv_channel_ind_class
{
struct
nv
50
_channel_ind_class
{
u32
pushbuf
;
u32
ilength
;
u64
ioffset
;
};
/* a06f: NVE0_CHANNEL_IND
*/
#define NVE0_CHANNEL_IND_ENGINE_GR 0x00000001
#define NVE0_CHANNEL_IND_ENGINE_VP 0x00000002
#define NVE0_CHANNEL_IND_ENGINE_PPP 0x00000004
#define NVE0_CHANNEL_IND_ENGINE_BSP 0x00000008
#define NVE0_CHANNEL_IND_ENGINE_CE0 0x00000010
#define NVE0_CHANNEL_IND_ENGINE_CE1 0x00000020
#define NVE0_CHANNEL_IND_ENGINE_ENC 0x00000040
struct
nve0_channel_ind_class
{
u32
pushbuf
;
u32
ilength
;
u64
ioffset
;
u32
engine
;
};
#endif
drivers/gpu/drm/nouveau/core/include/core/device.h
浏览文件 @
dbff2dee
...
...
@@ -36,7 +36,7 @@ enum nv_subdev_type {
NVDEV_ENGINE_COPY0
,
NVDEV_ENGINE_COPY1
,
NVDEV_ENGINE_UNK1C1
,
NVDEV_ENGINE_
FENCE
,
NVDEV_ENGINE_
VENC
,
NVDEV_ENGINE_DISP
,
NVDEV_SUBDEV_NR
,
};
...
...
drivers/gpu/drm/nouveau/nouveau_chan.c
浏览文件 @
dbff2dee
...
...
@@ -188,7 +188,7 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nouveau_cli *cli,
{
static
const
u16
oclasses
[]
=
{
0xa06f
,
0x906f
,
0x826f
,
0x506f
,
0
};
const
u16
*
oclass
=
oclasses
;
struct
nv_channel_ind_class
args
;
struct
nv
e0
_channel_ind_class
args
;
struct
nouveau_channel
*
chan
;
int
ret
;
...
...
@@ -202,6 +202,7 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nouveau_cli *cli,
args
.
pushbuf
=
chan
->
push
.
handle
;
args
.
ioffset
=
0x10000
+
chan
->
push
.
vma
.
offset
;
args
.
ilength
=
0x02000
;
args
.
engine
=
NVE0_CHANNEL_IND_ENGINE_GR
;
do
{
ret
=
nouveau_object_new
(
nv_object
(
cli
),
parent
,
handle
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录