Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d9a64610
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d9a64610
编写于
6月 29, 2016
作者:
T
Tvrtko Ursulin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/i915: Consolidate semaphore vfuncs init
Signed-off-by:
N
Tvrtko Ursulin
<
tvrtko.ursulin@intel.com
>
上级
960ecaad
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
30 deletion
+18
-30
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.c
+18
-30
未找到文件。
drivers/gpu/drm/i915/intel_ringbuffer.c
浏览文件 @
d9a64610
...
...
@@ -2884,6 +2884,22 @@ static int gen6_ring_flush(struct drm_i915_gem_request *req,
return
0
;
}
static
void
intel_ring_init_semaphores
(
struct
drm_i915_private
*
dev_priv
,
struct
intel_engine_cs
*
engine
)
{
if
(
!
i915_semaphore_is_enabled
(
dev_priv
))
return
;
if
(
INTEL_GEN
(
dev_priv
)
>=
8
)
{
engine
->
semaphore
.
sync_to
=
gen8_ring_sync
;
engine
->
semaphore
.
signal
=
gen8_xcs_signal
;
GEN8_RING_SEMAPHORE_INIT
(
engine
);
}
else
if
(
INTEL_GEN
(
dev_priv
)
>=
6
)
{
engine
->
semaphore
.
sync_to
=
gen6_ring_sync
;
engine
->
semaphore
.
signal
=
gen6_signal
;
}
}
static
void
intel_ring_default_vfuncs
(
struct
drm_i915_private
*
dev_priv
,
struct
intel_engine_cs
*
engine
)
{
...
...
@@ -2921,6 +2937,8 @@ static void intel_ring_default_vfuncs(struct drm_i915_private *dev_priv,
engine
->
irq_get
=
i8xx_ring_get_irq
;
engine
->
irq_put
=
i8xx_ring_put_irq
;
}
intel_ring_init_semaphores
(
dev_priv
,
engine
);
}
int
intel_init_render_ring_buffer
(
struct
drm_device
*
dev
)
...
...
@@ -2962,9 +2980,7 @@ int intel_init_render_ring_buffer(struct drm_device *dev)
engine
->
irq_enable_mask
=
GT_RENDER_USER_INTERRUPT
;
if
(
i915_semaphore_is_enabled
(
dev_priv
))
{
WARN_ON
(
!
dev_priv
->
semaphore_obj
);
engine
->
semaphore
.
sync_to
=
gen8_ring_sync
;
engine
->
semaphore
.
signal
=
gen8_rcs_signal
;
GEN8_RING_SEMAPHORE_INIT
(
engine
);
}
}
else
if
(
INTEL_GEN
(
dev_priv
)
>=
6
)
{
engine
->
init_context
=
intel_rcs_ctx_init
;
...
...
@@ -2973,8 +2989,6 @@ int intel_init_render_ring_buffer(struct drm_device *dev)
engine
->
flush
=
gen6_render_ring_flush
;
engine
->
irq_enable_mask
=
GT_RENDER_USER_INTERRUPT
;
if
(
i915_semaphore_is_enabled
(
dev_priv
))
{
engine
->
semaphore
.
sync_to
=
gen6_ring_sync
;
engine
->
semaphore
.
signal
=
gen6_signal
;
/*
* The current semaphore is only applied on pre-gen8
* platform. And there is no VCS2 ring on the pre-gen8
...
...
@@ -3070,16 +3084,9 @@ int intel_init_bsd_ring_buffer(struct drm_device *dev)
if
(
INTEL_GEN
(
dev_priv
)
>=
8
)
{
engine
->
irq_enable_mask
=
GT_RENDER_USER_INTERRUPT
<<
GEN8_VCS1_IRQ_SHIFT
;
if
(
i915_semaphore_is_enabled
(
dev_priv
))
{
engine
->
semaphore
.
sync_to
=
gen8_ring_sync
;
engine
->
semaphore
.
signal
=
gen8_xcs_signal
;
GEN8_RING_SEMAPHORE_INIT
(
engine
);
}
}
else
{
engine
->
irq_enable_mask
=
GT_BSD_USER_INTERRUPT
;
if
(
i915_semaphore_is_enabled
(
dev_priv
))
{
engine
->
semaphore
.
sync_to
=
gen6_ring_sync
;
engine
->
semaphore
.
signal
=
gen6_signal
;
engine
->
semaphore
.
mbox
.
wait
[
RCS
]
=
MI_SEMAPHORE_SYNC_VR
;
engine
->
semaphore
.
mbox
.
wait
[
VCS
]
=
MI_SEMAPHORE_SYNC_INVALID
;
engine
->
semaphore
.
mbox
.
wait
[
BCS
]
=
MI_SEMAPHORE_SYNC_VB
;
...
...
@@ -3124,11 +3131,6 @@ int intel_init_bsd2_ring_buffer(struct drm_device *dev)
engine
->
flush
=
gen6_bsd_ring_flush
;
engine
->
irq_enable_mask
=
GT_RENDER_USER_INTERRUPT
<<
GEN8_VCS2_IRQ_SHIFT
;
if
(
i915_semaphore_is_enabled
(
dev_priv
))
{
engine
->
semaphore
.
sync_to
=
gen8_ring_sync
;
engine
->
semaphore
.
signal
=
gen8_xcs_signal
;
GEN8_RING_SEMAPHORE_INIT
(
engine
);
}
return
intel_init_ring_buffer
(
dev
,
engine
);
}
...
...
@@ -3150,16 +3152,9 @@ int intel_init_blt_ring_buffer(struct drm_device *dev)
if
(
INTEL_GEN
(
dev_priv
)
>=
8
)
{
engine
->
irq_enable_mask
=
GT_RENDER_USER_INTERRUPT
<<
GEN8_BCS_IRQ_SHIFT
;
if
(
i915_semaphore_is_enabled
(
dev_priv
))
{
engine
->
semaphore
.
sync_to
=
gen8_ring_sync
;
engine
->
semaphore
.
signal
=
gen8_xcs_signal
;
GEN8_RING_SEMAPHORE_INIT
(
engine
);
}
}
else
{
engine
->
irq_enable_mask
=
GT_BLT_USER_INTERRUPT
;
if
(
i915_semaphore_is_enabled
(
dev_priv
))
{
engine
->
semaphore
.
signal
=
gen6_signal
;
engine
->
semaphore
.
sync_to
=
gen6_ring_sync
;
/*
* The current semaphore is only applied on pre-gen8
* platform. And there is no VCS2 ring on the pre-gen8
...
...
@@ -3201,18 +3196,11 @@ int intel_init_vebox_ring_buffer(struct drm_device *dev)
if
(
INTEL_GEN
(
dev_priv
)
>=
8
)
{
engine
->
irq_enable_mask
=
GT_RENDER_USER_INTERRUPT
<<
GEN8_VECS_IRQ_SHIFT
;
if
(
i915_semaphore_is_enabled
(
dev_priv
))
{
engine
->
semaphore
.
sync_to
=
gen8_ring_sync
;
engine
->
semaphore
.
signal
=
gen8_xcs_signal
;
GEN8_RING_SEMAPHORE_INIT
(
engine
);
}
}
else
{
engine
->
irq_enable_mask
=
PM_VEBOX_USER_INTERRUPT
;
engine
->
irq_get
=
hsw_vebox_get_irq
;
engine
->
irq_put
=
hsw_vebox_put_irq
;
if
(
i915_semaphore_is_enabled
(
dev_priv
))
{
engine
->
semaphore
.
sync_to
=
gen6_ring_sync
;
engine
->
semaphore
.
signal
=
gen6_signal
;
engine
->
semaphore
.
mbox
.
wait
[
RCS
]
=
MI_SEMAPHORE_SYNC_VER
;
engine
->
semaphore
.
mbox
.
wait
[
VCS
]
=
MI_SEMAPHORE_SYNC_VEV
;
engine
->
semaphore
.
mbox
.
wait
[
BCS
]
=
MI_SEMAPHORE_SYNC_VEB
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录