From: Karol Wachowski <karol.wachowski@linux.intel.com>
To: Lizhi Hou <lizhi.hou@amd.com>, dri-devel@lists.freedesktop.org
Cc: oded.gabbay@gmail.com, jeff.hugo@oss.qualcomm.com,
maciej.falkowski@linux.intel.com,
Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Subject: Re: [PATCH] accel/ivpu: Refactor priority_bands_show for readability
Date: Thu, 18 Sep 2025 08:20:47 +0200 [thread overview]
Message-ID: <ca4c2a8c-4e1f-4a67-824b-58539bbda0c1@linux.intel.com> (raw)
In-Reply-To: <4d8257fb-ea52-3d92-d240-7f072bdddd26@amd.com>
Applied to drm-misc-next
On 9/15/2025 10:38 PM, Lizhi Hou wrote:
> Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
>
> On 9/15/25 03:34, Karol Wachowski wrote:
>> From: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
>>
>> Reduce code duplication and improve the overall readability of the
>> debugfs
>> output for job scheduling priority bands.
>>
>> Additionally fix clang-tidy warning about missing default case in the
>> switch statement.
>>
>> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
>> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
>> ---
>> drivers/accel/ivpu/ivpu_debugfs.c | 38 ++++++++++++-------------------
>> 1 file changed, 14 insertions(+), 24 deletions(-)
>>
>> diff --git a/drivers/accel/ivpu/ivpu_debugfs.c
>> b/drivers/accel/ivpu/ivpu_debugfs.c
>> index cd24ccd20ba6..3bd85ee6c26b 100644
>> --- a/drivers/accel/ivpu/ivpu_debugfs.c
>> +++ b/drivers/accel/ivpu/ivpu_debugfs.c
>> @@ -398,35 +398,25 @@ static int dct_active_set(void *data, u64
>> active_percent)
>> DEFINE_DEBUGFS_ATTRIBUTE(ivpu_dct_fops, dct_active_get,
>> dct_active_set, "%llu\n");
>> +static void print_priority_band(struct seq_file *s, struct
>> ivpu_hw_info *hw,
>> + int band, const char *name)
>> +{
>> + seq_printf(s, "%-9s: grace_period %9u process_grace_period %9u
>> process_quantum %9u\n",
>> + name,
>> + hw->hws.grace_period[band],
>> + hw->hws.process_grace_period[band],
>> + hw->hws.process_quantum[band]);
>> +}
>> +
>> static int priority_bands_show(struct seq_file *s, void *v)
>> {
>> struct ivpu_device *vdev = s->private;
>> struct ivpu_hw_info *hw = vdev->hw;
>> - for (int band = VPU_JOB_SCHEDULING_PRIORITY_BAND_IDLE;
>> - band < VPU_JOB_SCHEDULING_PRIORITY_BAND_COUNT; band++) {
>> - switch (band) {
>> - case VPU_JOB_SCHEDULING_PRIORITY_BAND_IDLE:
>> - seq_puts(s, "Idle: ");
>> - break;
>> -
>> - case VPU_JOB_SCHEDULING_PRIORITY_BAND_NORMAL:
>> - seq_puts(s, "Normal: ");
>> - break;
>> -
>> - case VPU_JOB_SCHEDULING_PRIORITY_BAND_FOCUS:
>> - seq_puts(s, "Focus: ");
>> - break;
>> -
>> - case VPU_JOB_SCHEDULING_PRIORITY_BAND_REALTIME:
>> - seq_puts(s, "Realtime: ");
>> - break;
>> - }
>> -
>> - seq_printf(s, "grace_period %9u process_grace_period %9u
>> process_quantum %9u\n",
>> - hw->hws.grace_period[band],
>> hw->hws.process_grace_period[band],
>> - hw->hws.process_quantum[band]);
>> - }
>> + print_priority_band(s, hw,
>> VPU_JOB_SCHEDULING_PRIORITY_BAND_IDLE, "Idle");
>> + print_priority_band(s, hw,
>> VPU_JOB_SCHEDULING_PRIORITY_BAND_NORMAL, "Normal");
>> + print_priority_band(s, hw,
>> VPU_JOB_SCHEDULING_PRIORITY_BAND_FOCUS, "Focus");
>> + print_priority_band(s, hw,
>> VPU_JOB_SCHEDULING_PRIORITY_BAND_REALTIME, "Realtime");
>> return 0;
>> }
prev parent reply other threads:[~2025-09-18 6:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 10:34 [PATCH] accel/ivpu: Refactor priority_bands_show for readability Karol Wachowski
2025-09-15 20:38 ` Lizhi Hou
2025-09-18 6:20 ` Karol Wachowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ca4c2a8c-4e1f-4a67-824b-58539bbda0c1@linux.intel.com \
--to=karol.wachowski@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=lizhi.hou@amd.com \
--cc=maciej.falkowski@linux.intel.com \
--cc=oded.gabbay@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.