Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
70ee6f1c
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看板
提交
70ee6f1c
编写于
7月 13, 2012
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nv04-nv40/fifo: remove use of nouveau_gpuobj_new_fake()
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
5787640d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
50 addition
and
73 deletion
+50
-73
drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c
drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c
+15
-22
drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c
drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c
+11
-18
drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c
drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c
+11
-15
drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c
drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c
+13
-18
未找到文件。
drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c
浏览文件 @
70ee6f1c
...
...
@@ -61,7 +61,7 @@ struct nv04_fifo_priv {
struct
nv04_fifo_chan
{
struct
nouveau_fifo_chan
base
;
struct
nouveau_gpuobj
*
ramfc
;
u32
ramfc
;
};
bool
...
...
@@ -107,6 +107,8 @@ nv04_fifo_context_new(struct nouveau_channel *chan, int engine)
if
(
!
fctx
)
return
-
ENOMEM
;
fctx
->
ramfc
=
chan
->
id
*
32
;
/* map channel control registers */
chan
->
user
=
ioremap
(
pci_resource_start
(
dev
->
pdev
,
0
)
+
NV03_USER
(
chan
->
id
),
PAGE_SIZE
);
...
...
@@ -116,25 +118,16 @@ nv04_fifo_context_new(struct nouveau_channel *chan, int engine)
}
/* initialise default fifo context */
ret
=
nouveau_gpuobj_new_fake
(
dev
,
priv
->
ramfc
->
pinst
+
chan
->
id
*
32
,
~
0
,
32
,
NVOBJ_FLAG_ZERO_FREE
,
&
fctx
->
ramfc
);
if
(
ret
)
goto
error
;
nv_wo32
(
fctx
->
ramfc
,
0x00
,
chan
->
pushbuf_base
);
nv_wo32
(
fctx
->
ramfc
,
0x04
,
chan
->
pushbuf_base
);
nv_wo32
(
fctx
->
ramfc
,
0x08
,
chan
->
pushbuf
->
pinst
>>
4
);
nv_wo32
(
fctx
->
ramfc
,
0x0c
,
0x00000000
);
nv_wo32
(
fctx
->
ramfc
,
0x10
,
NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES
|
NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES
|
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x00
,
chan
->
pushbuf_base
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x04
,
chan
->
pushbuf_base
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x08
,
chan
->
pushbuf
->
pinst
>>
4
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x10
,
NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES
|
NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES
|
#ifdef __BIG_ENDIAN
NV_PFIFO_CACHE1_BIG_ENDIAN
|
NV_PFIFO_CACHE1_BIG_ENDIAN
|
#endif
NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8
);
nv_wo32
(
fctx
->
ramfc
,
0x14
,
0x00000000
);
nv_wo32
(
fctx
->
ramfc
,
0x18
,
0x00000000
);
nv_wo32
(
fctx
->
ramfc
,
0x1c
,
0x00000000
);
NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8
);
/* enable dma mode on the channel */
spin_lock_irqsave
(
&
dev_priv
->
context_switch_lock
,
flags
);
...
...
@@ -172,6 +165,7 @@ nv04_fifo_context_del(struct nouveau_channel *chan, int engine)
do
{
u32
mask
=
((
1ULL
<<
c
->
bits
)
-
1
)
<<
c
->
regs
;
nv_mask
(
dev
,
c
->
regp
,
mask
,
0x00000000
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
c
->
ctxp
,
0x00000000
);
}
while
((
++
c
)
->
bits
);
nv_wr32
(
dev
,
NV03_PFIFO_CACHE1_GET
,
0
);
...
...
@@ -187,7 +181,6 @@ nv04_fifo_context_del(struct nouveau_channel *chan, int engine)
spin_unlock_irqrestore
(
&
dev_priv
->
context_switch_lock
,
flags
);
/* clean up */
nouveau_gpuobj_ref
(
NULL
,
&
fctx
->
ramfc
);
nouveau_gpuobj_ref
(
NULL
,
&
chan
->
ramfc
);
/*XXX: nv40 */
if
(
chan
->
user
)
{
iounmap
(
chan
->
user
);
...
...
@@ -250,14 +243,14 @@ nv04_fifo_fini(struct drm_device *dev, int engine, bool suspend)
chan
=
dev_priv
->
channels
.
ptr
[
chid
];
if
(
suspend
&&
chid
!=
priv
->
base
.
channels
&&
chan
)
{
struct
nv04_fifo_chan
*
fctx
=
chan
->
engctx
[
engine
];
struct
nouveau_gpuobj
*
ctx
=
fctx
->
ramfc
;
struct
nouveau_gpuobj
*
ctx
=
priv
->
ramfc
;
struct
ramfc_desc
*
c
=
priv
->
ramfc_desc
;
do
{
u32
rm
=
((
1ULL
<<
c
->
bits
)
-
1
)
<<
c
->
regs
;
u32
cm
=
((
1ULL
<<
c
->
bits
)
-
1
)
<<
c
->
ctxs
;
u32
rv
=
(
nv_rd32
(
dev
,
c
->
regp
)
&
rm
)
>>
c
->
regs
;
u32
cv
=
(
nv_ro32
(
ctx
,
c
->
ctxp
)
&
~
cm
);
nv_wo32
(
ctx
,
c
->
ctxp
,
cv
|
(
rv
<<
c
->
ctxs
));
u32
cv
=
(
nv_ro32
(
ctx
,
c
->
ctxp
+
fctx
->
ramfc
)
&
~
cm
);
nv_wo32
(
ctx
,
c
->
ctxp
+
fctx
->
ramfc
,
cv
|
(
rv
<<
c
->
ctxs
));
}
while
((
++
c
)
->
bits
);
}
...
...
drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c
浏览文件 @
70ee6f1c
...
...
@@ -61,7 +61,7 @@ struct nv10_fifo_priv {
struct
nv10_fifo_chan
{
struct
nouveau_fifo_chan
base
;
struct
nouveau_gpuobj
*
ramfc
;
u32
ramfc
;
};
static
int
...
...
@@ -78,6 +78,8 @@ nv10_fifo_context_new(struct nouveau_channel *chan, int engine)
if
(
!
fctx
)
return
-
ENOMEM
;
fctx
->
ramfc
=
chan
->
id
*
32
;
/* map channel control registers */
chan
->
user
=
ioremap
(
pci_resource_start
(
dev
->
pdev
,
0
)
+
NV03_USER
(
chan
->
id
),
PAGE_SIZE
);
...
...
@@ -87,25 +89,16 @@ nv10_fifo_context_new(struct nouveau_channel *chan, int engine)
}
/* initialise default fifo context */
ret
=
nouveau_gpuobj_new_fake
(
dev
,
priv
->
ramfc
->
pinst
+
chan
->
id
*
32
,
~
0
,
32
,
NVOBJ_FLAG_ZERO_FREE
,
&
fctx
->
ramfc
);
if
(
ret
)
goto
error
;
nv_wo32
(
fctx
->
ramfc
,
0x00
,
chan
->
pushbuf_base
);
nv_wo32
(
fctx
->
ramfc
,
0x04
,
chan
->
pushbuf_base
);
nv_wo32
(
fctx
->
ramfc
,
0x08
,
0x00000000
);
nv_wo32
(
fctx
->
ramfc
,
0x0c
,
chan
->
pushbuf
->
pinst
>>
4
);
nv_wo32
(
fctx
->
ramfc
,
0x10
,
0x00000000
);
nv_wo32
(
fctx
->
ramfc
,
0x14
,
NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES
|
NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES
|
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x00
,
chan
->
pushbuf_base
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x04
,
chan
->
pushbuf_base
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x0c
,
chan
->
pushbuf
->
pinst
>>
4
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x14
,
NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES
|
NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES
|
#ifdef __BIG_ENDIAN
NV_PFIFO_CACHE1_BIG_ENDIAN
|
NV_PFIFO_CACHE1_BIG_ENDIAN
|
#endif
NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8
);
nv_wo32
(
fctx
->
ramfc
,
0x18
,
0x00000000
);
nv_wo32
(
fctx
->
ramfc
,
0x1c
,
0x00000000
);
NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8
);
/* enable dma mode on the channel */
spin_lock_irqsave
(
&
dev_priv
->
context_switch_lock
,
flags
);
...
...
drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c
浏览文件 @
70ee6f1c
...
...
@@ -66,7 +66,7 @@ struct nv17_fifo_priv {
struct
nv17_fifo_chan
{
struct
nouveau_fifo_chan
base
;
struct
nouveau_gpuobj
*
ramfc
;
u32
ramfc
;
};
static
int
...
...
@@ -83,6 +83,8 @@ nv17_fifo_context_new(struct nouveau_channel *chan, int engine)
if
(
!
fctx
)
return
-
ENOMEM
;
fctx
->
ramfc
=
chan
->
id
*
64
;
/* map channel control registers */
chan
->
user
=
ioremap
(
pci_resource_start
(
dev
->
pdev
,
0
)
+
NV03_USER
(
chan
->
id
),
PAGE_SIZE
);
...
...
@@ -92,22 +94,16 @@ nv17_fifo_context_new(struct nouveau_channel *chan, int engine)
}
/* initialise default fifo context */
ret
=
nouveau_gpuobj_new_fake
(
dev
,
priv
->
ramfc
->
pinst
+
chan
->
id
*
64
,
~
0
,
64
,
NVOBJ_FLAG_ZERO_ALLOC
|
NVOBJ_FLAG_ZERO_FREE
,
&
fctx
->
ramfc
);
if
(
ret
)
goto
error
;
nv_wo32
(
fctx
->
ramfc
,
0x00
,
chan
->
pushbuf_base
);
nv_wo32
(
fctx
->
ramfc
,
0x04
,
chan
->
pushbuf_base
);
nv_wo32
(
fctx
->
ramfc
,
0x0c
,
chan
->
pushbuf
->
pinst
>>
4
);
nv_wo32
(
fctx
->
ramfc
,
0x14
,
NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES
|
NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES
|
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x00
,
chan
->
pushbuf_base
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x04
,
chan
->
pushbuf_base
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x0c
,
chan
->
pushbuf
->
pinst
>>
4
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x14
,
NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES
|
NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES
|
#ifdef __BIG_ENDIAN
NV_PFIFO_CACHE1_BIG_ENDIAN
|
NV_PFIFO_CACHE1_BIG_ENDIAN
|
#endif
NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8
);
NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8
);
/* enable dma mode on the channel */
spin_lock_irqsave
(
&
dev_priv
->
context_switch_lock
,
flags
);
...
...
drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c
浏览文件 @
70ee6f1c
...
...
@@ -74,7 +74,7 @@ struct nv40_fifo_priv {
struct
nv40_fifo_chan
{
struct
nouveau_fifo_chan
base
;
struct
nouveau_gpuobj
*
ramfc
;
u32
ramfc
;
};
static
int
...
...
@@ -91,6 +91,8 @@ nv40_fifo_context_new(struct nouveau_channel *chan, int engine)
if
(
!
fctx
)
return
-
ENOMEM
;
fctx
->
ramfc
=
chan
->
id
*
128
;
/* map channel control registers */
chan
->
user
=
ioremap
(
pci_resource_start
(
dev
->
pdev
,
0
)
+
NV03_USER
(
chan
->
id
),
PAGE_SIZE
);
...
...
@@ -100,24 +102,17 @@ nv40_fifo_context_new(struct nouveau_channel *chan, int engine)
}
/* initialise default fifo context */
ret
=
nouveau_gpuobj_new_fake
(
dev
,
priv
->
ramfc
->
pinst
+
chan
->
id
*
128
,
~
0
,
128
,
NVOBJ_FLAG_ZERO_ALLOC
|
NVOBJ_FLAG_ZERO_FREE
,
&
fctx
->
ramfc
);
if
(
ret
)
goto
error
;
nv_wo32
(
fctx
->
ramfc
,
0x00
,
chan
->
pushbuf_base
);
nv_wo32
(
fctx
->
ramfc
,
0x04
,
chan
->
pushbuf_base
);
nv_wo32
(
fctx
->
ramfc
,
0x0c
,
chan
->
pushbuf
->
pinst
>>
4
);
nv_wo32
(
fctx
->
ramfc
,
0x18
,
0x30000000
|
NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES
|
NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES
|
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x00
,
chan
->
pushbuf_base
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x04
,
chan
->
pushbuf_base
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x0c
,
chan
->
pushbuf
->
pinst
>>
4
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x18
,
0x30000000
|
NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES
|
NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES
|
#ifdef __BIG_ENDIAN
NV_PFIFO_CACHE1_BIG_ENDIAN
|
NV_PFIFO_CACHE1_BIG_ENDIAN
|
#endif
NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8
);
nv_wo32
(
fctx
->
ramfc
,
0x3c
,
0x0001ffff
);
NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8
);
nv_wo32
(
priv
->
ramfc
,
fctx
->
ramfc
+
0x3c
,
0x0001ffff
);
/* enable dma mode on the channel */
spin_lock_irqsave
(
&
dev_priv
->
context_switch_lock
,
flags
);
...
...
@@ -125,7 +120,7 @@ nv40_fifo_context_new(struct nouveau_channel *chan, int engine)
spin_unlock_irqrestore
(
&
dev_priv
->
context_switch_lock
,
flags
);
/*XXX: remove this later, need fifo engine context commit hook */
nouveau_gpuobj_ref
(
fctx
->
ramfc
,
&
chan
->
ramfc
);
nouveau_gpuobj_ref
(
priv
->
ramfc
,
&
chan
->
ramfc
);
error:
if
(
ret
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录