drm/vc4: bo: Split out Dumb buffers fixup
authorMaxime Ripard <maxime@cerno.tech>
Fri, 10 Jun 2022 11:51:39 +0000 (13:51 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 16 Jun 2022 09:07:51 +0000 (11:07 +0200)
commit3d7637423be8340f40a669beb253aabbf08239ca
treea7402be5a87a9e5373a282e6c66e7e5622c562d0
parentdd2dfd44edc5ba5b2de3c2e6c1c823a62e8f1e92
drm/vc4: bo: Split out Dumb buffers fixup

The vc4_bo_dumb_create() both fixes up the allocation arguments to match
the hardware constraints and actually performs the allocation.

Since we're going to introduce a new function that uses a different
allocator, let's split the arguments fixup to a separate function we
will be able to reuse.

Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220610115149.964394-5-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h