Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
10ffe0fa
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看板
提交
10ffe0fa
编写于
5月 08, 2018
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/kms/nv50-: abstract head interfaces so the code can be split
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
9ca6f1eb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
50 addition
and
14 deletion
+50
-14
drivers/gpu/drm/nouveau/dispnv50/disp.c
drivers/gpu/drm/nouveau/dispnv50/disp.c
+50
-14
未找到文件。
drivers/gpu/drm/nouveau/dispnv50/disp.c
浏览文件 @
10ffe0fa
...
...
@@ -436,6 +436,7 @@ struct nv50_sync {
};
struct
nv50_head
{
const
struct
nv50_head_func
*
func
;
struct
nouveau_crtc
base
;
struct
{
struct
nouveau_bo
*
nvbo
[
2
];
...
...
@@ -443,7 +444,22 @@ struct nv50_head {
}
lut
;
};
#define nv50_head(c) ((struct nv50_head *)nouveau_crtc(c))
struct
nv50_head_func
{
void
(
*
view
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
(
*
mode
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
(
*
ilut_set
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
(
*
ilut_clr
)(
struct
nv50_head
*
);
void
(
*
core_set
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
(
*
core_clr
)(
struct
nv50_head
*
);
void
(
*
curs_set
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
(
*
curs_clr
)(
struct
nv50_head
*
);
void
(
*
base
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
(
*
ovly
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
(
*
dither
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
(
*
procamp
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
};
#define nv50_head(c) container_of((c), struct nv50_head, base.base)
struct
nv50_disp
{
struct
nvif_disp
*
disp
;
...
...
@@ -470,6 +486,7 @@ struct nv50_core {
};
struct
nv50_core_func
{
const
struct
nv50_head_func
*
head
;
};
static
int
...
...
@@ -2002,22 +2019,38 @@ nv50_head_view(struct nv50_head *head, struct nv50_head_atom *asyh)
}
}
static
const
struct
nv50_head_func
head507d
=
{
.
view
=
nv50_head_view
,
.
mode
=
nv50_head_mode
,
.
ilut_set
=
nv50_head_lut_set
,
.
ilut_clr
=
nv50_head_lut_clr
,
.
core_set
=
nv50_head_core_set
,
.
core_clr
=
nv50_head_core_clr
,
.
curs_set
=
nv50_head_curs_set
,
.
curs_clr
=
nv50_head_curs_clr
,
.
base
=
nv50_head_base
,
.
ovly
=
nv50_head_ovly
,
.
dither
=
nv50_head_dither
,
.
procamp
=
nv50_head_procamp
,
};
static
void
nv50_head_flush_clr
(
struct
nv50_head
*
head
,
struct
nv50_head_atom
*
asyh
,
bool
y
)
{
if
(
asyh
->
clr
.
ilut
&&
(
!
asyh
->
set
.
ilut
||
y
))
nv50_head_
lut_clr
(
head
);
head
->
func
->
i
lut_clr
(
head
);
if
(
asyh
->
clr
.
core
&&
(
!
asyh
->
set
.
core
||
y
))
nv50_head_
core_clr
(
head
);
head
->
func
->
core_clr
(
head
);
if
(
asyh
->
clr
.
curs
&&
(
!
asyh
->
set
.
curs
||
y
))
nv50_head_
curs_clr
(
head
);
head
->
func
->
curs_clr
(
head
);
}
static
void
nv50_head_flush_set
(
struct
nv50_head
*
head
,
struct
nv50_head_atom
*
asyh
)
{
if
(
asyh
->
set
.
view
)
nv50_head_
view
(
head
,
asyh
);
if
(
asyh
->
set
.
mode
)
nv50_head_
mode
(
head
,
asyh
);
if
(
asyh
->
set
.
view
)
head
->
func
->
view
(
head
,
asyh
);
if
(
asyh
->
set
.
mode
)
head
->
func
->
mode
(
head
,
asyh
);
if
(
asyh
->
set
.
ilut
)
{
struct
nouveau_bo
*
nvbo
=
head
->
lut
.
nvbo
[
head
->
lut
.
next
];
struct
drm_property_blob
*
blob
=
asyh
->
state
.
gamma_lut
;
...
...
@@ -2025,14 +2058,14 @@ nv50_head_flush_set(struct nv50_head *head, struct nv50_head_atom *asyh)
nv50_head_lut_load
(
blob
,
asyh
->
lut
.
mode
,
nvbo
);
asyh
->
lut
.
offset
=
nvbo
->
bo
.
offset
;
head
->
lut
.
next
^=
1
;
nv50_head_
lut_set
(
head
,
asyh
);
head
->
func
->
i
lut_set
(
head
,
asyh
);
}
if
(
asyh
->
set
.
core
)
nv50_head_
core_set
(
head
,
asyh
);
if
(
asyh
->
set
.
curs
)
nv50_head_
curs_set
(
head
,
asyh
);
if
(
asyh
->
set
.
base
)
nv50_head_
base
(
head
,
asyh
);
if
(
asyh
->
set
.
ovly
)
nv50_head_
ovly
(
head
,
asyh
);
if
(
asyh
->
set
.
dither
)
nv50_head_
dither
(
head
,
asyh
);
if
(
asyh
->
set
.
procamp
)
nv50_head_
procamp
(
head
,
asyh
);
if
(
asyh
->
set
.
core
)
head
->
func
->
core_set
(
head
,
asyh
);
if
(
asyh
->
set
.
curs
)
head
->
func
->
curs_set
(
head
,
asyh
);
if
(
asyh
->
set
.
base
)
head
->
func
->
base
(
head
,
asyh
);
if
(
asyh
->
set
.
ovly
)
head
->
func
->
ovly
(
head
,
asyh
);
if
(
asyh
->
set
.
dither
)
head
->
func
->
dither
(
head
,
asyh
);
if
(
asyh
->
set
.
procamp
)
head
->
func
->
procamp
(
head
,
asyh
);
}
static
void
...
...
@@ -2422,7 +2455,7 @@ nv50_head_destroy(struct drm_crtc *crtc)
nouveau_bo_unmap_unpin_unref
(
&
head
->
lut
.
nvbo
[
i
]);
drm_crtc_cleanup
(
crtc
);
kfree
(
crtc
);
kfree
(
head
);
}
static
const
struct
drm_crtc_funcs
...
...
@@ -2440,6 +2473,7 @@ static int
nv50_head_create
(
struct
drm_device
*
dev
,
int
index
)
{
struct
nouveau_drm
*
drm
=
nouveau_drm
(
dev
);
struct
nv50_disp
*
disp
=
nv50_disp
(
dev
);
struct
nv50_head
*
head
;
struct
nv50_wndw
*
curs
,
*
wndw
;
struct
drm_crtc
*
crtc
;
...
...
@@ -2449,6 +2483,7 @@ nv50_head_create(struct drm_device *dev, int index)
if
(
!
head
)
return
-
ENOMEM
;
head
->
func
=
disp
->
core
->
func
->
head
;
head
->
base
.
index
=
index
;
ret
=
nv50_base_new
(
drm
,
head
->
base
.
index
,
&
wndw
);
if
(
ret
==
0
)
...
...
@@ -2482,6 +2517,7 @@ nv50_head_create(struct drm_device *dev, int index)
static
const
struct
nv50_core_func
core507d
=
{
.
head
=
&
head507d
,
};
static
int
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录