linux/Documentation/gpu
Ville Syrjälä 470022b5c2 drm/i915/flipq: Provide the nuts and bolts code for flip queue
Provide the lower level code for PIPEDMC based flip queue.

We'll use the so called semi-full flip queue mode where the
PIPEDMC will start the provided DSB on a scanline a little
ahead of the vblank. We need to program the triggering scanline
early enough so that the DSB has enough time to complete writing
all the double buffered registers before they get latched (at
start of vblank).

The firmware implements several queues:
- 3 "plane queues" which execute a single DSB per entry
- 1 "general queue" which can apparently execute 2 DSBs per entry
- 1 vestigial "fast queue" that replaced the "simple flip queue"
  on ADL+, but this isn't supposed to be used due to issues.

But we only need a single plane queue really, and we won't actually
use it as a real queue because we don't allow queueing multiple commits
ahead of time. So the whole thing is perhaps useless. I suppose
there migth be some power saving benefits if we would get the flip
scheduled by userspace early and then could keep some hardware powered
off a bit longer until the DMC kicks off the flipq programming. But that
is pure speculation at this time and needs to be proven.

The code to hook up the flip queue into the actual atomic commit
path will follow later.

TODO: need to think how to do the "wait for DMC firmware load" nicely
      need to think about VRR and PSR
      etc.

v2: Don't write DMC_FQ_W2_PTS_CFG_SEL on pre-lnl
    Don't oops at flipq init if there is no dmc
v3: Adapt to PTL+ flipq changes (different queue entry
    layout, different trigger event, need VRR TG)
    Use the actual CDCLK frequency
    Ask the DSB code how long things are expected to take
v3: Adjust the cdclk rounding (docs are 100% vague, Windows
    rounds like this)
    Initialize some undocumented magic DMC variables on PTL
v4: Use PIPEDMC_FQ_STATUS for busy check (the busy bit in
    PIPEDMC_FQ_CTRL is apparently gone on LNL+)
    Based the preempt timeout on the max exec time
    Preempt before disabling the flip queue
    Order the PIPEDMC_SCANLINECMP* writes a bit more carefully
    Fix some typos
v5: Try to deal with some clang-20 div-by-zero false positive (Nathan)
    Add some docs (Jani)

Cc: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

epr
Link: https://patchwork.freedesktop.org/patch/msgid/20250624170049.27284-5-ville.syrjala@linux.intel.com
2025-06-27 15:54:43 +03:00
..
amdgpu Documentation/gpu: Disambiguate SPI term 2025-05-13 09:37:42 -04:00
bridge
dp-mst
imagination drm/imagination: Numerous documentation fixes. 2023-11-28 18:56:03 +01:00
nova gpu: nova-core: define registers layout using helper macro 2025-05-13 15:08:18 +02:00
rfc Fix spelling error for 'parallel' 2025-05-19 05:33:48 -06:00
xe drm/xe/configfs: Add internal API to documentation 2025-06-02 11:00:46 -07:00
afbc.rst
automated_testing.rst drm/ci: enable lockdep detection 2025-03-12 08:16:31 +05:30
backlight.rst doc-rst: Wire-up Backlight kernel-doc documentation 2020-07-20 10:26:22 +01:00
driver-uapi.rst drm: Add UAPI for the Asahi driver 2025-04-08 17:15:57 -04:00
drivers.rst Nova changes for v6.15 2025-03-13 06:03:55 +10:00
drm-client.rst drm/client: Move client event handlers to drm_client_event.c 2024-10-18 09:23:03 +02:00
drm-compute.rst kernel/cgroup: Add "dmem" memory accounting cgroup 2025-01-06 17:24:38 +01:00
drm-internals.rst drm/doc: Document KUnit expectations 2025-02-26 16:04:15 +01:00
drm-kms-helpers.rst drm/display: hdmi: Create documentation section 2025-03-14 09:21:03 +01:00
drm-kms.rst drm/panic: Add a drm panic handler 2024-04-15 16:12:49 +02:00
drm-mm.rst Documentation/gpu: VM_BIND locking document 2023-11-29 20:54:43 +01:00
drm-uapi.rst drm/doc: Add a section about "Task information" for the wedge API 2025-06-17 11:32:47 -03:00
drm-usage-stats.rst Documentation/gpu: Clarify format of driver-specific fidnfo keys 2025-02-07 15:22:46 +01:00
drm-vm-bind-async.rst Documentation/gpu: Add a VM_BIND async document 2023-10-17 10:38:07 +02:00
drm-vm-bind-locking.rst Documentation/gpu: VM_BIND locking document 2023-11-29 20:54:43 +01:00
i915.rst drm/i915/flipq: Provide the nuts and bolts code for flip queue 2025-06-27 15:54:43 +03:00
implementation_guidelines.rst Documentation/gpu: VM_BIND locking document 2023-11-29 20:54:43 +01:00
index.rst drm/doc: Include new drm-compute documentation 2025-01-15 09:45:54 +01:00
introduction.rst MAINATINERS: update drm maintainer contacts 2024-09-03 20:07:57 +02:00
kms-properties.csv drm/connector: hdmi: Add Broadcast RGB property 2024-05-28 10:24:37 +02:00
komeda-kms.rst Documentation/gpu: Fix typo in Documentation/gpu/komeda-kms.rst 2024-09-05 14:33:06 -06:00
mcde.rst
meson.rst
msm-crash-dump.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
msm-preemption.rst Documentation: document adreno preemption 2024-10-04 08:47:29 -07:00
nouveau.rst drm/nouveau/nvkm: factor out current GSP RPC command policies 2025-03-09 13:41:59 +01:00
panfrost.rst drm/panfrost: Replace fdinfo's profiling debugfs knob with sysfs 2024-03-11 13:27:10 +01:00
panthor.rst Documentation/gpu: Add fdinfo meanings of panthor-*-memory tags 2025-02-07 15:23:39 +01:00
pl111.rst drm: pl111: Update documentation 2020-07-23 10:06:22 +02:00
tegra.rst
todo.rst drm/todo: add entry to remove devm_drm_put_bridge() 2025-05-23 15:04:19 +02:00
tve200.rst
v3d.rst
vc4.rst drm/vc4: Improve the KUnit documentation 2022-12-15 08:54:08 +01:00
vga-switcheroo.rst
vgaarbiter.rst Documentation: vgaarbiter: Fix grammar 2025-03-19 15:11:49 +01:00
vkms.rst drm/vkms: Add how to run the Kunit tests 2025-05-28 16:19:14 +02:00
xen-front.rst
zynqmp.rst drm: xlnx: zynqmp_dpsub: Fix kernel doc 2025-01-16 12:45:16 +01:00