diff options
author | Elena Satraitis <esatraitis@google.com> | 2022-04-08 10:25:29 -0500 |
---|---|---|
committer | Elena Satraitis <esatraitis@google.com> | 2022-04-22 09:24:54 -0500 |
commit | 4931c4c23c253c82ba2ac17b691851d60ce80f06 (patch) | |
tree | a30cf7bad9960d74c6c79b2a0a9ae9742fb64398 | |
parent | ade696187a5716132caa4c5c3b10702e3f267219 (diff) | |
download | lwis-4931c4c23c253c82ba2ac17b691851d60ce80f06.tar.gz |
LWIS: Add kthread pids to device info struct
Added pids of kthreads created for transactions
and periodic io so that Lyric will be to assign
task profiles to these kthreads.
Commit-Topic: lwis_kthread_cam_profile
Bug: 228632527
Test: GCA
Signed-off-by: Elena Satraitis <esatraitis@google.com>
Change-Id: Ie6eb626e0b5fee966263066be719c4386f95d3be
-rw-r--r-- | lwis_commands.h | 2 | ||||
-rw-r--r-- | lwis_ioctl.c | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lwis_commands.h b/lwis_commands.h index 7abc66f..365f43d 100644 --- a/lwis_commands.h +++ b/lwis_commands.h @@ -79,6 +79,8 @@ struct lwis_device_info { char name[LWIS_MAX_NAME_STRING_LEN]; struct lwis_clk_setting clks[LWIS_MAX_CLOCK_NUM]; int32_t num_clks; + int32_t transaction_worker_thread_pid; + int32_t periodic_io_thread_pid; }; enum lwis_dma_alloc_flags { diff --git a/lwis_ioctl.c b/lwis_ioctl.c index 82eb561..6573e52 100644 --- a/lwis_ioctl.c +++ b/lwis_ioctl.c @@ -159,7 +159,9 @@ static int ioctl_get_device_info(struct lwis_device *lwis_dev, struct lwis_devic int i; struct lwis_device_info k_info = { .id = lwis_dev->id, .type = lwis_dev->type, - .num_clks = 0 }; + .num_clks = 0, + .transaction_worker_thread_pid = -1, + .periodic_io_thread_pid = -1 }; strlcpy(k_info.name, lwis_dev->name, LWIS_MAX_NAME_STRING_LEN); if (lwis_dev->clocks) { @@ -172,6 +174,14 @@ static int ioctl_get_device_info(struct lwis_device *lwis_dev, struct lwis_devic } } + if (lwis_dev->transaction_worker_thread) { + k_info.transaction_worker_thread_pid = lwis_dev->transaction_worker_thread->pid; + } + + if (lwis_dev->periodic_io_worker_thread) { + k_info.periodic_io_thread_pid = lwis_dev->periodic_io_worker_thread->pid; + } + if (copy_to_user((void __user *)msg, &k_info, sizeof(k_info))) { dev_err(lwis_dev->dev, "Failed to copy device info to userspace\n"); return -EFAULT; |