dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Wachowski, Karol" <karol.wachowski@linux.intel.com>
To: Jeff Hugo <jeff.hugo@oss.qualcomm.com>,
	Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>,
	dri-devel@lists.freedesktop.org
Cc: oded.gabbay@gmail.com, lizhi.hou@amd.com,
	dawid.osuchowski@linux.intel.com
Subject: Re: [PATCH v2] accel/ivpu: Read preemption buffer size from boot params
Date: Thu, 29 Oct 2026 09:33:18 +0100	[thread overview]
Message-ID: <4a97d32f-07cd-4752-90a7-5490dafdabfb@linux.intel.com> (raw)
In-Reply-To: <eecad0bc-1c70-485c-8a13-0459df71f5b3@oss.qualcomm.com>

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 <andrzej.kacprowski@linux.intel.com>
>>
>> Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com>
> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>

Applied to drm-misc-next.

      reply	other threads:[~2026-10-29  8:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 16:45 [PATCH v2] accel/ivpu: Read preemption buffer size from boot params Andrzej Kacprowski
2026-10-28  8:59 ` Wachowski, Karol
2026-10-28 15:22   ` Jeff Hugo
2026-10-29  8:33     ` Wachowski, Karol [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a97d32f-07cd-4752-90a7-5490dafdabfb@linux.intel.com \
    --to=karol.wachowski@linux.intel.com \
    --cc=andrzej.kacprowski@linux.intel.com \
    --cc=dawid.osuchowski@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jeff.hugo@oss.qualcomm.com \
    --cc=lizhi.hou@amd.com \
    --cc=oded.gabbay@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox