mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 22:22:08 +02:00
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
This commit is contained in:
parent
f6766fb265
commit
d87db1c79d
|
|
@ -925,16 +925,31 @@ static int vc4_async_page_flip(struct drm_crtc *crtc,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int vc5_async_page_flip(struct drm_crtc *crtc,
|
||||
struct drm_framebuffer *fb,
|
||||
struct drm_pending_vblank_event *event,
|
||||
uint32_t flags)
|
||||
{
|
||||
return vc4_async_page_flip_common(crtc, fb, event, flags);
|
||||
}
|
||||
|
||||
int vc4_page_flip(struct drm_crtc *crtc,
|
||||
struct drm_framebuffer *fb,
|
||||
struct drm_pending_vblank_event *event,
|
||||
uint32_t flags,
|
||||
struct drm_modeset_acquire_ctx *ctx)
|
||||
{
|
||||
if (flags & DRM_MODE_PAGE_FLIP_ASYNC)
|
||||
return vc4_async_page_flip(crtc, fb, event, flags);
|
||||
else
|
||||
if (flags & DRM_MODE_PAGE_FLIP_ASYNC) {
|
||||
struct drm_device *dev = crtc->dev;
|
||||
struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
|
||||
if (vc4->is_vc5)
|
||||
return vc5_async_page_flip(crtc, fb, event, flags);
|
||||
else
|
||||
return vc4_async_page_flip(crtc, fb, event, flags);
|
||||
} else {
|
||||
return drm_atomic_helper_page_flip(crtc, fb, event, flags, ctx);
|
||||
}
|
||||
}
|
||||
|
||||
struct drm_crtc_state *vc4_crtc_duplicate_state(struct drm_crtc *crtc)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user