video: rockchip: mpp: Fix load info not clear issue

The default is to clear mpp load info during suspend, but suspend config may be turned off, resulting in load info not being cleared.

Change-Id: Ic930d3f691dc2f1694acfdc7ac1cbe4f022b4e62
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
This commit is contained in:
Yandong Lin
2025-08-22 15:39:01 +08:00
committed by Tao Huang
parent 6b47e41786
commit c79104d972

View File

@@ -335,6 +335,17 @@ static int mpp_show_device_load(struct seq_file *file, void *v)
if (!mpp)
continue;
if (mpp->load_info.load_time) {
s64 time_diff_us;
time_diff_us = ktime_us_delta(ktime_get(),
mpp->load_info.load_time);
if ((time_diff_us > 2 * srv->load_interval * 1000) ||
list_empty(&queue->session_attach))
mpp_dev_load_clear(mpp);
}
seq_printf(file, "%-25s load: %3d.%02d%% utilization: %3d.%02d%%\n",
dev_name(mpp->dev),
mpp->load_info.load, mpp->load_info.load_frac,