Skip to content

Commit a39b5b6

Browse files
akacprowgregkh
authored andcommitted
accel/ivpu: Update VPU FW API headers
commit a4293cc upstream. This commit bumps: - Boot API from 3.24.0 to 3.26.3 - JSM API from 3.16.0 to 3.25.0 Signed-off-by: Andrzej Kacprowski <[email protected]> Co-developed-by: Tomasz Rusinowicz <[email protected]> Signed-off-by: Tomasz Rusinowicz <[email protected]> Reviewed-by: Jacek Lawrynowicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Jacek Lawrynowicz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1ebbfee commit a39b5b6

File tree

4 files changed

+292
-59
lines changed

4 files changed

+292
-59
lines changed

drivers/accel/ivpu/ivpu_job.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static int ivpu_cmdq_push_job(struct ivpu_cmdq *cmdq, struct ivpu_job *job)
352352
return -EBUSY;
353353
}
354354

355-
entry = &cmdq->jobq->job[tail];
355+
entry = &cmdq->jobq->slot[tail].job;
356356
entry->batch_buf_addr = job->cmd_buf_vpu_addr;
357357
entry->job_id = job->job_id;
358358
entry->flags = 0;

drivers/accel/ivpu/ivpu_jsm_msg.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ const char *ivpu_jsm_msg_type_to_str(enum vpu_ipc_msg_type type)
4848
IVPU_CASE_TO_STR(VPU_JSM_MSG_HWS_RESUME_ENGINE_DONE);
4949
IVPU_CASE_TO_STR(VPU_JSM_MSG_STATE_DUMP);
5050
IVPU_CASE_TO_STR(VPU_JSM_MSG_STATE_DUMP_RSP);
51-
IVPU_CASE_TO_STR(VPU_JSM_MSG_BLOB_DEINIT);
51+
IVPU_CASE_TO_STR(VPU_JSM_MSG_BLOB_DEINIT_DEPRECATED);
5252
IVPU_CASE_TO_STR(VPU_JSM_MSG_DYNDBG_CONTROL);
5353
IVPU_CASE_TO_STR(VPU_JSM_MSG_JOB_DONE);
54+
IVPU_CASE_TO_STR(VPU_JSM_MSG_NATIVE_FENCE_SIGNALLED);
5455
IVPU_CASE_TO_STR(VPU_JSM_MSG_ENGINE_RESET_DONE);
5556
IVPU_CASE_TO_STR(VPU_JSM_MSG_ENGINE_PREEMPT_DONE);
5657
IVPU_CASE_TO_STR(VPU_JSM_MSG_REGISTER_DB_DONE);

drivers/accel/ivpu/vpu_boot_api.h

+28-15
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
/* SPDX-License-Identifier: MIT */
22
/*
3-
* Copyright (c) 2020-2023, Intel Corporation.
3+
* Copyright (c) 2020-2024, Intel Corporation.
44
*/
55

66
#ifndef VPU_BOOT_API_H
77
#define VPU_BOOT_API_H
88

99
/*
10-
* =========== FW API version information beginning ================
1110
* The below values will be used to construct the version info this way:
1211
* fw_bin_header->api_version[VPU_BOOT_API_VER_ID] = (VPU_BOOT_API_VER_MAJOR << 16) |
1312
* VPU_BOOT_API_VER_MINOR;
@@ -27,19 +26,18 @@
2726
* Minor version changes when API backward compatibility is preserved.
2827
* Resets to 0 if Major version is incremented.
2928
*/
30-
#define VPU_BOOT_API_VER_MINOR 24
29+
#define VPU_BOOT_API_VER_MINOR 26
3130

3231
/*
3332
* API header changed (field names, documentation, formatting) but API itself has not been changed
3433
*/
35-
#define VPU_BOOT_API_VER_PATCH 0
34+
#define VPU_BOOT_API_VER_PATCH 3
3635

3736
/*
3837
* Index in the API version table
3938
* Must be unique for each API
4039
*/
4140
#define VPU_BOOT_API_VER_INDEX 0
42-
/* ------------ FW API version information end ---------------------*/
4341

