1 From 164f7e94da446984f275be1c082b93243beadfba Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Wed, 22 Mar 2023 16:17:57 +0100
4 Subject: [PATCH] drm/vc4: plane: Add more debugging for LBM allocation
6 LBM allocations need a different size depending on the line length,
9 This can get tricky, and fail. Let's add some more prints to ease the
10 debugging when it does.
12 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
14 drivers/gpu/drm/vc4/vc4_plane.c | 4 ++++
15 1 file changed, 4 insertions(+)
17 --- a/drivers/gpu/drm/vc4/vc4_plane.c
18 +++ b/drivers/gpu/drm/vc4/vc4_plane.c
19 @@ -735,6 +735,7 @@ static int vc4_plane_allocate_lbm(struct
21 struct drm_device *drm = state->plane->dev;
22 struct vc4_dev *vc4 = to_vc4_dev(drm);
23 + struct drm_plane *plane = state->plane;
24 struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
25 unsigned long irqflags;
27 @@ -743,6 +744,9 @@ static int vc4_plane_allocate_lbm(struct
31 + drm_dbg_driver(drm, "[PLANE:%d:%s] LBM Allocation Size: %u\n",
32 + plane->base.id, plane->name, lbm_size);
34 if (WARN_ON(!vc4_state->lbm_offset))