diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-03-08 22:52:19 +0300 |
---|---|---|
committer | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2022-03-16 19:42:22 +0300 |
commit | 42ceddb696a01e6e31e90c456b882392f1572d69 (patch) | |
tree | 3acb1047131aaac22e474014ca614cace2d4aff7 /drivers/gpu/drm/gma500 | |
parent | d00f44ddfbb18d73fab98492e5fcb43281564f4f (diff) | |
download | linux-42ceddb696a01e6e31e90c456b882392f1572d69.tar.xz |
drm/gma500: Inline psb_gtt_restore()
Inline psb_gtt_restore() into its only caller in power.c.
Perform the GTT restoration in psb_gem_mm_resume(). The restoration
step is part of GEM anyway and will be moved over at some point.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220308195222.13471-10-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r-- | drivers/gpu/drm/gma500/gtt.c | 15 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/gtt.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/power.c | 4 |
3 files changed, 7 insertions, 15 deletions
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c index 0e99774c7e59..9e1b19fcea28 100644 --- a/drivers/gpu/drm/gma500/gtt.c +++ b/drivers/gpu/drm/gma500/gtt.c @@ -339,7 +339,7 @@ err_mutex_destroy: return ret; } -static int psb_gtt_resume(struct drm_device *dev) +int psb_gtt_resume(struct drm_device *dev) { struct drm_psb_private *dev_priv = to_drm_psb_private(dev); struct pci_dev *pdev = to_pci_dev(dev->dev); @@ -422,7 +422,7 @@ err_gtt_disable: return ret; } -static int psb_gem_mm_resume(struct drm_device *dev) +int psb_gem_mm_resume(struct drm_device *dev) { struct drm_psb_private *dev_priv = to_drm_psb_private(dev); struct pci_dev *pdev = to_pci_dev(dev->dev); @@ -445,17 +445,6 @@ static int psb_gem_mm_resume(struct drm_device *dev) } psb_gtt_populate_stolen(dev_priv); - - return 0; -} - -int psb_gtt_restore(struct drm_device *dev) -{ - struct drm_psb_private *dev_priv = to_drm_psb_private(dev); - - psb_gtt_resume(dev); - psb_gem_mm_resume(dev); - psb_gtt_populate_resources(dev_priv); return 0; diff --git a/drivers/gpu/drm/gma500/gtt.h b/drivers/gpu/drm/gma500/gtt.h index 45e1926dfce1..9a6d79200dce 100644 --- a/drivers/gpu/drm/gma500/gtt.h +++ b/drivers/gpu/drm/gma500/gtt.h @@ -27,7 +27,7 @@ struct psb_gtt { /* Exported functions */ int psb_gtt_init(struct drm_device *dev); void psb_gtt_fini(struct drm_device *dev); -extern int psb_gtt_restore(struct drm_device *dev); +int psb_gtt_resume(struct drm_device *dev); int psb_gtt_allocate_resource(struct drm_psb_private *pdev, struct resource *res, const char *name, resource_size_t size, resource_size_t align, @@ -39,5 +39,6 @@ void psb_gtt_remove_pages(struct drm_psb_private *pdev, const struct resource *r int psb_gem_mm_init(struct drm_device *dev); void psb_gem_mm_fini(struct drm_device *dev); +int psb_gem_mm_resume(struct drm_device *dev); #endif diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c index d2a46d96e746..28e472b31698 100644 --- a/drivers/gpu/drm/gma500/power.c +++ b/drivers/gpu/drm/gma500/power.c @@ -112,7 +112,9 @@ static void gma_resume_display(struct pci_dev *pdev) pci_write_config_word(pdev, PSB_GMCH_CTRL, dev_priv->gmch_ctrl | _PSB_GMCH_ENABLED); - psb_gtt_restore(dev); /* Rebuild our GTT mappings */ + /* Rebuild our GTT mappings */ + psb_gtt_resume(dev); + psb_gem_mm_resume(dev); dev_priv->ops->restore_regs(dev); } |