Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
25575b41
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看板
提交
25575b41
编写于
10月 05, 2011
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/hdmi: build ELD from EDID, notify audio driver of its presence
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
35bb5089
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
111 addition
and
1 deletion
+111
-1
drivers/gpu/drm/nouveau/Makefile
drivers/gpu/drm/nouveau/Makefile
+1
-1
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+3
-0
drivers/gpu/drm/nouveau/nouveau_hdmi.c
drivers/gpu/drm/nouveau/nouveau_hdmi.c
+103
-0
drivers/gpu/drm/nouveau/nv50_sor.c
drivers/gpu/drm/nouveau/nv50_sor.c
+4
-0
未找到文件。
drivers/gpu/drm/nouveau/Makefile
浏览文件 @
25575b41
...
...
@@ -9,7 +9,7 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \
nouveau_bo.o nouveau_fence.o nouveau_gem.o nouveau_ttm.o
\
nouveau_hw.o nouveau_calc.o nouveau_bios.o nouveau_i2c.o
\
nouveau_display.o nouveau_connector.o nouveau_fbcon.o
\
nouveau_dp.o nouveau_ramht.o
\
nouveau_
hdmi.o nouveau_
dp.o nouveau_ramht.o
\
nouveau_pm.o nouveau_volt.o nouveau_perf.o nouveau_temp.o
\
nouveau_mm.o nouveau_vm.o
\
nv04_timer.o
\
...
...
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
25575b41
...
...
@@ -1109,6 +1109,9 @@ int nouveau_ttm_global_init(struct drm_nouveau_private *);
void
nouveau_ttm_global_release
(
struct
drm_nouveau_private
*
);
int
nouveau_ttm_mmap
(
struct
file
*
,
struct
vm_area_struct
*
);
/* nouveau_hdmi.c */
void
nouveau_hdmi_mode_set
(
struct
drm_encoder
*
,
struct
drm_display_mode
*
);
/* nouveau_dp.c */
int
nouveau_dp_auxch
(
struct
nouveau_i2c_chan
*
auxch
,
int
cmd
,
int
addr
,
uint8_t
*
data
,
int
data_nr
);
...
...
drivers/gpu/drm/nouveau/nouveau_hdmi.c
0 → 100644
浏览文件 @
25575b41
/*
* Copyright 2011 Red Hat Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Authors: Ben Skeggs
*/
#include "drmP.h"
#include "nouveau_drv.h"
#include "nouveau_connector.h"
#include "nouveau_encoder.h"
static
bool
hdmi_sor
(
struct
drm_encoder
*
encoder
)
{
struct
drm_nouveau_private
*
dev_priv
=
encoder
->
dev
->
dev_private
;
if
(
dev_priv
->
chipset
<
0xa3
)
return
false
;
return
true
;
}
static
void
nouveau_audio_disconnect
(
struct
drm_encoder
*
encoder
)
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
drm_device
*
dev
=
encoder
->
dev
;
int
or
=
nv_encoder
->
or
*
0x800
;
if
(
hdmi_sor
(
encoder
))
{
nv_mask
(
dev
,
0x61c448
+
or
,
0x00000003
,
0x00000000
);
}
}
static
void
nouveau_audio_mode_set
(
struct
drm_encoder
*
encoder
,
struct
drm_display_mode
*
mode
)
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_connector
*
nv_connector
;
struct
drm_device
*
dev
=
encoder
->
dev
;
u32
or
=
nv_encoder
->
or
*
0x800
;
int
i
;
nv_connector
=
nouveau_encoder_connector_get
(
nv_encoder
);
if
(
!
drm_detect_monitor_audio
(
nv_connector
->
edid
))
{
nouveau_audio_disconnect
(
encoder
);
return
;
}
if
(
hdmi_sor
(
encoder
))
{
nv_mask
(
dev
,
0x61c448
+
or
,
0x00000001
,
0x00000001
);
drm_edid_to_eld
(
&
nv_connector
->
base
,
nv_connector
->
edid
);
if
(
nv_connector
->
base
.
eld
[
0
])
{
u8
*
eld
=
nv_connector
->
base
.
eld
;
for
(
i
=
0
;
i
<
eld
[
2
]
*
4
;
i
++
)
nv_wr32
(
dev
,
0x61c440
+
or
,
(
i
<<
8
)
|
eld
[
i
]);
for
(
i
=
eld
[
2
]
*
4
;
i
<
0x60
;
i
++
)
nv_wr32
(
dev
,
0x61c440
+
or
,
(
i
<<
8
)
|
0x00
);
nv_mask
(
dev
,
0x61c448
+
or
,
0x00000002
,
0x00000002
);
}
}
}
static
void
nouveau_hdmi_disconnect
(
struct
drm_encoder
*
encoder
)
{
nouveau_audio_disconnect
(
encoder
);
}
void
nouveau_hdmi_mode_set
(
struct
drm_encoder
*
encoder
,
struct
drm_display_mode
*
mode
)
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_connector
*
nv_connector
;
nv_connector
=
nouveau_encoder_connector_get
(
nv_encoder
);
if
(
!
mode
||
!
nv_connector
||
!
nv_connector
->
edid
||
!
drm_detect_hdmi_monitor
(
nv_connector
->
edid
))
{
nouveau_hdmi_disconnect
(
encoder
);
return
;
}
nouveau_audio_mode_set
(
encoder
,
mode
);
}
drivers/gpu/drm/nouveau/nv50_sor.c
浏览文件 @
25575b41
...
...
@@ -60,6 +60,8 @@ nv50_sor_disconnect(struct drm_encoder *encoder)
BEGIN_RING
(
evo
,
0
,
NV50_EVO_UPDATE
,
1
);
OUT_RING
(
evo
,
0
);
nouveau_hdmi_mode_set
(
encoder
,
NULL
);
nv_encoder
->
crtc
=
NULL
;
nv_encoder
->
last_dpms
=
DRM_MODE_DPMS_OFF
;
}
...
...
@@ -203,6 +205,8 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
mode_ctl
=
0x0500
;
}
else
mode_ctl
=
0x0200
;
nouveau_hdmi_mode_set
(
encoder
,
mode
);
break
;
case
OUTPUT_DP
:
nv_connector
=
nouveau_encoder_connector_get
(
nv_encoder
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录