From 957a2d0e7ea38d84d4b3cf9a951bccadeb803a24 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 15 Oct 2021 10:40:47 +0200 Subject: drm/gma500: Allocate GTT ranges in stolen memory with psb_gem_create() Support private objects for stolen memory in psb_gem_create() and convert users to psb_gem_create(). For stolen memory, psb_gem_create() now initializes the GEM object via drm_gem_private_object_init(). In the fbdev setup, replace the open-coded initialization of struct gtt_range with a call to psb_gem_create(). Use drm_gem_object_put() for release. In the cursor setup, use psb_gem_create() and get a real GEM object. Previously the allocated instance of struct gtt_range was only partially initialized. Release the cursor GEM object in gma_crtc_destroy(). The release was missing from the original code. With the conversion of all callers to psb_gem_create(), the extern declarations of psb_gtt_alloc_range, psb_gtt_free_range and psb_gem_object_func are not required any longer. Declare them as static. Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-5-tzimmermann@suse.de --- drivers/gpu/drm/gma500/gem.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/gpu/drm/gma500/gem.h') diff --git a/drivers/gpu/drm/gma500/gem.h b/drivers/gpu/drm/gma500/gem.h index ad76127dc719..6b67c58cbed5 100644 --- a/drivers/gpu/drm/gma500/gem.h +++ b/drivers/gpu/drm/gma500/gem.h @@ -12,14 +12,9 @@ struct drm_device; -extern const struct drm_gem_object_funcs psb_gem_object_funcs; - struct gtt_range * psb_gem_create(struct drm_device *dev, u64 size, const char *name, bool stolen, u32 align); -struct gtt_range *psb_gtt_alloc_range(struct drm_device *dev, int len, const char *name, - int backed, u32 align); -void psb_gtt_free_range(struct drm_device *dev, struct gtt_range *gt); int psb_gtt_pin(struct gtt_range *gt); void psb_gtt_unpin(struct gtt_range *gt); -- cgit v1.2.3