drm/cma-helper: Pass GEM CMA object in public interfaces
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 15 Nov 2021 12:01:48 +0000 (13:01 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 30 Nov 2021 08:49:58 +0000 (09:49 +0100)
commite580ea25c08d9e89593bcf80640e29108f0542cb
treece2cf7eaf9e1020562d5b1ac1d717896452d9f30
parent05b1de51df077a2089e3d8ceec68aa687cff15db
drm/cma-helper: Pass GEM CMA object in public interfaces

Change all GEM CMA object functions that receive a GEM object
of type struct drm_gem_object to expect an object of type
struct drm_gem_cma_object instead.

This change reduces the number of upcasts from struct drm_gem_object
by moving them into callers. The C compiler can now verify that the
GEM CMA functions are called with the correct type.

For consistency, the patch also renames drm_gem_cma_free_object to
drm_gem_cma_free. It further updates documentation for a number of
functions.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20211115120148.21766-4-tzimmermann@suse.de
drivers/gpu/drm/drm_gem_cma_helper.c
drivers/gpu/drm/vc4/vc4_bo.c
include/drm/drm_gem_cma_helper.h