[PATCH] accel/ivpu: Add turbo flag to the DRM_IVPU_CMDQ_CREATE ioctl

Falkowski, Maciej maciej.falkowski at linux.intel.com
Thu Jun 12 13:31:18 UTC 2025


On 6/6/2025 6:30 PM, Jeff Hugo wrote:

> On 6/5/2025 10:20 AM, Maciej Falkowski wrote:
>> From: Andrzej Kacprowski <Andrzej.Kacprowski at intel.com>
>>
>> Introduces a new parameter to the DRM_IVPU_CMDQ_CREATE ioctl,
>
> Introduce
Ack, thanks.
>
>> enabling turbo mode for jobs submitted via the command queue.
>> Turbo mode allows jobs to run at higher frequencies,
>> potentially improving performance for demanding workloads.
>>
>> The change also adds the IVPU_TEST_MODE_TURBO_DISABLE flag
>
> "This change" is redundant. Just start with "Also add the..."
Ack, thanks.
>
>> to allow test mode to explicitly disable turbo mode
>> requested by the application.
>> The IVPU_TEST_MODE_TURBO mode has been renamed to
>> IVPU_TEST_MODE_TURBO_ENABLE for clarity and consistency.
>>
>> +/* Command queue flags */
>> +#define DRM_IVPU_CMDQ_FLAG_TURBO 0x00000001
>> +
>>   /**
>>    * struct drm_ivpu_cmdq_create - Create command queue for job 
>> submission
>>    */
>> @@ -462,6 +465,17 @@ struct drm_ivpu_cmdq_create {
>>        * %DRM_IVPU_JOB_PRIORITY_REALTIME
>>        */
>>       __u32 priority;
>> +    /**
>> +     * @flags:
>> +     *
>> +     * Supported flags:
>> +     *
>> +     * %DRM_IVPU_CMDQ_FLAG_TURBO
>> +     *
>> +     * Enable low-latency mode for the command queue. The NPU will 
>> maximize performance
>> +     * when executing jobs from such queue at the cost of increased 
>> power usage.
>> +     */
>> +    __u32 flags;
>
> This is going to break the struct size on compat.  You probably need a 
> __u32 reserved to maintain 64-bit alignment. 

Thank you for suggestion,
I think compat is preserved here as u32 imposes 4 byte alignment on 64bit
so the alignment is going to be 12 bytes on both 32bit and 64bit, I 
tested this manually.
Please correct me if I am wrong.

Best regards,
Maciej


More information about the dri-devel mailing list