Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
0c41ee2b
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看板
提交
0c41ee2b
编写于
3月 29, 2010
作者:
Z
Zhenyu Wang
提交者:
Eric Anholt
4月 12, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/i915: convert TV driver to new encoder/connector structure
Signed-off-by:
N
Zhenyu Wang
<
zhenyuw@linux.intel.com
>
上级
d2a82a6f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
14 deletion
+26
-14
drivers/gpu/drm/i915/intel_tv.c
drivers/gpu/drm/i915/intel_tv.c
+26
-14
未找到文件。
drivers/gpu/drm/i915/intel_tv.c
浏览文件 @
0c41ee2b
...
...
@@ -941,7 +941,8 @@ intel_tv_mode_find (struct intel_encoder *intel_encoder)
static
enum
drm_mode_status
intel_tv_mode_valid
(
struct
drm_connector
*
connector
,
struct
drm_display_mode
*
mode
)
{
struct
intel_encoder
*
intel_encoder
=
to_intel_encoder
(
connector
);
struct
drm_encoder
*
encoder
=
intel_attached_encoder
(
connector
);
struct
intel_encoder
*
intel_encoder
=
enc_to_intel_encoder
(
encoder
);
const
struct
tv_mode
*
tv_mode
=
intel_tv_mode_find
(
intel_encoder
);
/* Ensure TV refresh is close to desired refresh */
...
...
@@ -1313,7 +1314,8 @@ intel_tv_detect_type (struct drm_crtc *crtc, struct intel_encoder *intel_encoder
*/
static
void
intel_tv_find_better_format
(
struct
drm_connector
*
connector
)
{
struct
intel_encoder
*
intel_encoder
=
to_intel_encoder
(
connector
);
struct
drm_encoder
*
encoder
=
intel_attached_encoder
(
connector
);
struct
intel_encoder
*
intel_encoder
=
enc_to_intel_encoder
(
encoder
);
struct
intel_tv_priv
*
tv_priv
=
intel_encoder
->
dev_priv
;
const
struct
tv_mode
*
tv_mode
=
intel_tv_mode_find
(
intel_encoder
);
int
i
;
...
...
@@ -1347,9 +1349,9 @@ intel_tv_detect(struct drm_connector *connector)
{
struct
drm_crtc
*
crtc
;
struct
drm_display_mode
mode
;
struct
intel_encoder
*
intel_encoder
=
to_intel_encoder
(
connector
);
struct
drm_encoder
*
encoder
=
intel_attached_encoder
(
connector
);
struct
intel_encoder
*
intel_encoder
=
enc_to_intel_encoder
(
encoder
);
struct
intel_tv_priv
*
tv_priv
=
intel_encoder
->
dev_priv
;
struct
drm_encoder
*
encoder
=
&
intel_encoder
->
enc
;
int
dpms_mode
;
int
type
=
tv_priv
->
type
;
...
...
@@ -1399,7 +1401,8 @@ static void
intel_tv_chose_preferred_modes
(
struct
drm_connector
*
connector
,
struct
drm_display_mode
*
mode_ptr
)
{
struct
intel_encoder
*
intel_encoder
=
to_intel_encoder
(
connector
);
struct
drm_encoder
*
encoder
=
intel_attached_encoder
(
connector
);
struct
intel_encoder
*
intel_encoder
=
enc_to_intel_encoder
(
encoder
);
const
struct
tv_mode
*
tv_mode
=
intel_tv_mode_find
(
intel_encoder
);
if
(
tv_mode
->
nbr_end
<
480
&&
mode_ptr
->
vdisplay
==
480
)
...
...
@@ -1424,7 +1427,8 @@ static int
intel_tv_get_modes
(
struct
drm_connector
*
connector
)
{
struct
drm_display_mode
*
mode_ptr
;
struct
intel_encoder
*
intel_encoder
=
to_intel_encoder
(
connector
);
struct
drm_encoder
*
encoder
=
intel_attached_encoder
(
connector
);
struct
intel_encoder
*
intel_encoder
=
enc_to_intel_encoder
(
encoder
);
const
struct
tv_mode
*
tv_mode
=
intel_tv_mode_find
(
intel_encoder
);
int
j
,
count
=
0
;
u64
tmp
;
...
...
@@ -1478,11 +1482,9 @@ intel_tv_get_modes(struct drm_connector *connector)
static
void
intel_tv_destroy
(
struct
drm_connector
*
connector
)
{
struct
intel_encoder
*
intel_encoder
=
to_intel_encoder
(
connector
);
drm_sysfs_connector_remove
(
connector
);
drm_connector_cleanup
(
connector
);
kfree
(
intel_encode
r
);
kfree
(
connecto
r
);
}
...
...
@@ -1491,9 +1493,9 @@ intel_tv_set_property(struct drm_connector *connector, struct drm_property *prop
uint64_t
val
)
{
struct
drm_device
*
dev
=
connector
->
dev
;
struct
intel_encoder
*
intel_encoder
=
to_intel_encoder
(
connector
);
struct
drm_encoder
*
encoder
=
intel_attached_encoder
(
connector
);
struct
intel_encoder
*
intel_encoder
=
enc_to_intel_encoder
(
encoder
);
struct
intel_tv_priv
*
tv_priv
=
intel_encoder
->
dev_priv
;
struct
drm_encoder
*
encoder
=
&
intel_encoder
->
enc
;
struct
drm_crtc
*
crtc
=
encoder
->
crtc
;
int
ret
=
0
;
bool
changed
=
false
;
...
...
@@ -1559,12 +1561,15 @@ static const struct drm_connector_funcs intel_tv_connector_funcs = {
static
const
struct
drm_connector_helper_funcs
intel_tv_connector_helper_funcs
=
{
.
mode_valid
=
intel_tv_mode_valid
,
.
get_modes
=
intel_tv_get_modes
,
.
best_encoder
=
intel_
best
_encoder
,
.
best_encoder
=
intel_
attached
_encoder
,
};
static
void
intel_tv_enc_destroy
(
struct
drm_encoder
*
encoder
)
{
struct
intel_encoder
*
intel_encoder
=
enc_to_intel_encoder
(
encoder
);
drm_encoder_cleanup
(
encoder
);
kfree
(
intel_encoder
);
}
static
const
struct
drm_encoder_funcs
intel_tv_enc_funcs
=
{
...
...
@@ -1613,6 +1618,7 @@ intel_tv_init(struct drm_device *dev)
struct
drm_i915_private
*
dev_priv
=
dev
->
dev_private
;
struct
drm_connector
*
connector
;
struct
intel_encoder
*
intel_encoder
;
struct
intel_connector
*
intel_connector
;
struct
intel_tv_priv
*
tv_priv
;
u32
tv_dac_on
,
tv_dac_off
,
save_tv_dac
;
char
**
tv_format_names
;
...
...
@@ -1658,7 +1664,13 @@ intel_tv_init(struct drm_device *dev)
return
;
}
connector
=
&
intel_encoder
->
base
;
intel_connector
=
kzalloc
(
sizeof
(
struct
intel_connector
),
GFP_KERNEL
);
if
(
!
intel_connector
)
{
kfree
(
intel_encoder
);
return
;
}
connector
=
&
intel_connector
->
base
;
drm_connector_init
(
dev
,
connector
,
&
intel_tv_connector_funcs
,
DRM_MODE_CONNECTOR_SVIDEO
);
...
...
@@ -1666,7 +1678,7 @@ intel_tv_init(struct drm_device *dev)
drm_encoder_init
(
dev
,
&
intel_encoder
->
enc
,
&
intel_tv_enc_funcs
,
DRM_MODE_ENCODER_TVDAC
);
drm_mode_connector_attach_encoder
(
&
intel_
encode
r
->
base
,
&
intel_encoder
->
enc
);
drm_mode_connector_attach_encoder
(
&
intel_
connecto
r
->
base
,
&
intel_encoder
->
enc
);
tv_priv
=
(
struct
intel_tv_priv
*
)(
intel_encoder
+
1
);
intel_encoder
->
type
=
INTEL_OUTPUT_TVOUT
;
intel_encoder
->
crtc_mask
=
(
1
<<
0
)
|
(
1
<<
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录