Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
fc248a49
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fc248a49
编写于
1月 04, 2010
作者:
T
Tomi Valkeinen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OMAP: DSS2: RFBI: convert to new kfifo API
Signed-off-by:
N
Tomi Valkeinen
<
tomi.valkeinen@nokia.com
>
上级
7475e442
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
15 deletion
+15
-15
drivers/video/omap2/dss/rfbi.c
drivers/video/omap2/dss/rfbi.c
+15
-15
未找到文件。
drivers/video/omap2/dss/rfbi.c
浏览文件 @
fc248a49
...
...
@@ -120,7 +120,7 @@ static struct {
struct
omap_dss_device
*
dssdev
[
2
];
struct
kfifo
*
cmd_fifo
;
struct
kfifo
cmd_fifo
;
spinlock_t
cmd_lock
;
struct
completion
cmd_done
;
atomic_t
cmd_fifo_full
;
...
...
@@ -1011,20 +1011,20 @@ static void process_cmd_fifo(void)
return
;
while
(
true
)
{
spin_lock_irqsave
(
rfbi
.
cmd_fifo
->
lock
,
flags
);
spin_lock_irqsave
(
&
rfbi
.
cmd_
lock
,
flags
);
len
=
__kfifo_get
(
rfbi
.
cmd_fifo
,
(
unsigned
char
*
)
&
p
,
len
=
kfifo_out
(
&
rfbi
.
cmd_fifo
,
(
unsigned
char
*
)
&
p
,
sizeof
(
struct
update_param
));
if
(
len
==
0
)
{
DSSDBG
(
"nothing more in fifo
\n
"
);
atomic_set
(
&
rfbi
.
cmd_pending
,
0
);
spin_unlock_irqrestore
(
rfbi
.
cmd_fifo
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
rfbi
.
cmd_
lock
,
flags
);
break
;
}
/* DSSDBG("fifo full %d\n", rfbi.cmd_fifo_full.counter);*/
spin_unlock_irqrestore
(
rfbi
.
cmd_fifo
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
rfbi
.
cmd_
lock
,
flags
);
BUG_ON
(
len
!=
sizeof
(
struct
update_param
));
BUG_ON
(
p
.
rfbi_module
>
1
);
...
...
@@ -1052,25 +1052,25 @@ static void rfbi_push_cmd(struct update_param *p)
unsigned
long
flags
;
int
available
;
spin_lock_irqsave
(
rfbi
.
cmd_fifo
->
lock
,
flags
);
spin_lock_irqsave
(
&
rfbi
.
cmd_
lock
,
flags
);
available
=
RFBI_CMD_FIFO_LEN_BYTES
-
__kfifo_len
(
rfbi
.
cmd_fifo
);
kfifo_len
(
&
rfbi
.
cmd_fifo
);
/* DSSDBG("%d bytes left in fifo\n", available); */
if
(
available
<
sizeof
(
struct
update_param
))
{
DSSDBG
(
"Going to wait because FIFO FULL..
\n
"
);
spin_unlock_irqrestore
(
rfbi
.
cmd_fifo
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
rfbi
.
cmd_
lock
,
flags
);
atomic_inc
(
&
rfbi
.
cmd_fifo_full
);
wait_for_completion
(
&
rfbi
.
cmd_done
);
/*DSSDBG("Woke up because fifo not full anymore\n");*/
continue
;
}
ret
=
__kfifo_put
(
rfbi
.
cmd_fifo
,
(
unsigned
char
*
)
p
,
ret
=
kfifo_in
(
&
rfbi
.
cmd_fifo
,
(
unsigned
char
*
)
p
,
sizeof
(
struct
update_param
));
/* DSSDBG("pushed %d bytes\n", ret);*/
spin_unlock_irqrestore
(
rfbi
.
cmd_fifo
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
rfbi
.
cmd_
lock
,
flags
);
BUG_ON
(
ret
!=
sizeof
(
struct
update_param
));
...
...
@@ -1155,12 +1155,12 @@ int rfbi_init(void)
{
u32
rev
;
u32
l
;
int
r
;
spin_lock_init
(
&
rfbi
.
cmd_lock
);
rfbi
.
cmd_fifo
=
kfifo_alloc
(
RFBI_CMD_FIFO_LEN_BYTES
,
GFP_KERNEL
,
&
rfbi
.
cmd_lock
);
if
(
IS_ERR
(
rfbi
.
cmd_fifo
))
return
-
ENOMEM
;
r
=
kfifo_alloc
(
&
rfbi
.
cmd_fifo
,
RFBI_CMD_FIFO_LEN_BYTES
,
GFP_KERNEL
);
if
(
r
)
return
r
;
init_completion
(
&
rfbi
.
cmd_done
);
atomic_set
(
&
rfbi
.
cmd_fifo_full
,
0
);
...
...
@@ -1196,7 +1196,7 @@ void rfbi_exit(void)
{
DSSDBG
(
"rfbi_exit
\n
"
);
kfifo_free
(
rfbi
.
cmd_fifo
);
kfifo_free
(
&
rfbi
.
cmd_fifo
);
iounmap
(
rfbi
.
base
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录