mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
a34255b795
Removed upstreamed: bcm27xx/patches-5.15/950-0446-drm-vc4-Fix-timings-for-VEC-modes.patch[1] Manually rebased: patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch All other patches automatically rebased 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.75&id=2810061452f9b748b096ad023d318690ca519aa3 Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <therealgraysky@proton.me>
69 lines
2.2 KiB
Diff
69 lines
2.2 KiB
Diff
From e2b51ac3278847aa79089b4a1b94b8d762af0052 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
Date: Mon, 2 May 2022 15:25:20 +0200
|
|
Subject: [PATCH] drm/vc4: crtc: Move the BO handling out of common
|
|
page-flip callback
|
|
|
|
We'll soon introduce another completion callback source that won't need
|
|
to use the BO reference counting, so let's move it around to create a
|
|
function we will be able to share between both callbacks.
|
|
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_crtc.c | 34 ++++++++++++++++++++--------------
|
|
1 file changed, 20 insertions(+), 14 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
|
|
@@ -830,21 +830,8 @@ vc4_async_page_flip_complete(struct vc4_
|
|
drm_crtc_vblank_put(crtc);
|
|
drm_framebuffer_put(flip_state->fb);
|
|
|
|
- /* Decrement the BO usecnt in order to keep the inc/dec calls balanced
|
|
- * when the planes are updated through the async update path.
|
|
- * FIXME: we should move to generic async-page-flip when it's
|
|
- * available, so that we can get rid of this hand-made cleanup_fb()
|
|
- * logic.
|
|
- */
|
|
- if (flip_state->old_fb) {
|
|
- struct drm_gem_cma_object *cma_bo;
|
|
- struct vc4_bo *bo;
|
|
-
|
|
- cma_bo = drm_fb_cma_get_gem_obj(flip_state->old_fb, 0);
|
|
- bo = to_vc4_bo(&cma_bo->base);
|
|
- vc4_bo_dec_usecnt(bo);
|
|
+ if (flip_state->old_fb)
|
|
drm_framebuffer_put(flip_state->old_fb);
|
|
- }
|
|
|
|
kfree(flip_state);
|
|
}
|
|
@@ -853,8 +840,27 @@ static void vc4_async_page_flip_seqno_co
|
|
{
|
|
struct vc4_async_flip_state *flip_state =
|
|
container_of(cb, struct vc4_async_flip_state, cb.seqno);
|
|
+ struct vc4_bo *bo = NULL;
|
|
+
|
|
+ if (flip_state->old_fb) {
|
|
+ struct drm_gem_cma_object *cma_bo =
|
|
+ drm_fb_cma_get_gem_obj(flip_state->old_fb, 0);
|
|
+ bo = to_vc4_bo(&cma_bo->base);
|
|
+ }
|
|
|
|
vc4_async_page_flip_complete(flip_state);
|
|
+
|
|
+ /*
|
|
+ * Decrement the BO usecnt in order to keep the inc/dec
|
|
+ * calls balanced when the planes are updated through
|
|
+ * the async update path.
|
|
+ *
|
|
+ * FIXME: we should move to generic async-page-flip when
|
|
+ * it's available, so that we can get rid of this
|
|
+ * hand-made cleanup_fb() logic.
|
|
+ */
|
|
+ if (bo)
|
|
+ vc4_bo_dec_usecnt(bo);
|
|
}
|
|
|
|
static void vc4_async_page_flip_fence_complete(struct dma_fence *fence,
|