Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
01d380ab
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
163
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看板
提交
01d380ab
编写于
5月 08, 2018
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/kms/gk104-: support additional cursor sizes
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
b05d8738
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
65 addition
and
16 deletion
+65
-16
drivers/gpu/drm/nouveau/dispnv50/atom.h
drivers/gpu/drm/nouveau/dispnv50/atom.h
+1
-1
drivers/gpu/drm/nouveau/dispnv50/curs507a.c
drivers/gpu/drm/nouveau/dispnv50/curs507a.c
+7
-15
drivers/gpu/drm/nouveau/dispnv50/head.h
drivers/gpu/drm/nouveau/dispnv50/head.h
+8
-0
drivers/gpu/drm/nouveau/dispnv50/head507d.c
drivers/gpu/drm/nouveau/dispnv50/head507d.c
+28
-0
drivers/gpu/drm/nouveau/dispnv50/head827d.c
drivers/gpu/drm/nouveau/dispnv50/head827d.c
+2
-0
drivers/gpu/drm/nouveau/dispnv50/head907d.c
drivers/gpu/drm/nouveau/dispnv50/head907d.c
+2
-0
drivers/gpu/drm/nouveau/dispnv50/head917d.c
drivers/gpu/drm/nouveau/dispnv50/head917d.c
+17
-0
未找到文件。
drivers/gpu/drm/nouveau/dispnv50/atom.h
浏览文件 @
01d380ab
...
...
@@ -76,7 +76,7 @@ struct nv50_head_atom {
bool
visible
;
u32
handle
;
u64
offset
:
40
;
u8
layout
:
1
;
u8
layout
:
2
;
u8
format
:
1
;
}
curs
;
...
...
drivers/gpu/drm/nouveau/dispnv50/curs507a.c
浏览文件 @
01d380ab
...
...
@@ -21,6 +21,7 @@
*/
#include "curs.h"
#include "core.h"
#include "head.h"
#include <nvif/cl507a.h>
...
...
@@ -70,6 +71,7 @@ static int
curs507a_acquire
(
struct
nv50_wndw
*
wndw
,
struct
nv50_wndw_atom
*
asyw
,
struct
nv50_head_atom
*
asyh
)
{
struct
nv50_head
*
head
=
nv50_head
(
asyw
->
state
.
crtc
);
int
ret
;
ret
=
drm_atomic_helper_check_plane_state
(
&
asyw
->
state
,
&
asyh
->
state
,
...
...
@@ -80,24 +82,14 @@ curs507a_acquire(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw,
if
(
ret
||
!
asyh
->
curs
.
visible
)
return
ret
;
switch
(
asyw
->
state
.
fb
->
width
)
{
case
32
:
asyh
->
curs
.
layout
=
0
;
break
;
case
64
:
asyh
->
curs
.
layout
=
1
;
break
;
default:
return
-
EINVAL
;
}
if
(
asyw
->
state
.
fb
->
width
!=
asyw
->
state
.
fb
->
height
)
if
(
asyw
->
image
.
w
!=
asyw
->
image
.
h
)
return
-
EINVAL
;
switch
(
asyw
->
image
.
format
)
{
case
0xcf
:
asyh
->
curs
.
format
=
1
;
break
;
default:
WARN_ON
(
1
);
return
-
EINVAL
;
}
ret
=
head
->
func
->
curs_layout
(
head
,
asyw
,
asyh
);
if
(
ret
)
return
ret
;
return
0
;
return
head
->
func
->
curs_format
(
head
,
asyw
,
asyh
)
;
}
static
const
u32
...
...
drivers/gpu/drm/nouveau/dispnv50/head.h
浏览文件 @
01d380ab
...
...
@@ -26,6 +26,10 @@ struct nv50_head_func {
void
(
*
core_calc
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
(
*
core_set
)(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
(
*
core_clr
)(
struct
nv50_head
*
);
int
(
*
curs_layout
)(
struct
nv50_head
*
,
struct
nv50_wndw_atom
*
,
struct
nv50_head_atom
*
);
int
(
*
curs_format
)(
struct
nv50_head
*
,
struct
nv50_wndw_atom
*
,
struct
nv50_head_atom
*
);
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
*
);
...
...
@@ -41,6 +45,10 @@ void head507d_mode(struct nv50_head *, struct nv50_head_atom *);
void
head507d_olut
(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
head507d_core_calc
(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
head507d_core_clr
(
struct
nv50_head
*
);
int
head507d_curs_layout
(
struct
nv50_head
*
,
struct
nv50_wndw_atom
*
,
struct
nv50_head_atom
*
);
int
head507d_curs_format
(
struct
nv50_head
*
,
struct
nv50_wndw_atom
*
,
struct
nv50_head_atom
*
);
void
head507d_base
(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
head507d_ovly
(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
void
head507d_dither
(
struct
nv50_head
*
,
struct
nv50_head_atom
*
);
...
...
drivers/gpu/drm/nouveau/dispnv50/head507d.c
浏览文件 @
01d380ab
...
...
@@ -128,6 +128,32 @@ head507d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
}
}
int
head507d_curs_format
(
struct
nv50_head
*
head
,
struct
nv50_wndw_atom
*
asyw
,
struct
nv50_head_atom
*
asyh
)
{
switch
(
asyw
->
image
.
format
)
{
case
0xcf
:
asyh
->
curs
.
format
=
1
;
break
;
default:
WARN_ON
(
1
);
return
-
EINVAL
;
}
return
0
;
}
int
head507d_curs_layout
(
struct
nv50_head
*
head
,
struct
nv50_wndw_atom
*
asyw
,
struct
nv50_head_atom
*
asyh
)
{
switch
(
asyw
->
image
.
w
)
{
case
32
:
asyh
->
curs
.
layout
=
0
;
break
;
case
64
:
asyh
->
curs
.
layout
=
1
;
break
;
default:
return
-
EINVAL
;
}
return
0
;
}
void
head507d_core_clr
(
struct
nv50_head
*
head
)
{
...
...
@@ -287,6 +313,8 @@ head507d = {
.
core_calc
=
head507d_core_calc
,
.
core_set
=
head507d_core_set
,
.
core_clr
=
head507d_core_clr
,
.
curs_layout
=
head507d_curs_layout
,
.
curs_format
=
head507d_curs_format
,
.
curs_set
=
head507d_curs_set
,
.
curs_clr
=
head507d_curs_clr
,
.
base
=
head507d_base
,
...
...
drivers/gpu/drm/nouveau/dispnv50/head827d.c
浏览文件 @
01d380ab
...
...
@@ -113,6 +113,8 @@ head827d = {
.
core_calc
=
head507d_core_calc
,
.
core_set
=
head827d_core_set
,
.
core_clr
=
head507d_core_clr
,
.
curs_layout
=
head507d_curs_layout
,
.
curs_format
=
head507d_curs_format
,
.
curs_set
=
head827d_curs_set
,
.
curs_clr
=
head827d_curs_clr
,
.
base
=
head507d_base
,
...
...
drivers/gpu/drm/nouveau/dispnv50/head907d.c
浏览文件 @
01d380ab
...
...
@@ -270,6 +270,8 @@ head907d = {
.
core_calc
=
head507d_core_calc
,
.
core_set
=
head907d_core_set
,
.
core_clr
=
head907d_core_clr
,
.
curs_layout
=
head507d_curs_layout
,
.
curs_format
=
head507d_curs_format
,
.
curs_set
=
head907d_curs_set
,
.
curs_clr
=
head907d_curs_clr
,
.
base
=
head907d_base
,
...
...
drivers/gpu/drm/nouveau/dispnv50/head917d.c
浏览文件 @
01d380ab
...
...
@@ -63,6 +63,21 @@ head917d_base(struct nv50_head *head, struct nv50_head_atom *asyh)
}
}
static
int
head917d_curs_layout
(
struct
nv50_head
*
head
,
struct
nv50_wndw_atom
*
asyw
,
struct
nv50_head_atom
*
asyh
)
{
switch
(
asyw
->
state
.
fb
->
width
)
{
case
32
:
asyh
->
curs
.
layout
=
0
;
break
;
case
64
:
asyh
->
curs
.
layout
=
1
;
break
;
case
128
:
asyh
->
curs
.
layout
=
2
;
break
;
case
256
:
asyh
->
curs
.
layout
=
3
;
break
;
default:
return
-
EINVAL
;
}
return
0
;
}
const
struct
nv50_head_func
head917d
=
{
.
view
=
head907d_view
,
...
...
@@ -73,6 +88,8 @@ head917d = {
.
core_calc
=
head507d_core_calc
,
.
core_set
=
head907d_core_set
,
.
core_clr
=
head907d_core_clr
,
.
curs_layout
=
head917d_curs_layout
,
.
curs_format
=
head507d_curs_format
,
.
curs_set
=
head907d_curs_set
,
.
curs_clr
=
head907d_curs_clr
,
.
base
=
head917d_base
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录