summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500/power.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-03-10 13:10:41 (GMT)
committerDave Airlie <airlied@redhat.com>2012-03-10 13:10:41 (GMT)
commit83465324cb50e22b45ad53fd6e8887b1f8e43702 (patch)
treea780d60b146fe332a47ebc09e9ca5d9a540d2563 /drivers/gpu/drm/gma500/power.c
parentb19c19afa880105179b3c25e57b169c8fcda334c (diff)
parent8e18db815c92f17e96afaccd33c6b8f08c16dd03 (diff)
downloadlinux-fsl-qoriq-83465324cb50e22b45ad53fd6e8887b1f8e43702.tar.xz
Merge branch 'drm-gma500-alanc' into drm-core-next
* drm-gma500-alanc: (47 commits) gma500: psb_irq: mark mid_{enable, disable}_pipe_event() as static gma500: mark psb_intel_sdvo_hdmi_sink_detect() as static gma500: psb_intel_display: drop unused variables gma500: mark psb_intel_pipe_set_base() as static gma500: drop unused psb_intel_modeset_cleanup() gma500: oaktrail_lvds_init() drop unused variable gma500: oaktrail_hdmi_i2c_access() drop unused variable gma500: mark oaktrail_backlight_init() as static gma500: oaktrail_hdmi: fix -Wmissing-field-initializers warning gma500: oaktrail_hdmi: drop dead code gma500: oaktrail_crtc: drop unused variables gma500: oaktrail_crtc: mark few functions as static gma500: mdfld_intel_display: drop unused variables gma500: mdfld_dsi_pkg_sender: fix -Wtype-limits warning gma500: mdfld_dsi_dpi: drop unused variables gma500: mdfld_device: mark few functions as static gma500: cdv_intel_lvds: #if 0 currently unused functions gma500: cdv_intel_lvds: mark few functions as static gma500: cdv_intel_hdmi: add missing include gma500: cdv_intel_crt: mark few functions as static ...
Diffstat (limited to 'drivers/gpu/drm/gma500/power.c')
-rw-r--r--drivers/gpu/drm/gma500/power.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c
index 9402569..994f669 100644
--- a/drivers/gpu/drm/gma500/power.c
+++ b/drivers/gpu/drm/gma500/power.c
@@ -58,7 +58,8 @@ void gma_power_init(struct drm_device *dev)
spin_lock_init(&power_ctrl_lock);
mutex_init(&power_mutex);
- dev_priv->ops->init_pm(dev);
+ if (dev_priv->ops->init_pm)
+ dev_priv->ops->init_pm(dev);
}
/**
@@ -132,9 +133,9 @@ static void gma_suspend_pci(struct pci_dev *pdev)
pci_save_state(pdev);
pci_read_config_dword(pdev, 0x5C, &bsm);
- dev_priv->saveBSM = bsm;
+ dev_priv->regs.saveBSM = bsm;
pci_read_config_dword(pdev, 0xFC, &vbt);
- dev_priv->saveVBT = vbt;
+ dev_priv->regs.saveVBT = vbt;
pci_read_config_dword(pdev, PSB_PCIx_MSI_ADDR_LOC, &dev_priv->msi_addr);
pci_read_config_dword(pdev, PSB_PCIx_MSI_DATA_LOC, &dev_priv->msi_data);
@@ -162,8 +163,8 @@ static bool gma_resume_pci(struct pci_dev *pdev)
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
- pci_write_config_dword(pdev, 0x5c, dev_priv->saveBSM);
- pci_write_config_dword(pdev, 0xFC, dev_priv->saveVBT);
+ pci_write_config_dword(pdev, 0x5c, dev_priv->regs.saveBSM);
+ pci_write_config_dword(pdev, 0xFC, dev_priv->regs.saveVBT);
/* restoring MSI address and data in PCIx space */
pci_write_config_dword(pdev, PSB_PCIx_MSI_ADDR_LOC, dev_priv->msi_addr);
pci_write_config_dword(pdev, PSB_PCIx_MSI_DATA_LOC, dev_priv->msi_data);