Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
9d1a903d
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 大约 4 年
通知
14
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9d1a903d
编写于
9月 14, 2010
作者:
C
Chris Wilson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/i915/sdvo: Tidy intel_sdvo_hdmi_sink_detect
Signed-off-by:
N
Chris Wilson
<
chris@chris-wilson.co.uk
>
上级
2b6efaa4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
31 deletion
+24
-31
drivers/gpu/drm/i915/intel_sdvo.c
drivers/gpu/drm/i915/intel_sdvo.c
+24
-31
未找到文件。
drivers/gpu/drm/i915/intel_sdvo.c
浏览文件 @
9d1a903d
...
@@ -1417,60 +1417,53 @@ enum drm_connector_status
...
@@ -1417,60 +1417,53 @@ enum drm_connector_status
intel_sdvo_hdmi_sink_detect
(
struct
drm_connector
*
connector
)
intel_sdvo_hdmi_sink_detect
(
struct
drm_connector
*
connector
)
{
{
struct
intel_sdvo
*
intel_sdvo
=
intel_attached_sdvo
(
connector
);
struct
intel_sdvo
*
intel_sdvo
=
intel_attached_sdvo
(
connector
);
struct
intel_sdvo_connector
*
intel_sdvo_connector
=
to_intel_sdvo_connector
(
connector
);
enum
drm_connector_status
status
;
enum
drm_connector_status
status
=
connector_status_connected
;
struct
edid
*
edid
;
struct
edid
*
edid
=
NULL
;
edid
=
drm_get_edid
(
connector
,
intel_sdvo
->
base
.
ddc_bus
);
edid
=
drm_get_edid
(
connector
,
intel_sdvo
->
base
.
ddc_bus
);
/* This is only applied to SDVO cards with multiple outputs */
if
(
edid
==
NULL
&&
intel_sdvo_multifunc_encoder
(
intel_sdvo
))
{
if
(
edid
==
NULL
&&
intel_sdvo_multifunc_encoder
(
intel_sdvo
))
{
uint8_t
saved_ddc
,
temp_ddc
;
u8
saved_ddc
=
intel_sdvo
->
ddc_bus
,
ddc
;
saved_ddc
=
intel_sdvo
->
ddc_bus
;
temp_ddc
=
intel_sdvo
->
ddc_bus
>>
1
;
/*
/*
* Don't use the 1 as the argument of DDC bus switch to get
* Don't use the 1 as the argument of DDC bus switch to get
* the EDID. It is used for SDVO SPD ROM.
* the EDID. It is used for SDVO SPD ROM.
*/
*/
while
(
temp_ddc
>
1
)
{
for
(
ddc
=
intel_sdvo
->
ddc_bus
>>
1
;
ddc
>
1
;
ddc
>>=
1
)
{
intel_sdvo
->
ddc_bus
=
temp_
ddc
;
intel_sdvo
->
ddc_bus
=
ddc
;
edid
=
drm_get_edid
(
connector
,
intel_sdvo
->
base
.
ddc_bus
);
edid
=
drm_get_edid
(
connector
,
intel_sdvo
->
base
.
ddc_bus
);
if
(
edid
)
{
if
(
edid
)
/*
* When we can get the EDID, maybe it is the
* correct DDC bus. Update it.
*/
intel_sdvo
->
ddc_bus
=
temp_ddc
;
break
;
break
;
}
temp_ddc
>>=
1
;
}
}
/*
* If we found the EDID on the other bus, maybe that is the
* correct DDC bus.
*/
if
(
edid
==
NULL
)
if
(
edid
==
NULL
)
intel_sdvo
->
ddc_bus
=
saved_ddc
;
intel_sdvo
->
ddc_bus
=
saved_ddc
;
}
}
/* when there is no edid and no monitor is connected with VGA
* port, try to use the CRT ddc to read the EDID for DVI-connector
/*
* When there is no edid and no monitor is connected with VGA
* port, try to use the CRT ddc to read the EDID for DVI-connector.
*/
*/
if
(
edid
==
NULL
&&
intel_sdvo
->
analog_ddc_bus
&&
if
(
edid
==
NULL
&&
intel_sdvo
->
analog_ddc_bus
&&
!
intel_analog_is_connected
(
connector
->
dev
))
!
intel_analog_is_connected
(
connector
->
dev
))
edid
=
drm_get_edid
(
connector
,
intel_sdvo
->
analog_ddc_bus
);
edid
=
drm_get_edid
(
connector
,
intel_sdvo
->
analog_ddc_bus
);
status
=
connector_status_disconnected
;
if
(
edid
!=
NULL
)
{
if
(
edid
!=
NULL
)
{
bool
is_digital
=
!!
(
edid
->
input
&
DRM_EDID_INPUT_DIGITAL
);
bool
need_digital
=
!!
(
intel_sdvo_connector
->
output_flag
&
SDVO_TMDS_MASK
);
/* DDC bus is shared, match EDID to connector type */
/* DDC bus is shared, match EDID to connector type */
if
(
is_digital
&&
need_digital
)
if
(
edid
->
input
&
DRM_EDID_INPUT_DIGITAL
)
{
status
=
connector_status_connected
;
intel_sdvo
->
is_hdmi
=
drm_detect_hdmi_monitor
(
edid
);
intel_sdvo
->
is_hdmi
=
drm_detect_hdmi_monitor
(
edid
);
else
if
(
is_digital
!=
need_digital
)
}
status
=
connector_status_disconnected
;
connector
->
display_info
.
raw_edid
=
NULL
;
connector
->
display_info
.
raw_edid
=
NULL
;
}
else
kfree
(
edid
);
status
=
connector_status_disconnected
;
}
kfree
(
edid
);
return
status
;
return
status
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录