Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

viafb: reduce viafb_set_iga_path usage

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>

+2 -1
-1
drivers/video/via/hw.c
··· 2313 2313 via_write_reg(VIASR, i, VPIT.SR[i - 1]); 2314 2314 2315 2315 viafb_write_reg_mask(0x15, VIASR, 0xA2, 0xA2); 2316 - viafb_set_iga_path(); 2317 2316 2318 2317 /* Write CRTC */ 2319 2318 viafb_fill_crtc_timing(crt_timing, vmode_tbl, video_bpp / 8, IGA1);
+2
drivers/video/via/ioctl.c
··· 94 94 viafb_CRT_ON = 0; 95 95 viafb_LCD_ON = 0; 96 96 viafb_DeviceStatus = DVI_Device; 97 + viafb_set_iga_path(); 97 98 return viafb_DeviceStatus; 98 99 } 99 100 status = 1; ··· 108 107 viafb_LCD_ON = 0; 109 108 110 109 viafb_DeviceStatus = CRT_Device; 110 + viafb_set_iga_path(); 111 111 return viafb_DeviceStatus; 112 112 } 113 113