aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-04-26 13:08:00 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-10-24 09:04:51 -0400
commit466bc7fc4246d95cbd37edd169eafb8185e41941 (patch)
tree1905418fda1b3dde93a27bdd143ec5adb3a8665c /drivers/video/via
parentb75f2c01de34daf0b25cbd75fcf00511548ffa1e (diff)
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>
Diffstat (limited to 'drivers/video/via')
-rw-r--r--drivers/video/via/viafbdev.c10
-rw-r--r--drivers/video/via/viafbdev.h3
2 files changed, 0 insertions, 13 deletions
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index 6a7327eaf869..4e9e105a6c78 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -1674,11 +1674,6 @@ int viafb_suspend(struct pci_dev *pdev, pm_message_t state)
1674{ 1674{
1675 if (state.event == PM_EVENT_SUSPEND) { 1675 if (state.event == PM_EVENT_SUSPEND) {
1676 acquire_console_sem(); 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 fb_set_suspend(viafbinfo, 1); 1677 fb_set_suspend(viafbinfo, 1);
1683 1678
1684 viafb_sync(viafbinfo); 1679 viafb_sync(viafbinfo);
@@ -1700,11 +1695,6 @@ int viafb_resume(struct pci_dev *pdev)
1700 if (pci_enable_device(pdev)) 1695 if (pci_enable_device(pdev))
1701 goto fail; 1696 goto fail;
1702 pci_set_master(pdev); 1697 pci_set_master(pdev);
1703
1704 memcpy_toio(viaparinfo->shared->vdev->engine_mmio + 0x100,
1705 viaparinfo->shared->saved_regs,
1706 0x100 * sizeof(u32));
1707
1708 viafb_set_par(viafbinfo); 1698 viafb_set_par(viafbinfo);
1709 if (viafb_dual_fb) 1699 if (viafb_dual_fb)
1710 viafb_set_par(viafbinfo1); 1700 viafb_set_par(viafbinfo1);
diff --git a/drivers/video/via/viafbdev.h b/drivers/video/via/viafbdev.h
index 29a8c6c769ec..4960e3da6645 100644
--- a/drivers/video/via/viafbdev.h
+++ b/drivers/video/via/viafbdev.h
@@ -62,9 +62,6 @@ struct viafb_shared {
62 u8 dst_bpp, u32 dst_addr, u32 dst_pitch, u32 dst_x, u32 dst_y, 62 u8 dst_bpp, u32 dst_addr, u32 dst_pitch, u32 dst_x, u32 dst_y,
63 u32 *src_mem, u32 src_addr, u32 src_pitch, u32 src_x, u32 src_y, 63 u32 *src_mem, u32 src_addr, u32 src_pitch, u32 src_x, u32 src_y,
64 u32 fg_color, u32 bg_color, u8 fill_rop); 64 u32 fg_color, u32 bg_color, u8 fill_rop);
65
66 /* For suspend/resume */
67 u32 saved_regs[0x100];
68}; 65};
69 66
70struct viafb_par { 67struct viafb_par {