summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500/gtt.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2021-10-15 11:40:52 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2021-10-19 11:38:54 +0300
commite1f80341e312088f0e6c46107db7098e30e6d764 (patch)
treebb6153f3561ba6dee103473e1acb43dfd45af877 /drivers/gpu/drm/gma500/gtt.h
parent33e079bc1530df4596181ccbfded8752bbedb92c (diff)
downloadlinux-e1f80341e312088f0e6c46107db7098e30e6d764.tar.xz
drm/gma500: Rewrite GTT page insert/remove without struct gtt_range
struct gtt_range represents a GEM object and should not be used for GTT setup. Change psb_gtt_insert() and psb_gtt_remove() to receive all necessary parameters from their caller. This also eliminates possible failure from psb_gtt_insert(). There's one exception in psb_gtt_restore(), which requires an upcast from struct resource to struct gtt_range when restoring the GTT after hibernation. A possible solution would track the GEM objects that need restoration separately from the GTT resource. Rename the functions to psb_gtt_insert_pages() and psb_gtt_remove_pages() to reflect their similarity to MMU interfaces. v3: * restore the comments about locking rules (Patrik) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-10-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/gma500/gtt.h')
-rw-r--r--drivers/gpu/drm/gma500/gtt.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/gtt.h b/drivers/gpu/drm/gma500/gtt.h
index ddb4f3af93f7..b967dcf6bef1 100644
--- a/drivers/gpu/drm/gma500/gtt.h
+++ b/drivers/gpu/drm/gma500/gtt.h
@@ -49,7 +49,8 @@ int psb_gtt_allocate_resource(struct drm_psb_private *pdev, struct resource *res
const char *name, resource_size_t size, resource_size_t align,
bool stolen, u32 *offset);
-int psb_gtt_insert(struct drm_device *dev, struct gtt_range *r);
-void psb_gtt_remove(struct drm_device *dev, struct gtt_range *r);
+void psb_gtt_insert_pages(struct drm_psb_private *pdev, const struct resource *res,
+ struct page **pages);
+void psb_gtt_remove_pages(struct drm_psb_private *pdev, const struct resource *res);
#endif