diff options
| author | Karol Wachowski <karol.wachowski@linux.intel.com> | 2026-05-22 11:32:09 +0200 |
|---|---|---|
| committer | Karol Wachowski <karol.wachowski@linux.intel.com> | 2026-05-25 09:53:43 +0200 |
| commit | 0d8e8229f020b5960ee7d959958cb9c9d616351d (patch) | |
| tree | af1a25a4e8bcd79709ffa8b77de0cc31c0c8e41f | |
| parent | 213c92ac9717e4951f052a499f91c89302889813 (diff) | |
| download | linux-0d8e8229f020b5960ee7d959958cb9c9d616351d.tar.gz linux-0d8e8229f020b5960ee7d959958cb9c9d616351d.zip | |
accel/ivpu: Document why full JSM message size is always used
Firmware expects IPC messages to always carry the full fixed
sizeof(struct vpu_jsm_msg) size. Sending the full struct also
ensures unused fields are zeroed, which maintains compatibility
when existing commands are extended with new fields in the future.
Replace the misleading TODO comment with an explanation of the
actual intent.
Reviewed-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://patch.msgid.link/20260522093209.1169716-1-karol.wachowski@linux.intel.com
| -rw-r--r-- | drivers/accel/ivpu/ivpu_ipc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/accel/ivpu/ivpu_ipc.c b/drivers/accel/ivpu/ivpu_ipc.c index f47df092bb0d..9f1ba0c57442 100644 --- a/drivers/accel/ivpu/ivpu_ipc.c +++ b/drivers/accel/ivpu/ivpu_ipc.c @@ -97,7 +97,11 @@ ivpu_ipc_tx_prepare(struct ivpu_device *vdev, struct ivpu_ipc_consumer *cons, memset(tx_buf, 0, sizeof(*tx_buf)); tx_buf->ipc.data_addr = jsm_vpu_addr; - /* TODO: Set data_size to actual JSM message size, not union of all messages */ + /* + * Firmware expects full JSM message size regardless of the payload size. + * Unused fields must be zeroed to allow future extensions of existing + * commands without breaking compatibility. + */ tx_buf->ipc.data_size = sizeof(*req); tx_buf->ipc.channel = cons->channel; tx_buf->ipc.src_node = 0; |
