Skip to content

drm/vc4: Properly separate v3d on BCM2711, and fix frame ordering

Maxime Ripard dri-devel 2 versions – Applied

Status from this message: Applied to drm/drm-misc (drm-misc-fixes).

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest14 patches 2 repliesApplied
  2. v114 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- Rebased on current drm-misc-next
- Renamed vc4_dumb_create to vc5_dumb_create
- Fixed intermediate compilation error
- Fixed call to dma_resv_get_singleton
- Complete async page flip immediately if there's no fence
- Fix null pointer dereference on the Pi3
- Collected tags from Melissa

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/14drm/vc4: plane: Prevent async update if we don't have a dlistdrivers/gpu/drm/vc4/vc4_plane.c+4 -00 replies
2/14drm/vc4: Consolidate Hardware Revision Checkdrivers/gpu/drm/vc4/vc4_crtc.c drivers/gpu/drm/vc4/vc4_drv.c drivers/gpu/drm/vc4/vc4_drv.h +3 more+30 -290 replies
3/14drm/vc4: bo: Rename vc4_dumb_createdrivers/gpu/drm/vc4/vc4_bo.c drivers/gpu/drm/vc4/vc4_drv.c drivers/gpu/drm/vc4/vc4_drv.h+7 -70 replies
4/14drm/vc4: bo: Split out Dumb buffers fixupdrivers/gpu/drm/vc4/vc4_bo.c drivers/gpu/drm/vc4/vc4_drv.c drivers/gpu/drm/vc4/vc4_drv.h+17 -60 replies
5/14drm/vc4: drv: Register a different driver on BCM2711drivers/gpu/drm/vc4/vc4_drv.c+42 -90 replies
6/14drm/vc4: kms: Register a different drm_mode_config_funcs on BCM2711drivers/gpu/drm/vc4/vc4_kms.c+7 -10 replies
7/14drm/vc4: plane: Register a different drm_plane_helper_funcs on BCM2711drivers/gpu/drm/vc4/vc4_plane.c+11 -10 replies
8/14drm/vc4: drv: Skip BO Backend Initialization on BCM2711drivers/gpu/drm/vc4/vc4_drv.c+11 -70 replies
9/14drm/vc4: crtc: Use an union to store the page flip callbackdrivers/gpu/drm/vc4/vc4_crtc.c+14 -60 replies
10/14drm/vc4: crtc: Move the BO handling out of common page-flip callbackdrivers/gpu/drm/vc4/vc4_crtc.c+20 -140 replies
11/14drm/vc4: crtc: Move the BO Handling out of Common Page-Flip Handlerdrivers/gpu/drm/vc4/vc4_crtc.c+48 -250 replies
12/14drm/vc4: crtc: Don't call into BO Handling on Async Page-Flips on BCM2711drivers/gpu/drm/vc4/vc4_crtc.c+18 -30 replies
13/14drm/vc4: crtc: Fix out of order frames during asynchronous page flipsdrivers/gpu/drm/vc4/vc4_crtc.c+46 -41 reply
14/14drm/vc4: Warn if some v3d code is run on BCM2711drivers/gpu/drm/vc4/vc4_bo.c drivers/gpu/drm/vc4/vc4_drv.c drivers/gpu/drm/vc4/vc4_drv.h +8 more+211 -10 replies

Reviews trailers per patch

All 14 patches have a Reviewed-by or Acked-by.

PatchMelissa Wen
1/14R-b
2/14R-b
3/14R-b
4/14R-b
5/14R-b
6/14R-b
7/14R-b
8/14R-b
9/14R-b
10/14R-b
11/14R-b
12/14R-b
13/14R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/14] drm/vc4: Properly separate v3d on BCM2711, and fix frame ordering

Hi,

Here's a series that fixes a significant issue we missed when adding support for the BCM2711 / RaspberryPi4 in the vc4 driver.

Indeed, before the introduction of the BCM2711 support, the GPU was fairly intertwined with the display hardware, and was thus supported by the vc4 driver. Among other things, the driver needed to accomodate for a bunch of hardware limitations (such as a lack of IOMMU) by implementing a custom memory management backend, tied with the v3d hardware.

On the BCM2711, that GPU got moved into a completely separate hardware block and thus we gained a new driver for it, v3d.

However, when we introduced the display support for the BCM2711 in vc4, we didn't properly split out the v3d-related functions and ended up reusing a significant portion of the code supposed to be backed by the v3d.

This created a bunch of easy to miss issues that would only pop up with IGT tests, or when heavily testing some features (like asynchronous page-flipping).

This series properly does the split now by creating separate code path where relevant, adds a loud complain when we use a v3d entry-point on the BCM2711, and fixes an issue where we would just ignore any fence on an asynchronous page-flip, resulting in frames appearing out-of-order for some workloads.

Let me know what you think,
Maxime

Changes from v1:
- Rebased on current drm-misc-next
- Renamed vc4_dumb_create to vc5_dumb_create
- Fixed intermediate compilation error
- Fixed call to dma_resv_get_singleton
- Complete async page flip immediately if there's no fence
- Fix null pointer dereference on the Pi3
- Collected tags from Melissa

Maxime Ripard (14):
drm/vc4: plane: Prevent async update if we don't have a dlist drm/vc4: Consolidate Hardware Revision Check
drm/vc4: bo: Rename vc4_dumb_create
drm/vc4: bo: Split out Dumb buffers fixup
drm/vc4: drv: Register a different driver on BCM2711 drm/vc4: kms: Register a different drm_mode_config_funcs on BCM2711 drm/vc4: plane: Register a different drm_plane_helper_funcs on BCM2711 drm/vc4: drv: Skip BO Backend Initialization on BCM2711 drm/vc4: crtc: Use an union to store the page flip callback drm/vc4: crtc: Move the BO handling out of common page-flip callback drm/vc4: crtc: Move the BO Handling out of Common Page-Flip Handler drm/vc4: crtc: Don't call into BO Handling on Async Page-Flips on

    BCM2711

drm/vc4: crtc: Fix out of order frames during asynchronous page flips drm/vc4: Warn if some v3d code is run on BCM2711

 drivers/gpu/drm/vc4/vc4_bo.c               |  62 ++++++-
 drivers/gpu/drm/vc4/vc4_crtc.c             | 200 +++++++++++++++------
 drivers/gpu/drm/vc4/vc4_drv.c              |  97 ++++++++--
 drivers/gpu/drm/vc4/vc4_drv.h              |  19 +-
 drivers/gpu/drm/vc4/vc4_gem.c              |  40 +++++
 drivers/gpu/drm/vc4/vc4_hvs.c              |  18 +-
 drivers/gpu/drm/vc4/vc4_irq.c              |  16 ++
 drivers/gpu/drm/vc4/vc4_kms.c              |  24 ++-
 drivers/gpu/drm/vc4/vc4_perfmon.c          |  47 ++++-
 drivers/gpu/drm/vc4/vc4_plane.c            |  29 ++-
 drivers/gpu/drm/vc4/vc4_render_cl.c        |   4 +
 drivers/gpu/drm/vc4/vc4_v3d.c              |  15 ++
 drivers/gpu/drm/vc4/vc4_validate.c         |  16 ++
 drivers/gpu/drm/vc4/vc4_validate_shaders.c |   4 +
 14 files changed, 482 insertions(+), 109 deletions(-)
Signature · 1 line
2.36.1