17
17
/*
18
18
* Major version changes that break backward compatibility
19
19
*/
20
- #define VPU_JSM_API_VER_MAJOR 2
20
+ #define VPU_JSM_API_VER_MAJOR 3
21
21
22
22
/*
23
23
* Minor version changes when API backward compatibility is preserved.
24
24
*/
25
- #define VPU_JSM_API_VER_MINOR 10
25
+ #define VPU_JSM_API_VER_MINOR 0
26
26
27
27
/*
28
28
* API header changed (field names, documentation, formatting) but API itself has not been changed
103
103
/*
104
104
* Max length (including trailing NULL char) of a dyndbg command.
105
105
*
106
- * NOTE: 112 is used so that the size of 'struct vpu_ipc_msg' in the JSM API is
106
+ * NOTE: 96 is used so that the size of 'struct vpu_ipc_msg' in the JSM API is
107
107
* 128 bytes (multiple of 64 bytes, the cache line size).
108
108
*/
109
- #define VPU_DYNDBG_CMD_MAX_LEN 112
109
+ #define VPU_DYNDBG_CMD_MAX_LEN 96
110
110
111
111
/*
112
112
* Job format.
@@ -119,7 +119,7 @@ struct vpu_job_queue_entry {
119
119
u64 root_page_table_update_counter ; /**< Page tables update events counter */
120
120
u64 preemption_buffer_address ; /**< Address of the preemption buffer to use for this job */
121
121
u64 preemption_buffer_size ; /**< Size of the preemption buffer to use for this job */
122
- u8 reserved [VPU_JOB_RESERVED_BYTES ];
122
+ u8 reserved_0 [VPU_JOB_RESERVED_BYTES ];
123
123
};
124
124
125
125
/*
@@ -129,7 +129,7 @@ struct vpu_job_queue_header {
129
129
u32 engine_idx ;
130
130
u32 head ;
131
131
u32 tail ;
132
- u8 reserved [VPU_JOB_QUEUE_RESERVED_BYTES ];
132
+ u8 reserved_0 [VPU_JOB_QUEUE_RESERVED_BYTES ];
133
133
};
134
134
135
135
/*
@@ -319,6 +319,8 @@ enum vpu_ipc_msg_status { VPU_JSM_MSG_FREE, VPU_JSM_MSG_ALLOCATED };
319
319
struct vpu_ipc_msg_payload_engine_reset {
320
320
/* Engine to be reset. */
321
321
u32 engine_idx ;
322
+ /* Reserved */
323
+ u32 reserved_0 ;
322
324
};
323
325
324
326
struct vpu_ipc_msg_payload_engine_preempt {
@@ -336,6 +338,8 @@ struct vpu_ipc_msg_payload_engine_preempt {
336
338
struct vpu_ipc_msg_payload_register_db {
337
339
/* Index of the doorbell to register. */
338
340
u32 db_idx ;
341
+ /* Reserved */
342
+ u32 reserved_0 ;
339
343
/* Virtual address in Global GTT pointing to the start of job queue. */
340
344
u64 jobq_base ;
341
345
/* Size of the job queue in bytes. */
@@ -352,11 +356,15 @@ struct vpu_ipc_msg_payload_register_db {
352
356
struct vpu_ipc_msg_payload_unregister_db {
353
357
/* Index of the doorbell to unregister. */
354
358
u32 db_idx ;
359
+ /* Reserved */
360
+ u32 reserved_0 ;
355
361
};
356
362
357
363
struct vpu_ipc_msg_payload_query_engine_hb {
358
364
/* Engine to return heartbeat value. */
359
365
u32 engine_idx ;
366
+ /* Reserved */
367
+ u32 reserved_0 ;
360
368
};
361
369
362
370
struct vpu_ipc_msg_payload_power_level {
@@ -371,11 +379,15 @@ struct vpu_ipc_msg_payload_power_level {
371
379
* considered to be valid.
372
380
*/
373
381
u32 power_level ;
382
+ /* Reserved */
383
+ u32 reserved_0 ;
374
384
};
375
385
376
386
struct vpu_ipc_msg_payload_ssid_release {
377
387
/* Host sub-stream ID for the context to be released. */
378
388
u32 host_ssid ;
389
+ /* Reserved */
390
+ u32 reserved_0 ;
379
391
};
380
392
381
393
/**
@@ -425,9 +437,6 @@ struct vpu_jsm_metric_streamer_start {
425
437
u64 next_buffer_size ;
426
438
};
427
439
428
- static_assert (sizeof (struct vpu_jsm_metric_streamer_start ) % 8 == 0 ,
429
- "vpu_jsm_metric_streamer_start is misaligned" );
430
-
431
440
/**
432
441
* @brief Metric streamer stop command structure.
433
442
* @see VPU_JSM_MSG_METRIC_STREAMER_STOP
@@ -437,9 +446,6 @@ struct vpu_jsm_metric_streamer_stop {
437
446
u64 metric_group_mask ;
438
447
};
439
448
440
- static_assert (sizeof (struct vpu_jsm_metric_streamer_stop ) % 8 == 0 ,
441
- "vpu_jsm_metric_streamer_stop is misaligned" );
442
-
443
449
/**
444
450
* Provide VPU FW with buffers to write metric data.
445
451
* @see VPU_JSM_MSG_METRIC_STREAMER_UPDATE
@@ -471,9 +477,6 @@ struct vpu_jsm_metric_streamer_update {
471
477
u64 next_buffer_size ;
472
478
};
473
479
474
- static_assert (sizeof (struct vpu_jsm_metric_streamer_update ) % 8 == 0 ,
475
- "vpu_jsm_metric_streamer_update is misaligned" );
476
-
477
480
struct vpu_ipc_msg_payload_blob_deinit {
478
481
/* 64-bit unique ID for the blob to be de-initialized. */
479
482
u64 blob_id ;
@@ -491,7 +494,7 @@ struct vpu_ipc_msg_payload_job_done {
491
494
/* Host SSID */
492
495
u32 host_ssid ;
493
496
/* Zero Padding */
494
- u32 reserved ;
497
+ u32 reserved_0 ;
495
498
/* Command queue id */
496
499
u64 cmdq_id ;
497
500
};
@@ -500,7 +503,7 @@ struct vpu_jsm_engine_reset_context {
500
503
/* Host SSID */
501
504
u32 host_ssid ;
502
505
/* Zero Padding */
503
- u32 reserved ;
506
+ u32 reserved_0 ;
504
507
/* Command queue id */
505
508
u64 cmdq_id ;
506
509
/* Flags: 0: cause of hang; 1: collateral damage of reset */
@@ -533,6 +536,8 @@ struct vpu_ipc_msg_payload_engine_preempt_done {
533
536
struct vpu_ipc_msg_payload_register_db_done {
534
537
/* Index of the registered doorbell. */
535
538
u32 db_idx ;
539
+ /* Reserved */
540
+ u32 reserved_0 ;
536
541
};
537
542
538
543
/**
@@ -543,11 +548,15 @@ struct vpu_ipc_msg_payload_register_db_done {
543
548
struct vpu_ipc_msg_payload_unregister_db_done {
544
549
/* Index of the unregistered doorbell. */
545
550
u32 db_idx ;
551
+ /* Reserved */
552
+ u32 reserved_0 ;
546
553
};
547
554
548
555
struct vpu_ipc_msg_payload_query_engine_hb_done {
549
556
/* Engine returning heartbeat value. */
550
557
u32 engine_idx ;
558
+ /* Reserved */
559
+ u32 reserved_0 ;
551
560
/* Heartbeat value. */
552
561
u64 heartbeat ;
553
562
};
@@ -559,6 +568,8 @@ struct vpu_ipc_msg_payload_get_power_level_count_done {
559
568
* implementations.
560
569
*/
561
570
u32 power_level_count ;
571
+ /* Reserved */
572
+ u32 reserved_0 ;
562
573
/**
563
574
* Power consumption limit for each supported power level in
564
575
* [0-100%] range relative to power level 0.
@@ -577,7 +588,7 @@ struct vpu_ipc_msg_payload_hws_priority_band_setup {
577
588
* Grace period in 100ns units when preempting another priority band for
578
589
* this priority band
579
590
*/
580
- u64 grace_period [VPU_HWS_NUM_PRIORITY_BANDS ];
591
+ u32 grace_period [VPU_HWS_NUM_PRIORITY_BANDS ];
581
592
/*
582
593
* Default quantum in 100ns units for scheduling across processes
583
594
* within a priority band
@@ -593,6 +604,8 @@ struct vpu_ipc_msg_payload_hws_priority_band_setup {
593
604
* in situations when it's starved by the focus band.
594
605
*/
595
606
u32 normal_band_percentage ;
607
+ /* Reserved */
608
+ u32 reserved_0 ;
596
609
};
597
610
598
611
/* HWS create command queue request */
@@ -609,6 +622,8 @@ struct vpu_ipc_msg_payload_hws_create_cmdq {
609
622
u64 cmdq_base ;
610
623
/* Command queue size */
611
624
u32 cmdq_size ;
625
+ /* Reserved */
626
+ u32 reserved_0 ;
612
627
};
613
628
614
629
/* HWS create command queue response */
@@ -806,9 +821,6 @@ struct vpu_jsm_metric_streamer_done {
806
821
u64 bytes_written ;
807
822
};
808
823
809
- static_assert (sizeof (struct vpu_jsm_metric_streamer_done ) % 8 == 0 ,
810
- "vpu_jsm_metric_streamer_done is misaligned" );
811
-
812
824
/**
813
825
* Metric group description placed in the metric buffer after successful completion
814
826
* of the VPU_JSM_MSG_METRIC_STREAMER_INFO command. This is followed by one or more
@@ -848,16 +860,13 @@ struct vpu_jsm_metric_group_descriptor {
848
860
u32 name_string_size ;
849
861
/** Counter description string size, @see name_string_size */
850
862
u32 description_string_size ;
851
- u32 reserved_0 [ 2 ] ;
863
+ u64 reserved_0 ;
852
864
/**
853
865
* Right after this structure, the VPU writes name and description of
854
866
* the metric group.
855
867
*/
856
868
};
857
869
858
- static_assert (sizeof (struct vpu_jsm_metric_group_descriptor ) % 8 == 0 ,
859
- "vpu_jsm_metric_group_descriptor is misaligned" );
860
-
861
870
/**
862
871
* Metric counter description, placed in the buffer after vpu_jsm_metric_group_descriptor.
863
872
* @see VPU_JSM_MSG_METRIC_STREAMER_INFO
@@ -894,16 +903,13 @@ struct vpu_jsm_metric_counter_descriptor {
894
903
u32 component_string_size ;
895
904
/** Counter string size, @see name_string_size */
896
905
u32 units_string_size ;
897
- u32 reserved_0 [ 2 ] ;
906
+ u64 reserved_0 ;
898
907
/**
899
908
* Right after this structure, the VPU writes name, description
900
909
* component and unit strings.
901
910
*/
902
911
};
903
912
904
- static_assert (sizeof (struct vpu_jsm_metric_counter_descriptor ) % 8 == 0 ,
905
- "vpu_jsm_metric_counter_descriptor is misaligned" );
906
-
907
913
/**
908
914
* Payload for VPU_JSM_MSG_DYNDBG_CONTROL requests.
909
915
*
@@ -977,6 +983,8 @@ union vpu_ipc_msg_payload {
977
983
* to allow proper handling of VPU cache operations.
978
984
*/
979
985
struct vpu_jsm_msg {
986
+ /* Reserved */
987
+ u64 reserved_0 ;
980
988
/* Message type, see vpu_ipc_msg_type enum. */
981
989
u32 type ;
982
990
/* Buffer status, see vpu_ipc_msg_status enum. */
@@ -988,6 +996,7 @@ struct vpu_jsm_msg {
988
996
u32 request_id ;
989
997
/* Request return code set by the VPU, see VPU_JSM_STATUS_* defines. */
990
998
u32 result ;
999
+ u64 reserved_1 ;
991
1000
/* Message payload depending on message type, see vpu_ipc_msg_payload union. */
992
1001
union vpu_ipc_msg_payload payload ;
993
1002
};
0 commit comments