mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-25 20:37:02 +08:00

These patches were generated from: https://github.com/raspberrypi/linux/commits/rpi-6.12.y With the following command: git format-patch -N v6.12.27..HEAD (HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e) Exceptions: - (def)configs patches - github workflows patches - applied & reverted patches - readme patches - wireless patches Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
61 lines
2.1 KiB
Diff
61 lines
2.1 KiB
Diff
From f883b1d543abbb5930cd9dd03c49d35a739e765b Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <mripard@kernel.org>
|
|
Date: Fri, 21 Jun 2024 16:20:34 +0100
|
|
Subject: [PATCH] drm/vc4: hvs: Print error if we fail an allocation
|
|
|
|
We need to allocate a few additional structures when checking our
|
|
atomic_state, especially related to hardware SRAM that will hold the
|
|
plane descriptors (DLIST) and the current line context (LBM) during
|
|
composition.
|
|
|
|
Since those allocation can fail, let's add some error message in that
|
|
case to help debug what goes wrong.
|
|
|
|
Signed-off-by: Maxime Ripard <mripard@kernel.org>
|
|
Reviewed-by: Maxime Ripard <mripard@kernel.org>
|
|
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-11-dave.stevenson@raspberrypi.com
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_hvs.c | 4 +++-
|
|
drivers/gpu/drm/vc4/vc4_plane.c | 7 +++++--
|
|
2 files changed, 8 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_hvs.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
|
|
@@ -479,8 +479,10 @@ int vc4_hvs_atomic_check(struct drm_crtc
|
|
ret = drm_mm_insert_node(&vc4->hvs->dlist_mm, &vc4_state->mm,
|
|
dlist_count);
|
|
spin_unlock_irqrestore(&vc4->hvs->mm_lock, flags);
|
|
- if (ret)
|
|
+ if (ret) {
|
|
+ drm_err(dev, "Failed to allocate DLIST entry: %d\n", ret);
|
|
return ret;
|
|
+ }
|
|
|
|
return 0;
|
|
}
|
|
--- a/drivers/gpu/drm/vc4/vc4_plane.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
|
|
@@ -739,7 +739,8 @@ static void vc4_plane_calc_load(struct d
|
|
|
|
static int vc4_plane_allocate_lbm(struct drm_plane_state *state)
|
|
{
|
|
- struct vc4_dev *vc4 = to_vc4_dev(state->plane->dev);
|
|
+ struct drm_device *drm = state->plane->dev;
|
|
+ struct vc4_dev *vc4 = to_vc4_dev(drm);
|
|
struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
|
|
unsigned long irqflags;
|
|
u32 lbm_size;
|
|
@@ -765,8 +766,10 @@ static int vc4_plane_allocate_lbm(struct
|
|
0, 0);
|
|
spin_unlock_irqrestore(&vc4->hvs->mm_lock, irqflags);
|
|
|
|
- if (ret)
|
|
+ if (ret) {
|
|
+ drm_err(drm, "Failed to allocate LBM entry: %d\n", ret);
|
|
return ret;
|
|
+ }
|
|
} else {
|
|
WARN_ON_ONCE(lbm_size != vc4_state->lbm.size);
|
|
}
|