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

viafb: make suspend and resume work (on all machines?)

This patch removes the dangerous suspend and resume code that was
developed for VX855 only. After this the framebuffer is expected to
cause no longer serious (freezing) issues on any machines.
However the hardware acceleration is broken now so only doing resume
with unaccelerated framebuffers is save. This did not work previously
as the 2D engine is not mapped if the framebuffer is not accelerated.
The acceleration issue will be addressed later.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Cc: Joseph Chan <JosephChan@via.com.tw>

-13
-10
drivers/video/via/viafbdev.c
··· 1674 1674 { 1675 1675 if (state.event == PM_EVENT_SUSPEND) { 1676 1676 acquire_console_sem(); 1677 - 1678 - memcpy_fromio(viaparinfo->shared->saved_regs, 1679 - viaparinfo->shared->vdev->engine_mmio + 0x100, 1680 - 0xff * sizeof(u32)); 1681 - 1682 1677 fb_set_suspend(viafbinfo, 1); 1683 1678 1684 1679 viafb_sync(viafbinfo); ··· 1695 1700 if (pci_enable_device(pdev)) 1696 1701 goto fail; 1697 1702 pci_set_master(pdev); 1698 - 1699 - memcpy_toio(viaparinfo->shared->vdev->engine_mmio + 0x100, 1700 - viaparinfo->shared->saved_regs, 1701 - 0x100 * sizeof(u32)); 1702 - 1703 1703 viafb_set_par(viafbinfo); 1704 1704 if (viafb_dual_fb) 1705 1705 viafb_set_par(viafbinfo1);
-3
drivers/video/via/viafbdev.h
··· 62 62 u8 dst_bpp, u32 dst_addr, u32 dst_pitch, u32 dst_x, u32 dst_y, 63 63 u32 *src_mem, u32 src_addr, u32 src_pitch, u32 src_x, u32 src_y, 64 64 u32 fg_color, u32 bg_color, u8 fill_rop); 65 - 66 - /* For suspend/resume */ 67 - u32 saved_regs[0x100]; 68 65 }; 69 66 70 67 struct viafb_par {