Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
c32b06ef
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看板
提交
c32b06ef
编写于
13年前
作者:
I
Inki Dae
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/exynos: added mutex lock and code clean.
Signed-off-by:
N
Inki Dae
<
inki.dae@samsung.com
>
上级
52c68814
无相关合并请求
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
12 deletion
+25
-12
drivers/gpu/drm/exynos/exynos_drm_fimd.c
drivers/gpu/drm/exynos/exynos_drm_fimd.c
+25
-12
未找到文件。
drivers/gpu/drm/exynos/exynos_drm_fimd.c
浏览文件 @
c32b06ef
...
...
@@ -87,6 +87,7 @@ struct fimd_context {
u32
vidcon0
;
u32
vidcon1
;
bool
suspended
;
struct
mutex
lock
;
struct
fb_videomode
*
timing
;
};
...
...
@@ -137,11 +138,22 @@ static struct exynos_drm_display_ops fimd_display_ops = {
static
void
fimd_dpms
(
struct
device
*
subdrv_dev
,
int
mode
)
{
struct
fimd_context
*
ctx
=
get_fimd_context
(
subdrv_dev
);
DRM_DEBUG_KMS
(
"%s, %d
\n
"
,
__FILE__
,
mode
);
mutex_lock
(
&
ctx
->
lock
);
switch
(
mode
)
{
case
DRM_MODE_DPMS_ON
:
pm_runtime_get_sync
(
subdrv_dev
);
/*
* enable fimd hardware only if suspended status.
*
* P.S. fimd_dpms function would be called at booting time so
* clk_enable could be called double time.
*/
if
(
ctx
->
suspended
)
pm_runtime_get_sync
(
subdrv_dev
);
break
;
case
DRM_MODE_DPMS_STANDBY
:
case
DRM_MODE_DPMS_SUSPEND
:
...
...
@@ -152,6 +164,8 @@ static void fimd_dpms(struct device *subdrv_dev, int mode)
DRM_DEBUG_KMS
(
"unspecified mode %d
\n
"
,
mode
);
break
;
}
mutex_unlock
(
&
ctx
->
lock
);
}
static
void
fimd_apply
(
struct
device
*
subdrv_dev
)
...
...
@@ -803,13 +817,6 @@ static int __devinit fimd_probe(struct platform_device *pdev)
goto
err_req_irq
;
}
pm_runtime_set_active
(
dev
);
pm_runtime_enable
(
dev
);
pm_runtime_get_sync
(
dev
);
for
(
win
=
0
;
win
<
WINDOWS_NR
;
win
++
)
fimd_clear_win
(
ctx
,
win
);
ctx
->
clkdiv
=
fimd_calc_clkdiv
(
ctx
,
timing
);
ctx
->
vidcon0
=
pdata
->
vidcon0
;
ctx
->
vidcon1
=
pdata
->
vidcon1
;
...
...
@@ -831,7 +838,17 @@ static int __devinit fimd_probe(struct platform_device *pdev)
subdrv
->
manager
.
display_ops
=
&
fimd_display_ops
;
subdrv
->
manager
.
dev
=
dev
;
mutex_init
(
&
ctx
->
lock
);
platform_set_drvdata
(
pdev
,
ctx
);
pm_runtime_set_active
(
dev
);
pm_runtime_enable
(
dev
);
pm_runtime_get_sync
(
dev
);
for
(
win
=
0
;
win
<
WINDOWS_NR
;
win
++
)
fimd_clear_win
(
ctx
,
win
);
exynos_drm_subdrv_register
(
subdrv
);
return
0
;
...
...
@@ -894,7 +911,6 @@ static int __devexit fimd_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP
static
int
fimd_suspend
(
struct
device
*
dev
)
{
struct
fimd_context
*
ctx
=
get_fimd_context
(
dev
);
int
ret
;
if
(
pm_runtime_suspended
(
dev
))
...
...
@@ -904,13 +920,11 @@ static int fimd_suspend(struct device *dev)
if
(
ret
<
0
)
return
ret
;
ctx
->
suspended
=
true
;
return
0
;
}
static
int
fimd_resume
(
struct
device
*
dev
)
{
struct
fimd_context
*
ctx
=
get_fimd_context
(
dev
);
int
ret
;
ret
=
pm_runtime_resume
(
dev
);
...
...
@@ -931,7 +945,6 @@ static int fimd_resume(struct device *dev)
pm_runtime_enable
(
dev
);
ctx
->
suspended
=
false
;
return
0
;
}
#endif
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录