Skip to content

Commit d87db1c

Browse files
committed
drm/vc4: crtc: Don't call into BO Handling on Async Page-Flips on BCM2711
The BCM2711 doesn't have a v3d GPU so we don't want to call into its BO management code. Let's create an asynchronous page-flip handler for the BCM2711 that just calls into the common code. Reviewed-by: Melissa Wen <mwen@igalia.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20220610115149.964394-13-maxime@cerno.tech
1 parent f6766fb commit d87db1c

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

drivers/gpu/drm/vc4/vc4_crtc.c

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -925,16 +925,31 @@ static int vc4_async_page_flip(struct drm_crtc *crtc,
925925
return 0;
926926
}
927927

928+
static int vc5_async_page_flip(struct drm_crtc *crtc,
929+
struct drm_framebuffer *fb,
930+
struct drm_pending_vblank_event *event,
931+
uint32_t flags)
932+
{
933+
return vc4_async_page_flip_common(crtc, fb, event, flags);
934+
}
935+
928936
int vc4_page_flip(struct drm_crtc *crtc,
929937
struct drm_framebuffer *fb,
930938
struct drm_pending_vblank_event *event,
931939
uint32_t flags,
932940
struct drm_modeset_acquire_ctx *ctx)
933941
{
934-
if (flags & DRM_MODE_PAGE_FLIP_ASYNC)
935-
return vc4_async_page_flip(crtc, fb, event, flags);
936-
else
942+
if (flags & DRM_MODE_PAGE_FLIP_ASYNC) {
943+
struct drm_device *dev = crtc->dev;
944+
struct vc4_dev *vc4 = to_vc4_dev(dev);
945+
946+
if (vc4->is_vc5)
947+
return vc5_async_page_flip(crtc, fb, event, flags);
948+
else
949+
return vc4_async_page_flip(crtc, fb, event, flags);
950+
} else {
937951
return drm_atomic_helper_page_flip(crtc, fb, event, flags, ctx);
952+
}
938953
}
939954

940955
struct drm_crtc_state *vc4_crtc_duplicate_state(struct drm_crtc *crtc)

0 commit comments

Comments
 (0)