4442
#pragma pack(push, 4)
4543

@@ -164,8 +162,6 @@ enum vpu_trace_destination {
164162
/* VPU 30xx HW component IDs are sequential, so define first and last IDs. */
165163
#define VPU_TRACE_PROC_BIT_30XX_FIRST VPU_TRACE_PROC_BIT_LRT
166164
#define VPU_TRACE_PROC_BIT_30XX_LAST VPU_TRACE_PROC_BIT_SHV_15
167-
#define VPU_TRACE_PROC_BIT_KMB_FIRST VPU_TRACE_PROC_BIT_30XX_FIRST
168-
#define VPU_TRACE_PROC_BIT_KMB_LAST VPU_TRACE_PROC_BIT_30XX_LAST
169165

170166
struct vpu_boot_l2_cache_config {
171167
u8 use;
@@ -199,6 +195,17 @@ struct vpu_warm_boot_section {
199195
*/
200196
#define POWER_PROFILE_SURVIVABILITY 0x1
201197

198+
/**
199+
* Enum for dvfs_mode boot param.
200+
*/
201+
enum vpu_governor {
202+
VPU_GOV_DEFAULT = 0, /* Default Governor for the system */
203+
VPU_GOV_MAX_PERFORMANCE = 1, /* Maximum performance governor */
204+
VPU_GOV_ON_DEMAND = 2, /* On Demand frequency control governor */
205+
VPU_GOV_POWER_SAVE = 3, /* Power save governor */
206+
VPU_GOV_ON_DEMAND_PRIORITY_AWARE = 4 /* On Demand priority based governor */
207+
};
208+
202209
struct vpu_boot_params {
203210
u32 magic;
204211
u32 vpu_id;
@@ -301,7 +308,14 @@ struct vpu_boot_params {
301308
u32 temp_sensor_period_ms;
302309
/** PLL ratio for efficient clock frequency */
303310
u32 pn_freq_pll_ratio;
304-
/** DVFS Mode: Default: 0, Max Performance: 1, On Demand: 2, Power Save: 3 */
311+
/**
312+
* DVFS Mode:
313+
* 0 - Default, DVFS mode selected by the firmware
314+
* 1 - Max Performance
315+
* 2 - On Demand
316+
* 3 - Power Save
317+
* 4 - On Demand Priority Aware
318+
*/
305319
u32 dvfs_mode;
306320
/**
307321
* Depending on DVFS Mode:
@@ -332,8 +346,8 @@ struct vpu_boot_params {
332346
u64 d0i3_entry_vpu_ts;
333347
/*
334348
* The system time of the host operating system in microseconds.
335-
* E.g the number of microseconds since 1st of January 1970, or whatever date the
336-
* host operating system uses to maintain system time.
349+
* E.g the number of microseconds since 1st of January 1970, or whatever
350+
* date the host operating system uses to maintain system time.
337351
* This value will be used to track system time on the VPU.
338352
* The KMD is required to update this value on every VPU reset.
339353
*/
@@ -382,10 +396,7 @@ struct vpu_boot_params {
382396
u32 pad6[734];
383397
};
384398

385-
/*
386-
* Magic numbers set between host and vpu to detect corruptio of tracing init
387-
*/
388-
399+
/* Magic numbers set between host and vpu to detect corruption of tracing init */
389400
#define VPU_TRACING_BUFFER_CANARY (0xCAFECAFE)
390401

391402
/* Tracing buffer message format definitions */
@@ -405,7 +416,9 @@ struct vpu_tracing_buffer_header {
405416
u32 host_canary_start;
406417
/* offset from start of buffer for trace entries */
407418
u32 read_index;
408-
u32 pad_to_cache_line_size_0[14];
419+
/* keeps track of wrapping on the reader side */
420+
u32 read_wrap_count;
421+
u32 pad_to_cache_line_size_0[13];
409422
/* End of first cache line */
410423

411424
/**

0 commit comments

Comments
 (0)