mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +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>
85 lines
2.8 KiB
Diff
85 lines
2.8 KiB
Diff
From 92f7f613ece28ecff26cbe5b5af20343bb624db1 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
Date: Mon, 2 May 2022 10:20:56 +0200
|
|
Subject: [PATCH] drm/vc4: crtc: Use an union to store the page flip
|
|
callback
|
|
|
|
We'll need to extend the vc4_async_flip_state structure to rely on
|
|
another callback implementation, so let's move the current one into a
|
|
union.
|
|
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_crtc.c | 30 +++++++++++++++++++-----------
|
|
1 file changed, 19 insertions(+), 11 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
|
|
@@ -802,18 +802,18 @@ struct vc4_async_flip_state {
|
|
struct drm_framebuffer *old_fb;
|
|
struct drm_pending_vblank_event *event;
|
|
|
|
- struct vc4_seqno_cb cb;
|
|
- struct dma_fence_cb fence_cb;
|
|
+ union {
|
|
+ struct dma_fence_cb fence;
|
|
+ struct vc4_seqno_cb seqno;
|
|
+ } cb;
|
|
};
|
|
|
|
/* Called when the V3D execution for the BO being flipped to is done, so that
|
|
* we can actually update the plane's address to point to it.
|
|
*/
|
|
static void
|
|
-vc4_async_page_flip_complete(struct vc4_seqno_cb *cb)
|
|
+vc4_async_page_flip_complete(struct vc4_async_flip_state *flip_state)
|
|
{
|
|
- struct vc4_async_flip_state *flip_state =
|
|
- container_of(cb, struct vc4_async_flip_state, cb);
|
|
struct drm_crtc *crtc = flip_state->crtc;
|
|
struct drm_device *dev = crtc->dev;
|
|
struct drm_plane *plane = crtc->primary;
|
|
@@ -849,13 +849,21 @@ vc4_async_page_flip_complete(struct vc4_
|
|
kfree(flip_state);
|
|
}
|
|
|
|
+static void vc4_async_page_flip_seqno_complete(struct vc4_seqno_cb *cb)
|
|
+{
|
|
+ struct vc4_async_flip_state *flip_state =
|
|
+ container_of(cb, struct vc4_async_flip_state, cb.seqno);
|
|
+
|
|
+ vc4_async_page_flip_complete(flip_state);
|
|
+}
|
|
+
|
|
static void vc4_async_page_flip_fence_complete(struct dma_fence *fence,
|
|
struct dma_fence_cb *cb)
|
|
{
|
|
struct vc4_async_flip_state *flip_state =
|
|
- container_of(cb, struct vc4_async_flip_state, fence_cb);
|
|
+ container_of(cb, struct vc4_async_flip_state, cb.fence);
|
|
|
|
- vc4_async_page_flip_complete(&flip_state->cb);
|
|
+ vc4_async_page_flip_complete(flip_state);
|
|
dma_fence_put(fence);
|
|
}
|
|
|
|
@@ -870,14 +878,14 @@ static int vc4_async_set_fence_cb(struct
|
|
if (!vc4->is_vc5) {
|
|
struct vc4_bo *bo = to_vc4_bo(&cma_bo->base);
|
|
|
|
- return vc4_queue_seqno_cb(dev, &flip_state->cb, bo->seqno,
|
|
- vc4_async_page_flip_complete);
|
|
+ return vc4_queue_seqno_cb(dev, &flip_state->cb.seqno, bo->seqno,
|
|
+ vc4_async_page_flip_seqno_complete);
|
|
}
|
|
|
|
fence = dma_fence_get(dma_resv_excl_fence(cma_bo->base.resv));
|
|
- if (dma_fence_add_callback(fence, &flip_state->fence_cb,
|
|
+ if (dma_fence_add_callback(fence, &flip_state->cb.fence,
|
|
vc4_async_page_flip_fence_complete))
|
|
- vc4_async_page_flip_fence_complete(fence, &flip_state->fence_cb);
|
|
+ vc4_async_page_flip_fence_complete(fence, &flip_state->cb.fence);
|
|
|
|
return 0;
|
|
}
|