On 28-Oct-26 16:22, Jeff Hugo wrote:
On 10/28/2026 2:59 AM, Wachowski, Karol wrote:
On 27-Oct-26 17:45, Andrzej Kacprowski wrote:
The optimal preemption buffer size depends on the hardware and firmware
configuration, which is best known to the firmware. Newer firmware
reports the required size in the preemption_buffer_size field of the
boot params, which it writes before signaling cold boot completion.

Read the size from the boot params once, after the initial cold boot
during device initialization, as the firmware does not update it
afterwards. Use it as the primary preemption buffer size and skip
allocating the secondary buffer. A size outside of the [2 MiB, 32 MiB]
range is treated as a firmware error and fails probe. If the firmware
does not report the size, keep using the sizes from the firmware image
header to preserve compatibility with older firmware.

The preemption buffer sizes in the image header are deprecated in
favor of the boot params, meaning the boot params size takes
precedence when available. Firmware still provides valid sizes in the
image header so that older kernels keep working, so the image header
sizes are always validated and used until the boot params are read.

Simplify the image header size selection: use the max sizes for both
buffers when preemption_buffer_1_max_size is set, otherwise use the
regular sizes. All known firmware versions that set
preemption_buffer_1_max_size also set preemption_buffer_2_max_size, so
selecting each buffer size separately is not needed.

Move initialization of the trace and DVFS defaults to
ivpu_fw_preboot_init().

Update the FW boot API header to version 3.39.1:
- Add the VPU_GOV_ON_DEMAND_PER_PRIORITY and VPU_GOV_ON_DEMAND_QOS
   DVFS governors
- Add the preemption_buffer_size field to struct vpu_boot_params
- Mark the preemption buffer sizes in the image header as deprecated
   in favor of preemption_buffer_size

Signed-off-by: Andrzej Kacprowski <[email protected]>

Reviewed-by: Karol Wachowski <[email protected]>
Reviewed-by: Jeff Hugo <[email protected]>

Applied to drm-misc-next.

Reply via email to