Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
53f358a8
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
53f358a8
编写于
3月 25, 2011
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'viafb-next' of
git://github.com/schandinat/linux-2.6
上级
6c510389
3f086fe9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
46 addition
and
49 deletion
+46
-49
drivers/video/via/chip.h
drivers/video/via/chip.h
+0
-1
drivers/video/via/hw.c
drivers/video/via/hw.c
+7
-10
drivers/video/via/hw.h
drivers/video/via/hw.h
+1
-2
drivers/video/via/viafbdev.c
drivers/video/via/viafbdev.c
+38
-36
未找到文件。
drivers/video/via/chip.h
浏览文件 @
53f358a8
...
...
@@ -139,7 +139,6 @@ struct chip_information {
struct
crt_setting_information
{
int
iga_path
;
int
refresh_rate
;
};
struct
tmds_setting_information
{
...
...
drivers/video/via/hw.c
浏览文件 @
53f358a8
...
...
@@ -2002,13 +2002,15 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table,
int
i
;
int
index
=
0
;
int
h_addr
,
v_addr
;
u32
pll_D_N
,
clock
;
u32
pll_D_N
,
clock
,
refresh
=
viafb_refresh
;
if
(
viafb_SAMM_ON
&&
set_iga
==
IGA2
)
refresh
=
viafb_refresh1
;
for
(
i
=
0
;
i
<
video_mode
->
mode_array
;
i
++
)
{
index
=
i
;
if
(
crt_table
[
i
].
refresh_rate
==
viaparinfo
->
crt_setting_info
->
refresh_rate
)
if
(
crt_table
[
i
].
refresh_rate
==
refresh
)
break
;
}
...
...
@@ -2019,7 +2021,7 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table,
if
((
viafb_LCD_ON
|
viafb_DVI_ON
)
&&
video_mode
->
crtc
[
0
].
crtc
.
hor_addr
==
640
&&
video_mode
->
crtc
[
0
].
crtc
.
ver_addr
==
480
&&
viaparinfo
->
crt_setting_info
->
refresh_rate
==
60
)
{
&&
refresh
==
60
)
{
/* The border is 8 pixels. */
crt_reg
.
hor_blank_start
=
crt_reg
.
hor_blank_start
-
8
;
...
...
@@ -2070,7 +2072,6 @@ void __devinit viafb_init_chip_info(int chip_type)
init_lvds_chip_info
();
viaparinfo
->
crt_setting_info
->
iga_path
=
IGA1
;
viaparinfo
->
crt_setting_info
->
refresh_rate
=
viafb_refresh
;
/*Set IGA path for each device */
viafb_set_iga_path
();
...
...
@@ -2083,13 +2084,9 @@ void __devinit viafb_init_chip_info(int chip_type)
viaparinfo
->
lvds_setting_info
->
lcd_mode
;
}
void
viafb_update_device_setting
(
int
hres
,
int
vres
,
int
bpp
,
int
vmode_refresh
,
int
flag
)
void
viafb_update_device_setting
(
int
hres
,
int
vres
,
int
bpp
,
int
flag
)
{
if
(
flag
==
0
)
{
viaparinfo
->
crt_setting_info
->
refresh_rate
=
vmode_refresh
;
viaparinfo
->
tmds_setting_info
->
h_active
=
hres
;
viaparinfo
->
tmds_setting_info
->
v_active
=
vres
;
...
...
drivers/video/via/hw.h
浏览文件 @
53f358a8
...
...
@@ -949,8 +949,7 @@ void __devinit viafb_init_chip_info(int chip_type);
void
__devinit
viafb_init_dac
(
int
set_iga
);
int
viafb_get_pixclock
(
int
hres
,
int
vres
,
int
vmode_refresh
);
int
viafb_get_refresh
(
int
hres
,
int
vres
,
u32
float_refresh
);
void
viafb_update_device_setting
(
int
hres
,
int
vres
,
int
bpp
,
int
vmode_refresh
,
int
flag
);
void
viafb_update_device_setting
(
int
hres
,
int
vres
,
int
bpp
,
int
flag
);
void
viafb_set_iga_path
(
void
);
void
viafb_set_primary_color_register
(
u8
index
,
u8
red
,
u8
green
,
u8
blue
);
...
...
drivers/video/via/viafbdev.c
浏览文件 @
53f358a8
...
...
@@ -182,13 +182,24 @@ static int viafb_release(struct fb_info *info, int user)
return
0
;
}
static
inline
int
get_var_refresh
(
struct
fb_var_screeninfo
*
var
)
{
u32
htotal
,
vtotal
;
htotal
=
var
->
left_margin
+
var
->
xres
+
var
->
right_margin
+
var
->
hsync_len
;
vtotal
=
var
->
upper_margin
+
var
->
yres
+
var
->
lower_margin
+
var
->
vsync_len
;
return
PICOS2KHZ
(
var
->
pixclock
)
*
1000
/
(
htotal
*
vtotal
);
}
static
int
viafb_check_var
(
struct
fb_var_screeninfo
*
var
,
struct
fb_info
*
info
)
{
int
htotal
,
vtotal
,
dept
h
;
int
depth
,
refres
h
;
struct
VideoModeTable
*
vmode_entry
;
struct
viafb_par
*
ppar
=
info
->
par
;
u32
l
ong_refresh
,
l
ine
;
u32
line
;
DEBUG_MSG
(
KERN_INFO
"viafb_check_var!
\n
"
);
/* Sanity check */
...
...
@@ -231,17 +242,11 @@ static int viafb_check_var(struct fb_var_screeninfo *var,
/* Based on var passed in to calculate the refresh,
* because our driver use some modes special.
*/
htotal
=
var
->
xres
+
var
->
left_margin
+
var
->
right_margin
+
var
->
hsync_len
;
vtotal
=
var
->
yres
+
var
->
upper_margin
+
var
->
lower_margin
+
var
->
vsync_len
;
long_refresh
=
1000000000UL
/
var
->
pixclock
*
1000
;
long_refresh
/=
(
htotal
*
vtotal
);
viafb_refresh
=
viafb_get_refresh
(
var
->
xres
,
var
->
yres
,
long_refresh
);
refresh
=
viafb_get_refresh
(
var
->
xres
,
var
->
yres
,
get_var_refresh
(
var
));
/* Adjust var according to our driver's own table */
viafb_fill_var_timing_info
(
var
,
viafb_
refresh
,
vmode_entry
);
viafb_fill_var_timing_info
(
var
,
refresh
,
vmode_entry
);
if
(
var
->
accel_flags
&
FB_ACCELF_TEXT
&&
!
ppar
->
shared
->
vdev
->
engine_mmio
)
var
->
accel_flags
=
0
;
...
...
@@ -253,12 +258,13 @@ static int viafb_set_par(struct fb_info *info)
{
struct
viafb_par
*
viapar
=
info
->
par
;
struct
VideoModeTable
*
vmode_entry
,
*
vmode_entry1
=
NULL
;
int
refresh
;
DEBUG_MSG
(
KERN_INFO
"viafb_set_par!
\n
"
);
viafb_update_fix
(
info
);
viapar
->
depth
=
fb_get_color_depth
(
&
info
->
var
,
&
info
->
fix
);
viafb_update_device_setting
(
viafbinfo
->
var
.
xres
,
viafbinfo
->
var
.
yres
,
viafbinfo
->
var
.
bits_per_pixel
,
viafb_refresh
,
0
);
viafbinfo
->
var
.
bits_per_pixel
,
0
);
vmode_entry
=
viafb_get_mode
(
viafbinfo
->
var
.
xres
,
viafbinfo
->
var
.
yres
);
if
(
viafb_dual_fb
)
{
...
...
@@ -266,7 +272,7 @@ static int viafb_set_par(struct fb_info *info)
viafbinfo1
->
var
.
yres
);
viafb_update_device_setting
(
viafbinfo1
->
var
.
xres
,
viafbinfo1
->
var
.
yres
,
viafbinfo1
->
var
.
bits_per_pixel
,
viafb_refresh1
,
1
);
1
);
}
else
if
(
viafb_SAMM_ON
==
1
)
{
DEBUG_MSG
(
KERN_INFO
"viafb_second_xres = %d, viafb_second_yres = %d, bpp = %d
\n
"
,
...
...
@@ -275,14 +281,19 @@ static int viafb_set_par(struct fb_info *info)
viafb_second_yres
);
viafb_update_device_setting
(
viafb_second_xres
,
viafb_second_yres
,
viafb_bpp1
,
viafb_refresh1
,
1
);
viafb_second_yres
,
viafb_bpp1
,
1
);
}
refresh
=
viafb_get_refresh
(
info
->
var
.
xres
,
info
->
var
.
yres
,
get_var_refresh
(
&
info
->
var
));
if
(
vmode_entry
)
{
if
(
viafb_dual_fb
&&
viapar
->
iga_path
==
IGA2
)
if
(
viafb_dual_fb
&&
viapar
->
iga_path
==
IGA2
)
{
viafb_bpp1
=
info
->
var
.
bits_per_pixel
;
else
viafb_refresh1
=
refresh
;
}
else
{
viafb_bpp
=
info
->
var
.
bits_per_pixel
;
viafb_refresh
=
refresh
;
}
if
(
info
->
var
.
accel_flags
&
FB_ACCELF_TEXT
)
info
->
flags
&=
~
FBINFO_HWACCEL_DISABLED
;
...
...
@@ -1795,14 +1806,9 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev)
default_var
.
xres_virtual
=
default_xres
;
default_var
.
yres_virtual
=
default_yres
;
default_var
.
bits_per_pixel
=
viafb_bpp
;
default_var
.
pixclock
=
viafb_get_pixclock
(
default_xres
,
default_yres
,
viafb_refresh
);
default_var
.
left_margin
=
(
default_xres
>>
3
)
&
0xf8
;
default_var
.
right_margin
=
32
;
default_var
.
upper_margin
=
16
;
default_var
.
lower_margin
=
4
;
default_var
.
hsync_len
=
default_var
.
left_margin
;
default_var
.
vsync_len
=
4
;
viafb_fill_var_timing_info
(
&
default_var
,
viafb_get_refresh
(
default_var
.
xres
,
default_var
.
yres
,
viafb_refresh
),
viafb_get_mode
(
default_var
.
xres
,
default_var
.
yres
));
viafb_setup_fixinfo
(
&
viafbinfo
->
fix
,
viaparinfo
);
viafbinfo
->
var
=
default_var
;
...
...
@@ -1841,15 +1847,9 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev)
default_var
.
xres_virtual
=
viafb_second_virtual_xres
;
default_var
.
yres_virtual
=
viafb_second_virtual_yres
;
default_var
.
bits_per_pixel
=
viafb_bpp1
;
default_var
.
pixclock
=
viafb_get_pixclock
(
viafb_second_xres
,
viafb_second_yres
,
viafb_refresh
);
default_var
.
left_margin
=
(
viafb_second_xres
>>
3
)
&
0xf8
;
default_var
.
right_margin
=
32
;
default_var
.
upper_margin
=
16
;
default_var
.
lower_margin
=
4
;
default_var
.
hsync_len
=
default_var
.
left_margin
;
default_var
.
vsync_len
=
4
;
viafb_fill_var_timing_info
(
&
default_var
,
viafb_get_refresh
(
default_var
.
xres
,
default_var
.
yres
,
viafb_refresh1
),
viafb_get_mode
(
default_var
.
xres
,
default_var
.
yres
));
viafb_setup_fixinfo
(
&
viafbinfo1
->
fix
,
viaparinfo1
);
viafb_check_var
(
&
default_var
,
viafbinfo1
);
...
...
@@ -2004,15 +2004,17 @@ static int __init viafb_setup(char *options)
*/
int
__init
viafb_init
(
void
)
{
u32
dummy
;
u32
dummy
_x
,
dummy_y
;
#ifndef MODULE
char
*
option
=
NULL
;
if
(
fb_get_options
(
"viafb"
,
&
option
))
return
-
ENODEV
;
viafb_setup
(
option
);
#endif
if
(
parse_mode
(
viafb_mode
,
&
dummy
,
&
dummy
)
||
parse_mode
(
viafb_mode1
,
&
dummy
,
&
dummy
)
if
(
parse_mode
(
viafb_mode
,
&
dummy_x
,
&
dummy_y
)
||
!
viafb_get_mode
(
dummy_x
,
dummy_y
)
||
parse_mode
(
viafb_mode1
,
&
dummy_x
,
&
dummy_y
)
||
!
viafb_get_mode
(
dummy_x
,
dummy_y
)
||
viafb_bpp
<
0
||
viafb_bpp
>
32
||
viafb_bpp1
<
0
||
viafb_bpp1
>
32
||
parse_active_dev
())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录