]> git.baikalelectronics.ru Git - kernel.git/commit
drm/gma500: Inline psb_gtt_{alloc,free}_range() into rsp callers
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 15 Oct 2021 08:40:50 +0000 (10:40 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 19 Oct 2021 08:38:54 +0000 (10:38 +0200)
commit56805c68c3e740a410a4ad6c5b74f334575d218f
tree1dac9ca5ca6eef69d2b96febbeb559d86eb97d4f
parent01caf2a74be948b0f78b3dea4abe89b7ae42cd8a
drm/gma500: Inline psb_gtt_{alloc,free}_range() into rsp callers

psb_gtt_alloc_range() allocates struct gtt_range, create the GTT resource
and performs some half-baked initialization. Inline the function into its
only caller psb_gem_create(). For creating the GTT resource, introduce a
new helper, psb_gtt_alloc_resource() that hides the details of the GTT.

For psb_gtt_free_range(), inline the function into its only caller
psb_gem_free_object(). While at it, remove the explicit invocation of
drm_gem_free_mmap_offset(). The mmap offset is already released by
drm_gem_object_release().

v3:
* replace offset[static 1] with pointer notation (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-8-tzimmermann@suse.de
drivers/gpu/drm/gma500/gem.c
drivers/gpu/drm/gma500/gtt.c
drivers/gpu/drm/gma500/gtt.h