Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
1a3665c8
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看板
提交
1a3665c8
编写于
1月 25, 2011
作者:
C
Chris Wilson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/i915/sdvo: Add BUILD_BUG_ON to warn if the structs are ever miscompiled
Signed-off-by:
N
Chris Wilson
<
chris@chris-wilson.co.uk
>
上级
bc65212c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
0 deletion
+9
-0
drivers/gpu/drm/i915/intel_sdvo.c
drivers/gpu/drm/i915/intel_sdvo.c
+9
-0
未找到文件。
drivers/gpu/drm/i915/intel_sdvo.c
浏览文件 @
1a3665c8
...
...
@@ -587,6 +587,7 @@ static bool intel_sdvo_get_trained_inputs(struct intel_sdvo *intel_sdvo, bool *i
{
struct
intel_sdvo_get_trained_inputs_response
response
;
BUILD_BUG_ON
(
sizeof
(
response
)
!=
1
);
if
(
!
intel_sdvo_get_value
(
intel_sdvo
,
SDVO_CMD_GET_TRAINED_INPUTS
,
&
response
,
sizeof
(
response
)))
return
false
;
...
...
@@ -634,6 +635,7 @@ static bool intel_sdvo_get_input_pixel_clock_range(struct intel_sdvo *intel_sdvo
{
struct
intel_sdvo_pixel_clock_range
clocks
;
BUILD_BUG_ON
(
sizeof
(
clocks
)
!=
4
);
if
(
!
intel_sdvo_get_value
(
intel_sdvo
,
SDVO_CMD_GET_INPUT_PIXEL_CLOCK_RANGE
,
&
clocks
,
sizeof
(
clocks
)))
...
...
@@ -701,6 +703,8 @@ intel_sdvo_create_preferred_input_timing(struct intel_sdvo *intel_sdvo,
static
bool
intel_sdvo_get_preferred_input_timing
(
struct
intel_sdvo
*
intel_sdvo
,
struct
intel_sdvo_dtd
*
dtd
)
{
BUILD_BUG_ON
(
sizeof
(
dtd
->
part1
)
!=
8
);
BUILD_BUG_ON
(
sizeof
(
dtd
->
part2
)
!=
8
);
return
intel_sdvo_get_value
(
intel_sdvo
,
SDVO_CMD_GET_PREFERRED_INPUT_TIMING_PART1
,
&
dtd
->
part1
,
sizeof
(
dtd
->
part1
))
&&
intel_sdvo_get_value
(
intel_sdvo
,
SDVO_CMD_GET_PREFERRED_INPUT_TIMING_PART2
,
...
...
@@ -798,6 +802,7 @@ static bool intel_sdvo_check_supp_encode(struct intel_sdvo *intel_sdvo)
{
struct
intel_sdvo_encode
encode
;
BUILD_BUG_ON
(
sizeof
(
encode
)
!=
2
);
return
intel_sdvo_get_value
(
intel_sdvo
,
SDVO_CMD_GET_SUPP_ENCODE
,
&
encode
,
sizeof
(
encode
));
...
...
@@ -1161,6 +1166,7 @@ static int intel_sdvo_mode_valid(struct drm_connector *connector,
static
bool
intel_sdvo_get_capabilities
(
struct
intel_sdvo
*
intel_sdvo
,
struct
intel_sdvo_caps
*
caps
)
{
BUILD_BUG_ON
(
sizeof
(
*
caps
)
!=
8
);
if
(
!
intel_sdvo_get_value
(
intel_sdvo
,
SDVO_CMD_GET_DEVICE_CAPS
,
caps
,
sizeof
(
*
caps
)))
...
...
@@ -2200,6 +2206,7 @@ static bool intel_sdvo_tv_create_property(struct intel_sdvo *intel_sdvo,
if
(
!
intel_sdvo_set_target_output
(
intel_sdvo
,
type
))
return
false
;
BUILD_BUG_ON
(
sizeof
(
format
)
!=
6
);
if
(
!
intel_sdvo_get_value
(
intel_sdvo
,
SDVO_CMD_GET_SUPPORTED_TV_FORMATS
,
&
format
,
sizeof
(
format
)))
...
...
@@ -2406,6 +2413,8 @@ static bool intel_sdvo_create_enhance_property(struct intel_sdvo *intel_sdvo,
uint16_t
response
;
}
enhancements
;
BUILD_BUG_ON
(
sizeof
(
enhancements
)
!=
2
);
enhancements
.
response
=
0
;
intel_sdvo_get_value
(
intel_sdvo
,
SDVO_CMD_GET_SUPPORTED_ENHANCEMENTS
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录