Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
b2337f23
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看板
提交
b2337f23
编写于
10月 05, 2011
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/hdmi: enable sending of avi/audio infoframes
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
52c7bcdb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
103 addition
and
0 deletion
+103
-0
drivers/gpu/drm/nouveau/nouveau_hdmi.c
drivers/gpu/drm/nouveau/nouveau_hdmi.c
+103
-0
未找到文件。
drivers/gpu/drm/nouveau/nouveau_hdmi.c
浏览文件 @
b2337f23
...
...
@@ -110,10 +110,107 @@ nouveau_audio_mode_set(struct drm_encoder *encoder,
}
}
static
void
nouveau_hdmi_infoframe
(
struct
drm_encoder
*
encoder
,
u32
ctrl
,
u8
*
frame
)
{
/* calculate checksum for the infoframe */
u8
sum
=
0
,
i
;
for
(
i
=
0
;
i
<
frame
[
2
];
i
++
)
sum
+=
frame
[
i
];
frame
[
3
]
=
256
-
sum
;
/* disable infoframe, and write header */
hdmi_mask
(
encoder
,
ctrl
+
0x00
,
0x00000001
,
0x00000000
);
hdmi_wr32
(
encoder
,
ctrl
+
0x08
,
*
(
u32
*
)
frame
&
0xffffff
);
/* register scans tell me the audio infoframe has only one set of
* subpack regs, according to tegra (gee nvidia, it'd be nice if we
* could get those docs too!), the hdmi block pads out the rest of
* the packet on its own.
*/
if
(
ctrl
==
0x020
)
frame
[
2
]
=
6
;
/* write out checksum and data, weird weird 7 byte register pairs */
for
(
i
=
0
;
i
<
frame
[
2
]
+
1
;
i
+=
7
)
{
u32
rsubpack
=
ctrl
+
0x0c
+
((
i
/
7
)
*
8
);
u32
*
subpack
=
(
u32
*
)
&
frame
[
3
+
i
];
hdmi_wr32
(
encoder
,
rsubpack
+
0
,
subpack
[
0
]);
hdmi_wr32
(
encoder
,
rsubpack
+
4
,
subpack
[
1
]
&
0xffffff
);
}
/* enable the infoframe */
hdmi_mask
(
encoder
,
ctrl
,
0x00000001
,
0x00000001
);
}
static
void
nouveau_hdmi_video_infoframe
(
struct
drm_encoder
*
encoder
,
struct
drm_display_mode
*
mode
)
{
const
u8
Y
=
0
,
A
=
0
,
B
=
0
,
S
=
0
,
C
=
0
,
M
=
0
,
R
=
0
;
const
u8
ITC
=
0
,
EC
=
0
,
Q
=
0
,
SC
=
0
,
VIC
=
0
,
PR
=
0
;
const
u8
bar_top
=
0
,
bar_bottom
=
0
,
bar_left
=
0
,
bar_right
=
0
;
u8
frame
[
20
];
frame
[
0x00
]
=
0x82
;
/* AVI infoframe */
frame
[
0x01
]
=
0x02
;
/* version */
frame
[
0x02
]
=
0x0d
;
/* length */
frame
[
0x03
]
=
0x00
;
frame
[
0x04
]
=
(
Y
<<
5
)
|
(
A
<<
4
)
|
(
B
<<
2
)
|
S
;
frame
[
0x05
]
=
(
C
<<
6
)
|
(
M
<<
4
)
|
R
;
frame
[
0x06
]
=
(
ITC
<<
7
)
|
(
EC
<<
4
)
|
(
Q
<<
2
)
|
SC
;
frame
[
0x07
]
=
VIC
;
frame
[
0x08
]
=
PR
;
frame
[
0x09
]
=
bar_top
&
0xff
;
frame
[
0x0a
]
=
bar_top
>>
8
;
frame
[
0x0b
]
=
bar_bottom
&
0xff
;
frame
[
0x0c
]
=
bar_bottom
>>
8
;
frame
[
0x0d
]
=
bar_left
&
0xff
;
frame
[
0x0e
]
=
bar_left
>>
8
;
frame
[
0x0f
]
=
bar_right
&
0xff
;
frame
[
0x10
]
=
bar_right
>>
8
;
frame
[
0x11
]
=
0x00
;
frame
[
0x12
]
=
0x00
;
frame
[
0x13
]
=
0x00
;
nouveau_hdmi_infoframe
(
encoder
,
0x020
,
frame
);
}
static
void
nouveau_hdmi_audio_infoframe
(
struct
drm_encoder
*
encoder
,
struct
drm_display_mode
*
mode
)
{
const
u8
CT
=
0x00
,
CC
=
0x01
,
ceaSS
=
0x00
,
SF
=
0x00
,
FMT
=
0x00
;
const
u8
CA
=
0x00
,
DM_INH
=
0
,
LSV
=
0x00
;
u8
frame
[
12
];
frame
[
0x00
]
=
0x84
;
/* Audio infoframe */
frame
[
0x01
]
=
0x01
;
/* version */
frame
[
0x02
]
=
0x0a
;
/* length */
frame
[
0x03
]
=
0x00
;
frame
[
0x04
]
=
(
CT
<<
4
)
|
CC
;
frame
[
0x05
]
=
(
SF
<<
2
)
|
ceaSS
;
frame
[
0x06
]
=
FMT
;
frame
[
0x07
]
=
CA
;
frame
[
0x08
]
=
(
DM_INH
<<
7
)
|
(
LSV
<<
3
);
frame
[
0x09
]
=
0x00
;
frame
[
0x0a
]
=
0x00
;
frame
[
0x0b
]
=
0x00
;
nouveau_hdmi_infoframe
(
encoder
,
0x000
,
frame
);
}
static
void
nouveau_hdmi_disconnect
(
struct
drm_encoder
*
encoder
)
{
nouveau_audio_disconnect
(
encoder
);
/* disable audio and avi infoframes */
hdmi_mask
(
encoder
,
0x000
,
0x00000001
,
0x00000000
);
hdmi_mask
(
encoder
,
0x020
,
0x00000001
,
0x00000000
);
/* disable hdmi */
hdmi_mask
(
encoder
,
0x0a4
,
0x40000000
,
0x00000000
);
}
void
...
...
@@ -130,5 +227,11 @@ nouveau_hdmi_mode_set(struct drm_encoder *encoder,
return
;
}
/* enable hdmi */
hdmi_mask
(
encoder
,
0x0a4
,
0x40000000
,
0x40000000
);
nouveau_hdmi_video_infoframe
(
encoder
,
mode
);
nouveau_hdmi_audio_infoframe
(
encoder
,
mode
);
nouveau_audio_mode_set
(
encoder
,
mode
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录