Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
4e901fdc
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看板
提交
4e901fdc
编写于
10月 26, 2009
作者:
E
Eric Anholt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/i915: Set up fence registers on sandybridge.
Signed-off-by:
N
Eric Anholt
<
eric@anholt.net
>
上级
bad720ff
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
3 deletion
+33
-3
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem.c
+30
-3
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/i915_reg.h
+3
-0
未找到文件。
drivers/gpu/drm/i915/i915_gem.c
浏览文件 @
4e901fdc
...
...
@@ -2261,6 +2261,28 @@ i915_gem_object_get_pages(struct drm_gem_object *obj,
return
0
;
}
static
void
sandybridge_write_fence_reg
(
struct
drm_i915_fence_reg
*
reg
)
{
struct
drm_gem_object
*
obj
=
reg
->
obj
;
struct
drm_device
*
dev
=
obj
->
dev
;
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
struct
drm_i915_gem_object
*
obj_priv
=
obj
->
driver_private
;
int
regnum
=
obj_priv
->
fence_reg
;
uint64_t
val
;
val
=
(
uint64_t
)((
obj_priv
->
gtt_offset
+
obj
->
size
-
4096
)
&
0xfffff000
)
<<
32
;
val
|=
obj_priv
->
gtt_offset
&
0xfffff000
;
val
|=
(
uint64_t
)((
obj_priv
->
stride
/
128
)
-
1
)
<<
SANDYBRIDGE_FENCE_PITCH_SHIFT
;
if
(
obj_priv
->
tiling_mode
==
I915_TILING_Y
)
val
|=
1
<<
I965_FENCE_TILING_Y_SHIFT
;
val
|=
I965_FENCE_REG_VALID
;
I915_WRITE64
(
FENCE_REG_SANDYBRIDGE_0
+
(
regnum
*
8
),
val
);
}
static
void
i965_write_fence_reg
(
struct
drm_i915_fence_reg
*
reg
)
{
struct
drm_gem_object
*
obj
=
reg
->
obj
;
...
...
@@ -2478,7 +2500,9 @@ i915_gem_object_get_fence_reg(struct drm_gem_object *obj)
reg
->
obj
=
obj
;
if
(
IS_I965G
(
dev
))
if
(
IS_GEN6
(
dev
))
sandybridge_write_fence_reg
(
reg
);
else
if
(
IS_I965G
(
dev
))
i965_write_fence_reg
(
reg
);
else
if
(
IS_I9XX
(
dev
))
i915_write_fence_reg
(
reg
);
...
...
@@ -2504,9 +2528,12 @@ i915_gem_clear_fence_reg(struct drm_gem_object *obj)
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
struct
drm_i915_gem_object
*
obj_priv
=
obj
->
driver_private
;
if
(
IS_I965G
(
dev
))
if
(
IS_GEN6
(
dev
))
{
I915_WRITE64
(
FENCE_REG_SANDYBRIDGE_0
+
(
obj_priv
->
fence_reg
*
8
),
0
);
}
else
if
(
IS_I965G
(
dev
))
{
I915_WRITE64
(
FENCE_REG_965_0
+
(
obj_priv
->
fence_reg
*
8
),
0
);
else
{
}
else
{
uint32_t
fence_reg
;
if
(
obj_priv
->
fence_reg
<
8
)
...
...
drivers/gpu/drm/i915/i915_reg.h
浏览文件 @
4e901fdc
...
...
@@ -235,6 +235,9 @@
#define I965_FENCE_REG_VALID (1<<0)
#define I965_FENCE_MAX_PITCH_VAL 0x0400
#define FENCE_REG_SANDYBRIDGE_0 0x100000
#define SANDYBRIDGE_FENCE_PITCH_SHIFT 32
/*
* Instruction and interrupt control regs
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录