Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
0e5b26ab
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看板
提交
0e5b26ab
编写于
7月 12, 2013
作者:
P
Patrik Jakobsson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/gma500/psb: Convert to generic save/restore
Signed-off-by:
N
Patrik Jakobsson
<
patrik.r.jakobsson@gmail.com
>
上级
2e775700
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
2 addition
and
107 deletion
+2
-107
drivers/gpu/drm/gma500/psb_intel_display.c
drivers/gpu/drm/gma500/psb_intel_display.c
+2
-107
未找到文件。
drivers/gpu/drm/gma500/psb_intel_display.c
浏览文件 @
0e5b26ab
...
...
@@ -305,111 +305,6 @@ static int psb_intel_crtc_mode_set(struct drm_crtc *crtc,
return
0
;
}
/**
* Save HW states of giving crtc
*/
static
void
psb_intel_crtc_save
(
struct
drm_crtc
*
crtc
)
{
struct
drm_device
*
dev
=
crtc
->
dev
;
struct
drm_psb_private
*
dev_priv
=
dev
->
dev_private
;
struct
psb_intel_crtc
*
psb_intel_crtc
=
to_psb_intel_crtc
(
crtc
);
struct
psb_intel_crtc_state
*
crtc_state
=
psb_intel_crtc
->
crtc_state
;
const
struct
psb_offset
*
map
=
&
dev_priv
->
regmap
[
psb_intel_crtc
->
pipe
];
uint32_t
paletteReg
;
int
i
;
if
(
!
crtc_state
)
{
dev_err
(
dev
->
dev
,
"No CRTC state found
\n
"
);
return
;
}
crtc_state
->
saveDSPCNTR
=
REG_READ
(
map
->
cntr
);
crtc_state
->
savePIPECONF
=
REG_READ
(
map
->
conf
);
crtc_state
->
savePIPESRC
=
REG_READ
(
map
->
src
);
crtc_state
->
saveFP0
=
REG_READ
(
map
->
fp0
);
crtc_state
->
saveFP1
=
REG_READ
(
map
->
fp1
);
crtc_state
->
saveDPLL
=
REG_READ
(
map
->
dpll
);
crtc_state
->
saveHTOTAL
=
REG_READ
(
map
->
htotal
);
crtc_state
->
saveHBLANK
=
REG_READ
(
map
->
hblank
);
crtc_state
->
saveHSYNC
=
REG_READ
(
map
->
hsync
);
crtc_state
->
saveVTOTAL
=
REG_READ
(
map
->
vtotal
);
crtc_state
->
saveVBLANK
=
REG_READ
(
map
->
vblank
);
crtc_state
->
saveVSYNC
=
REG_READ
(
map
->
vsync
);
crtc_state
->
saveDSPSTRIDE
=
REG_READ
(
map
->
stride
);
/*NOTE: DSPSIZE DSPPOS only for psb*/
crtc_state
->
saveDSPSIZE
=
REG_READ
(
map
->
size
);
crtc_state
->
saveDSPPOS
=
REG_READ
(
map
->
pos
);
crtc_state
->
saveDSPBASE
=
REG_READ
(
map
->
base
);
paletteReg
=
map
->
palette
;
for
(
i
=
0
;
i
<
256
;
++
i
)
crtc_state
->
savePalette
[
i
]
=
REG_READ
(
paletteReg
+
(
i
<<
2
));
}
/**
* Restore HW states of giving crtc
*/
static
void
psb_intel_crtc_restore
(
struct
drm_crtc
*
crtc
)
{
struct
drm_device
*
dev
=
crtc
->
dev
;
struct
drm_psb_private
*
dev_priv
=
dev
->
dev_private
;
struct
psb_intel_crtc
*
psb_intel_crtc
=
to_psb_intel_crtc
(
crtc
);
struct
psb_intel_crtc_state
*
crtc_state
=
psb_intel_crtc
->
crtc_state
;
const
struct
psb_offset
*
map
=
&
dev_priv
->
regmap
[
psb_intel_crtc
->
pipe
];
uint32_t
paletteReg
;
int
i
;
if
(
!
crtc_state
)
{
dev_err
(
dev
->
dev
,
"No crtc state
\n
"
);
return
;
}
if
(
crtc_state
->
saveDPLL
&
DPLL_VCO_ENABLE
)
{
REG_WRITE
(
map
->
dpll
,
crtc_state
->
saveDPLL
&
~
DPLL_VCO_ENABLE
);
REG_READ
(
map
->
dpll
);
udelay
(
150
);
}
REG_WRITE
(
map
->
fp0
,
crtc_state
->
saveFP0
);
REG_READ
(
map
->
fp0
);
REG_WRITE
(
map
->
fp1
,
crtc_state
->
saveFP1
);
REG_READ
(
map
->
fp1
);
REG_WRITE
(
map
->
dpll
,
crtc_state
->
saveDPLL
);
REG_READ
(
map
->
dpll
);
udelay
(
150
);
REG_WRITE
(
map
->
htotal
,
crtc_state
->
saveHTOTAL
);
REG_WRITE
(
map
->
hblank
,
crtc_state
->
saveHBLANK
);
REG_WRITE
(
map
->
hsync
,
crtc_state
->
saveHSYNC
);
REG_WRITE
(
map
->
vtotal
,
crtc_state
->
saveVTOTAL
);
REG_WRITE
(
map
->
vblank
,
crtc_state
->
saveVBLANK
);
REG_WRITE
(
map
->
vsync
,
crtc_state
->
saveVSYNC
);
REG_WRITE
(
map
->
stride
,
crtc_state
->
saveDSPSTRIDE
);
REG_WRITE
(
map
->
size
,
crtc_state
->
saveDSPSIZE
);
REG_WRITE
(
map
->
pos
,
crtc_state
->
saveDSPPOS
);
REG_WRITE
(
map
->
src
,
crtc_state
->
savePIPESRC
);
REG_WRITE
(
map
->
base
,
crtc_state
->
saveDSPBASE
);
REG_WRITE
(
map
->
conf
,
crtc_state
->
savePIPECONF
);
gma_wait_for_vblank
(
dev
);
REG_WRITE
(
map
->
cntr
,
crtc_state
->
saveDSPCNTR
);
REG_WRITE
(
map
->
base
,
crtc_state
->
saveDSPBASE
);
gma_wait_for_vblank
(
dev
);
paletteReg
=
map
->
palette
;
for
(
i
=
0
;
i
<
256
;
++
i
)
REG_WRITE
(
paletteReg
+
(
i
<<
2
),
crtc_state
->
savePalette
[
i
]);
}
static
int
psb_crtc_set_config
(
struct
drm_mode_set
*
set
)
{
int
ret
;
...
...
@@ -560,8 +455,8 @@ const struct drm_crtc_helper_funcs psb_intel_helper_funcs = {
};
const
struct
drm_crtc_funcs
psb_intel_crtc_funcs
=
{
.
save
=
psb_intel
_crtc_save
,
.
restore
=
psb_intel
_crtc_restore
,
.
save
=
gma
_crtc_save
,
.
restore
=
gma
_crtc_restore
,
.
cursor_set
=
gma_crtc_cursor_set
,
.
cursor_move
=
gma_crtc_cursor_move
,
.
gamma_set
=
gma_crtc_gamma_set
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录