summaryrefslogtreecommitdiffstats
path: root/drivers/video/via/hw.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-02-12 20:34:17 +0000
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-03-04 12:05:15 +0000
commit91dc1be8f698eb016343d534159a919678e3889c (patch)
tree286944db798d0254314e9e346cf74fa9c87211d3 /drivers/video/via/hw.c
parent70a27df1579b0e8d7d478d034980f8a7f8a20d54 (diff)
downloadblackbird-op-linux-91dc1be8f698eb016343d534159a919678e3889c.tar.gz
blackbird-op-linux-91dc1be8f698eb016343d534159a919678e3889c.zip
viafb: LCD bpp cleanup
This patch removes redundant bits per pixel information by using the one storged in var directly. Simplifies code without any functional changes. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/via/hw.c')
-rw-r--r--drivers/video/via/hw.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index 4d799c89941b..da80d202f52a 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -1529,9 +1529,6 @@ void viafb_update_device_setting(int hres, int vres, int bpp, int flag)
if (flag == 0) {
viaparinfo->tmds_setting_info->h_active = hres;
viaparinfo->tmds_setting_info->v_active = vres;
-
- viaparinfo->lvds_setting_info->bpp = bpp;
- viaparinfo->lvds_setting_info2->bpp = bpp;
} else {
if (viaparinfo->tmds_setting_info->iga_path == IGA2) {
@@ -1539,11 +1536,6 @@ void viafb_update_device_setting(int hres, int vres, int bpp, int flag)
viaparinfo->tmds_setting_info->v_active = vres;
}
- if (viaparinfo->lvds_setting_info->iga_path == IGA2)
- viaparinfo->lvds_setting_info->bpp = bpp;
-
- if (IGA2 == viaparinfo->lvds_setting_info2->iga_path)
- viaparinfo->lvds_setting_info2->bpp = bpp;
}
}
@@ -1834,7 +1826,7 @@ static void hw_init(void)
load_fix_bit_crtc_reg();
}
-int viafb_setmode(int video_bpp, int video_bpp1)
+int viafb_setmode(void)
{
int j, cxres = 0, cyres = 0;
int port;
@@ -1923,7 +1915,6 @@ int viafb_setmode(int video_bpp, int video_bpp1)
if (viafb_LCD_ON) {
if (viafb_SAMM_ON &&
(viaparinfo->lvds_setting_info->iga_path == IGA2)) {
- viaparinfo->lvds_setting_info->bpp = video_bpp1;
viafb_lcd_set_mode(&var2, cxres, cyres,
viaparinfo->lvds_setting_info,
&viaparinfo->chip_info->lvds_chip_info);
@@ -1933,7 +1924,6 @@ int viafb_setmode(int video_bpp, int video_bpp1)
viaparinfo->lvds_setting_info->display_method =
LCD_CENTERING;
}
- viaparinfo->lvds_setting_info->bpp = video_bpp;
viafb_lcd_set_mode(&viafbinfo->var, 0, 0,
viaparinfo->lvds_setting_info,
&viaparinfo->chip_info->lvds_chip_info);
@@ -1942,7 +1932,6 @@ int viafb_setmode(int video_bpp, int video_bpp1)
if (viafb_LCD2_ON) {
if (viafb_SAMM_ON &&
(viaparinfo->lvds_setting_info2->iga_path == IGA2)) {
- viaparinfo->lvds_setting_info2->bpp = video_bpp1;
viafb_lcd_set_mode(&var2, cxres, cyres,
viaparinfo->lvds_setting_info2,
&viaparinfo->chip_info->lvds_chip_info2);
@@ -1952,7 +1941,6 @@ int viafb_setmode(int video_bpp, int video_bpp1)
viaparinfo->lvds_setting_info2->display_method =
LCD_CENTERING;
}
- viaparinfo->lvds_setting_info2->bpp = video_bpp;
viafb_lcd_set_mode(&viafbinfo->var, 0, 0,
viaparinfo->lvds_setting_info2,
&viaparinfo->chip_info->lvds_chip_info2);
@@ -1967,7 +1955,7 @@ int viafb_setmode(int video_bpp, int video_bpp1)
if (!viafb_hotplug) {
viafb_hotplug_Xres = viafbinfo->var.xres;
viafb_hotplug_Yres = viafbinfo->var.yres;
- viafb_hotplug_bpp = video_bpp;
+ viafb_hotplug_bpp = viafbinfo->var.bits_per_pixel;
viafb_hotplug_refresh = viafb_refresh;
if (viafb_DVI_ON)
OpenPOWER on IntegriCloud