Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
b72f3acb
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看板
提交
b72f3acb
编写于
1月 04, 2011
作者:
C
Chris Wilson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/i915: Handle ringbuffer stalls when flushing
Signed-off-by:
N
Chris Wilson
<
chris@chris-wilson.co.uk
>
上级
63256ec5
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
65 addition
and
43 deletion
+65
-43
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem.c
+2
-2
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
+7
-5
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.c
+53
-33
drivers/gpu/drm/i915/intel_ringbuffer.h
drivers/gpu/drm/i915/intel_ringbuffer.h
+3
-3
未找到文件。
drivers/gpu/drm/i915/i915_gem.c
浏览文件 @
b72f3acb
...
@@ -2148,8 +2148,8 @@ i915_gem_flush_ring(struct drm_device *dev,
...
@@ -2148,8 +2148,8 @@ i915_gem_flush_ring(struct drm_device *dev,
uint32_t
invalidate_domains
,
uint32_t
invalidate_domains
,
uint32_t
flush_domains
)
uint32_t
flush_domains
)
{
{
ring
->
flush
(
ring
,
invalidate_domains
,
flush_domains
);
if
(
ring
->
flush
(
ring
,
invalidate_domains
,
flush_domains
)
==
0
)
i915_gem_process_flushing_list
(
dev
,
flush_domains
,
ring
);
i915_gem_process_flushing_list
(
dev
,
flush_domains
,
ring
);
}
}
static
int
i915_ring_idle
(
struct
drm_device
*
dev
,
static
int
i915_ring_idle
(
struct
drm_device
*
dev
,
...
...
drivers/gpu/drm/i915/i915_gem_execbuffer.c
浏览文件 @
b72f3acb
...
@@ -924,7 +924,7 @@ i915_gem_execbuffer_retire_commands(struct drm_device *dev,
...
@@ -924,7 +924,7 @@ i915_gem_execbuffer_retire_commands(struct drm_device *dev,
struct
intel_ring_buffer
*
ring
)
struct
intel_ring_buffer
*
ring
)
{
{
struct
drm_i915_gem_request
*
request
;
struct
drm_i915_gem_request
*
request
;
u32
flush_domains
;
u32
invalidate
;
/*
/*
* Ensure that the commands in the batch buffer are
* Ensure that the commands in the batch buffer are
...
@@ -932,11 +932,13 @@ i915_gem_execbuffer_retire_commands(struct drm_device *dev,
...
@@ -932,11 +932,13 @@ i915_gem_execbuffer_retire_commands(struct drm_device *dev,
*
*
* The sampler always gets flushed on i965 (sigh).
* The sampler always gets flushed on i965 (sigh).
*/
*/
flush_domains
=
0
;
invalidate
=
I915_GEM_DOMAIN_COMMAND
;
if
(
INTEL_INFO
(
dev
)
->
gen
>=
4
)
if
(
INTEL_INFO
(
dev
)
->
gen
>=
4
)
flush_domains
|=
I915_GEM_DOMAIN_SAMPLER
;
invalidate
|=
I915_GEM_DOMAIN_SAMPLER
;
if
(
ring
->
flush
(
ring
,
invalidate
,
0
))
{
ring
->
flush
(
ring
,
I915_GEM_DOMAIN_COMMAND
,
flush_domains
);
i915_gem_next_request_seqno
(
dev
,
ring
);
return
;
}
/* Add a breadcrumb for the completion of the batch buffer */
/* Add a breadcrumb for the completion of the batch buffer */
request
=
kzalloc
(
sizeof
(
*
request
),
GFP_KERNEL
);
request
=
kzalloc
(
sizeof
(
*
request
),
GFP_KERNEL
);
...
...
drivers/gpu/drm/i915/intel_ringbuffer.c
浏览文件 @
b72f3acb
...
@@ -48,7 +48,7 @@ static u32 i915_gem_get_seqno(struct drm_device *dev)
...
@@ -48,7 +48,7 @@ static u32 i915_gem_get_seqno(struct drm_device *dev)
return
seqno
;
return
seqno
;
}
}
static
void
static
int
render_ring_flush
(
struct
intel_ring_buffer
*
ring
,
render_ring_flush
(
struct
intel_ring_buffer
*
ring
,
u32
invalidate_domains
,
u32
invalidate_domains
,
u32
flush_domains
)
u32
flush_domains
)
...
@@ -56,6 +56,7 @@ render_ring_flush(struct intel_ring_buffer *ring,
...
@@ -56,6 +56,7 @@ render_ring_flush(struct intel_ring_buffer *ring,
struct
drm_device
*
dev
=
ring
->
dev
;
struct
drm_device
*
dev
=
ring
->
dev
;
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
u32
cmd
;
u32
cmd
;
int
ret
;
#if WATCH_EXEC
#if WATCH_EXEC
DRM_INFO
(
"%s: invalidate %08x flush %08x
\n
"
,
__func__
,
DRM_INFO
(
"%s: invalidate %08x flush %08x
\n
"
,
__func__
,
...
@@ -116,12 +117,16 @@ render_ring_flush(struct intel_ring_buffer *ring,
...
@@ -116,12 +117,16 @@ render_ring_flush(struct intel_ring_buffer *ring,
#if WATCH_EXEC
#if WATCH_EXEC
DRM_INFO
(
"%s: queue flush %08x to ring
\n
"
,
__func__
,
cmd
);
DRM_INFO
(
"%s: queue flush %08x to ring
\n
"
,
__func__
,
cmd
);
#endif
#endif
if
(
intel_ring_begin
(
ring
,
2
)
==
0
)
{
ret
=
intel_ring_begin
(
ring
,
2
);
intel_ring_emit
(
ring
,
cmd
);
if
(
ret
)
intel_ring_emit
(
ring
,
MI_NOOP
);
return
ret
;
intel_ring_advance
(
ring
);
}
intel_ring_emit
(
ring
,
cmd
);
intel_ring_emit
(
ring
,
MI_NOOP
);
intel_ring_advance
(
ring
);
}
}
return
0
;
}
}
static
void
ring_write_tail
(
struct
intel_ring_buffer
*
ring
,
static
void
ring_write_tail
(
struct
intel_ring_buffer
*
ring
,
...
@@ -534,19 +539,24 @@ void intel_ring_setup_status_page(struct intel_ring_buffer *ring)
...
@@ -534,19 +539,24 @@ void intel_ring_setup_status_page(struct intel_ring_buffer *ring)
POSTING_READ
(
mmio
);
POSTING_READ
(
mmio
);
}
}
static
void
static
int
bsd_ring_flush
(
struct
intel_ring_buffer
*
ring
,
bsd_ring_flush
(
struct
intel_ring_buffer
*
ring
,
u32
invalidate_domains
,
u32
invalidate_domains
,
u32
flush_domains
)
u32
flush_domains
)
{
{
int
ret
;
if
((
flush_domains
&
I915_GEM_DOMAIN_RENDER
)
==
0
)
if
((
flush_domains
&
I915_GEM_DOMAIN_RENDER
)
==
0
)
return
;
return
0
;
if
(
intel_ring_begin
(
ring
,
2
)
==
0
)
{
ret
=
intel_ring_begin
(
ring
,
2
);
intel_ring_emit
(
ring
,
MI_FLUSH
);
if
(
ret
)
intel_ring_emit
(
ring
,
MI_NOOP
);
return
ret
;
intel_ring_advance
(
ring
);
}
intel_ring_emit
(
ring
,
MI_FLUSH
);
intel_ring_emit
(
ring
,
MI_NOOP
);
intel_ring_advance
(
ring
);
return
0
;
}
}
static
int
static
int
...
@@ -980,20 +990,25 @@ static void gen6_bsd_ring_write_tail(struct intel_ring_buffer *ring,
...
@@ -980,20 +990,25 @@ static void gen6_bsd_ring_write_tail(struct intel_ring_buffer *ring,
GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_ENABLE
);
GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_ENABLE
);
}
}
static
void
gen6_ring_flush
(
struct
intel_ring_buffer
*
ring
,
static
int
gen6_ring_flush
(
struct
intel_ring_buffer
*
ring
,
u32
invalidate_domains
,
u32
invalidate_domains
,
u32
flush_domains
)
u32
flush_domains
)
{
{
int
ret
;
if
((
flush_domains
&
I915_GEM_DOMAIN_RENDER
)
==
0
)
if
((
flush_domains
&
I915_GEM_DOMAIN_RENDER
)
==
0
)
return
;
return
0
;
if
(
intel_ring_begin
(
ring
,
4
)
==
0
)
{
ret
=
intel_ring_begin
(
ring
,
4
);
intel_ring_emit
(
ring
,
MI_FLUSH_DW
);
if
(
ret
)
intel_ring_emit
(
ring
,
0
);
return
ret
;
intel_ring_emit
(
ring
,
0
);
intel_ring_emit
(
ring
,
0
);
intel_ring_emit
(
ring
,
MI_FLUSH_DW
);
intel_ring_advance
(
ring
);
intel_ring_emit
(
ring
,
0
);
}
intel_ring_emit
(
ring
,
0
);
intel_ring_emit
(
ring
,
0
);
intel_ring_advance
(
ring
);
return
0
;
}
}
static
int
static
int
...
@@ -1122,20 +1137,25 @@ static int blt_ring_begin(struct intel_ring_buffer *ring,
...
@@ -1122,20 +1137,25 @@ static int blt_ring_begin(struct intel_ring_buffer *ring,
return
intel_ring_begin
(
ring
,
4
);
return
intel_ring_begin
(
ring
,
4
);
}
}
static
void
blt_ring_flush
(
struct
intel_ring_buffer
*
ring
,
static
int
blt_ring_flush
(
struct
intel_ring_buffer
*
ring
,
u32
invalidate_domains
,
u32
invalidate_domains
,
u32
flush_domains
)
u32
flush_domains
)
{
{
int
ret
;
if
((
flush_domains
&
I915_GEM_DOMAIN_RENDER
)
==
0
)
if
((
flush_domains
&
I915_GEM_DOMAIN_RENDER
)
==
0
)
return
;
return
0
;
if
(
blt_ring_begin
(
ring
,
4
)
==
0
)
{
ret
=
blt_ring_begin
(
ring
,
4
);
intel_ring_emit
(
ring
,
MI_FLUSH_DW
);
if
(
ret
)
intel_ring_emit
(
ring
,
0
);
return
ret
;
intel_ring_emit
(
ring
,
0
);
intel_ring_emit
(
ring
,
0
);
intel_ring_emit
(
ring
,
MI_FLUSH_DW
);
intel_ring_advance
(
ring
);
intel_ring_emit
(
ring
,
0
);
}
intel_ring_emit
(
ring
,
0
);
intel_ring_emit
(
ring
,
0
);
intel_ring_advance
(
ring
);
return
0
;
}
}
static
void
blt_ring_cleanup
(
struct
intel_ring_buffer
*
ring
)
static
void
blt_ring_cleanup
(
struct
intel_ring_buffer
*
ring
)
...
...
drivers/gpu/drm/i915/intel_ringbuffer.h
浏览文件 @
b72f3acb
...
@@ -63,9 +63,9 @@ struct intel_ring_buffer {
...
@@ -63,9 +63,9 @@ struct intel_ring_buffer {
void
(
*
write_tail
)(
struct
intel_ring_buffer
*
ring
,
void
(
*
write_tail
)(
struct
intel_ring_buffer
*
ring
,
u32
value
);
u32
value
);
void
(
*
flush
)(
struct
intel_ring_buffer
*
ring
,
int
__must_check
(
*
flush
)(
struct
intel_ring_buffer
*
ring
,
u32
invalidate_domains
,
u32
invalidate_domains
,
u32
flush_domains
);
u32
flush_domains
);
int
(
*
add_request
)(
struct
intel_ring_buffer
*
ring
,
int
(
*
add_request
)(
struct
intel_ring_buffer
*
ring
,
u32
*
seqno
);
u32
*
seqno
);
u32
(
*
get_seqno
)(
struct
intel_ring_buffer
*
ring
);
u32
(
*
get_seqno
)(
struct
intel_ring_buffer
*
ring
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录