bcm27xx: add support for linux v5.15
[openwrt/staging/noltari.git] / target / linux / bcm27xx / patches-5.15 / 950-0619-drm-vc4-hvs-Remove-dlist-setup-duplication.patch
1 From 5fa4e656501eed725b9151a38e5b55a45571bf31 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Mon, 6 Dec 2021 16:17:56 +0100
4 Subject: [PATCH] drm/vc4: hvs: Remove dlist setup duplication
5
6 Setting the DISPLISTx register needs to occur in every case, and we
7 don't need to protect the register using the event_lock, so we can just
8 move it after the if branches and simplify a bit the function.
9
10 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
11 ---
12 drivers/gpu/drm/vc4/vc4_hvs.c | 9 +++------
13 1 file changed, 3 insertions(+), 6 deletions(-)
14
15 --- a/drivers/gpu/drm/vc4/vc4_hvs.c
16 +++ b/drivers/gpu/drm/vc4/vc4_hvs.c
17 @@ -616,15 +616,12 @@ static void vc4_hvs_update_dlist(struct
18 crtc->state->event = NULL;
19 }
20
21 - HVS_WRITE(SCALER_DISPLISTX(vc4_state->assigned_channel),
22 - vc4_state->mm.start);
23 -
24 spin_unlock_irqrestore(&dev->event_lock, flags);
25 - } else {
26 - HVS_WRITE(SCALER_DISPLISTX(vc4_state->assigned_channel),
27 - vc4_state->mm.start);
28 }
29
30 + HVS_WRITE(SCALER_DISPLISTX(vc4_state->assigned_channel),
31 + vc4_state->mm.start);
32 +
33 spin_lock_irqsave(&vc4_crtc->irq_lock, flags);
34 vc4_crtc->current_dlist = vc4_state->mm.start;
35 spin_unlock_irqrestore(&vc4_crtc->irq_lock, flags);