Skip to content

Commit

Permalink
viafb: reduce viafb_set_iga_path usage
Browse files Browse the repository at this point in the history
The result of viafb_set_iga_path can change after init only in the
hotplug ioctl. So we can move it there rather than doing it always
when a new mode is set. The setup during init is done via a call
from the init chip funtion.
This change enables a stable mapping between the old device scheme
and a new more powerfull one.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
  • Loading branch information
Florian Tobias Schandinat authored and Florian Tobias Schandinat committed Sep 24, 2010
1 parent f4ab2f7 commit 661c65c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/video/via/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2313,7 +2313,6 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
via_write_reg(VIASR, i, VPIT.SR[i - 1]);

viafb_write_reg_mask(0x15, VIASR, 0xA2, 0xA2);
viafb_set_iga_path();

/* Write CRTC */
viafb_fill_crtc_timing(crt_timing, vmode_tbl, video_bpp / 8, IGA1);
Expand Down
2 changes: 2 additions & 0 deletions drivers/video/via/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ int viafb_ioctl_hotplug(int hres, int vres, int bpp)
viafb_CRT_ON = 0;
viafb_LCD_ON = 0;
viafb_DeviceStatus = DVI_Device;
viafb_set_iga_path();
return viafb_DeviceStatus;
}
status = 1;
Expand All @@ -107,6 +108,7 @@ int viafb_ioctl_hotplug(int hres, int vres, int bpp)
viafb_LCD_ON = 0;

viafb_DeviceStatus = CRT_Device;
viafb_set_iga_path();
return viafb_DeviceStatus;
}

Expand Down

0 comments on commit 661c65c

Please sign in to comment.