drm/vc4: hvs: Rework LBM alignment
authorMaxime Ripard <maxime@cerno.tech>
Thu, 13 Apr 2023 08:12:19 +0000 (10:12 +0200)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:34:55 +0000 (11:34 +0000)
commit8066a717722ea406898c996da067aef5cc5dcb57
treeca8dadeeadb72f6d2df3713132cca6a3bac87799
parent5d2c322d2826db55b3aea183669c44af664df7b0
drm/vc4: hvs: Rework LBM alignment

With the introduction of the support for BCM2712, the check of whether
we're running on vc5 or not to compute the LBM alignment requirement
doesn't work anymore.

Moreover, the LBM size will need to be computed in words for the
BCM2712, while we've had sizes in bytes so far.

Aligning on either 64 or 32 words is thus fairly harmful on BCM2712, so
let's just explicitly align the size when needed, and then call
drm_mm_insert_node_generic() with an alignment of 1.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_plane.c