Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
43ce028f
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看板
提交
43ce028f
编写于
10月 19, 2010
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nv50: rework evo init to match nvidia more closely
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
1e96268a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
47 deletion
+26
-47
drivers/gpu/drm/nouveau/nv50_evo.c
drivers/gpu/drm/nouveau/nv50_evo.c
+26
-47
未找到文件。
drivers/gpu/drm/nouveau/nv50_evo.c
浏览文件 @
43ce028f
...
...
@@ -149,60 +149,36 @@ nv50_evo_channel_new(struct drm_device *dev, struct nouveau_channel **pevo)
static
int
nv50_evo_channel_init
(
struct
nouveau_channel
*
evo
)
{
struct
drm_nouveau_private
*
dev_priv
=
evo
->
dev
->
dev_private
;
struct
nouveau_timer_engine
*
ptimer
=
&
dev_priv
->
engine
.
timer
;
struct
drm_device
*
dev
=
evo
->
dev
;
int
id
=
evo
->
id
,
ret
,
i
;
u64
start
;
u64
pushbuf
=
evo
->
pushbuf_bo
->
bo
.
mem
.
start
<<
PAGE_SHIFT
;
u32
tmp
;
/* taken from nv bug #12637, attempts to un-wedge the hw if it's
* stuck in some unspecified state
*/
start
=
ptimer
->
read
(
dev
);
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
0x2b00
);
while
((
tmp
=
nv_rd32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
)))
&
0x1e0000
)
{
if
((
tmp
&
0x9f0000
)
==
0x20000
)
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
tmp
|
0x800000
);
if
((
tmp
&
0x3f0000
)
==
0x30000
)
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
tmp
|
0x200000
);
if
(
ptimer
->
read
(
dev
)
-
start
>
1000000000ULL
)
{
NV_ERROR
(
dev
,
"timeout: (0x610200 & 0x1e0000) != 0
\n
"
);
NV_ERROR
(
dev
,
"0x610200 = 0x%08x
\n
"
,
tmp
);
return
-
EBUSY
;
}
}
tmp
=
nv_rd32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
));
if
((
tmp
&
0x009f0000
)
==
0x00020000
)
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
tmp
|
0x00800000
);
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
0x1000b03
);
if
(
!
nv_wait
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
0x40000000
,
0x40000000
))
{
NV_ERROR
(
dev
,
"timeout: (0x610200 & 0x40000000) == 0x40000000
\n
"
);
NV_ERROR
(
dev
,
"0x610200 = 0x%08x
\n
"
,
nv_rd32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
)));
return
-
EBUSY
;
}
tmp
=
nv_rd32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
));
if
((
tmp
&
0x003f0000
)
==
0x00030000
)
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
tmp
|
0x00600000
);
/* initialise fifo */
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_DMA_CB
(
id
),
((
evo
->
pushbuf_bo
->
bo
.
mem
.
start
<<
PAGE_SHIFT
)
>>
8
)
|
NV50_PDISPLAY_EVO_DMA_CB_LOCATION_VRAM
|
NV50_PDISPLAY_EVO_DMA_CB_VALID
);
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_DMA_CB
(
id
),
pushbuf
>>
8
|
NV50_PDISPLAY_EVO_DMA_CB_LOCATION_VRAM
|
NV50_PDISPLAY_EVO_DMA_CB_VALID
);
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_UNK2
(
id
),
0x00010000
);
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_HASH_TAG
(
id
),
id
);
nv_mask
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
NV50_PDISPLAY_EVO_CTRL_DMA
,
NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED
);
nv_wr32
(
dev
,
NV50_PDISPLAY_USER_PUT
(
id
),
0x00000000
);
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
0x01000003
|
NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED
);
if
(
!
nv_wait
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
0x80000000
,
0x00000000
))
{
NV_ERROR
(
dev
,
"timeout: (0x610200 & 0x80000000) == 0
\n
"
);
NV_ERROR
(
dev
,
"0x610200 = 0x%08x
\n
"
,
NV_ERROR
(
dev
,
"EvoCh %d init timeout: 0x%08x
\n
"
,
id
,
nv_rd32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
)));
return
-
EBUSY
;
}
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
(
nv_rd32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
))
&
~
0x00000003
)
|
NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED
);
nv_wr32
(
dev
,
NV50_PDISPLAY_USER_PUT
(
id
),
0
);
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
0x01000003
|
NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED
);
/* enable error reporting on the channel */
nv_mask
(
dev
,
0x610028
,
0x00000000
,
0x00010001
<<
id
);
...
...
@@ -226,12 +202,15 @@ static void
nv50_evo_channel_fini
(
struct
nouveau_channel
*
evo
)
{
struct
drm_device
*
dev
=
evo
->
dev
;
nv_wr32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
evo
->
id
),
0
);
if
(
!
nv_wait
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
evo
->
id
),
0x1e0000
,
0
))
{
NV_ERROR
(
dev
,
"timeout: (0x610200 & 0x1e0000) == 0
\n
"
);
NV_ERROR
(
dev
,
"0x610200 = 0x%08x
\n
"
,
nv_rd32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
evo
->
id
)));
int
id
=
evo
->
id
;
nv_mask
(
dev
,
0x610028
,
0x00010001
<<
id
,
0x00000000
);
nv_mask
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
0x00001010
,
0x00001000
);
nv_wr32
(
dev
,
NV50_PDISPLAY_INTR_0
,
(
1
<<
id
));
nv_mask
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
0x00000003
,
0x00000000
);
if
(
!
nv_wait
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
),
0x001e0000
,
0x00000000
))
{
NV_ERROR
(
dev
,
"EvoCh %d takedown timeout: 0x%08x
\n
"
,
id
,
nv_rd32
(
dev
,
NV50_PDISPLAY_EVO_CTRL
(
id
)));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录