]> git.karo-electronics.de Git - linux-beck.git/commitdiff
viafb: make suspend and resume work (on all machines?)
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Mon, 26 Apr 2010 17:08:00 +0000 (17:08 +0000)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sun, 24 Oct 2010 13:04:51 +0000 (13:04 +0000)
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>
drivers/video/via/viafbdev.c
drivers/video/via/viafbdev.h

index 6a7327eaf8694bf7acd81cb002a578e27a5a0bb1..4e9e105a6c78524b5e84fc9e797e6efb28c04ef1 100644 (file)
@@ -1674,11 +1674,6 @@ int viafb_suspend(struct pci_dev *pdev, pm_message_t state)
 {
        if (state.event == PM_EVENT_SUSPEND) {
                acquire_console_sem();
-
-               memcpy_fromio(viaparinfo->shared->saved_regs,
-                             viaparinfo->shared->vdev->engine_mmio + 0x100,
-                             0xff * sizeof(u32));
-
                fb_set_suspend(viafbinfo, 1);
 
                viafb_sync(viafbinfo);
@@ -1700,11 +1695,6 @@ int viafb_resume(struct pci_dev *pdev)
        if (pci_enable_device(pdev))
                goto fail;
        pci_set_master(pdev);
-
-       memcpy_toio(viaparinfo->shared->vdev->engine_mmio + 0x100,
-                   viaparinfo->shared->saved_regs,
-                   0x100 * sizeof(u32));
-
        viafb_set_par(viafbinfo);
        if (viafb_dual_fb)
                viafb_set_par(viafbinfo1);
index 29a8c6c769ec7943dc3d145d775d2e8a65fa103f..4960e3da6645a8d51e73f50754a71536cc15e327 100644 (file)
@@ -62,9 +62,6 @@ struct viafb_shared {
                u8 dst_bpp, u32 dst_addr, u32 dst_pitch, u32 dst_x, u32 dst_y,
                u32 *src_mem, u32 src_addr, u32 src_pitch, u32 src_x, u32 src_y,
                u32 fg_color, u32 bg_color, u8 fill_rop);
-
-       /* For suspend/resume */
-       u32 saved_regs[0x100];
 };
 
 struct viafb_par {