mirror of
https://github.com/openwrt/openwrt.git
synced 2026-06-17 12:40:16 +04:00
8f638f9366
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.91 Remove upstreamed patches: - airoha/patches-6.12/017-v6.13-net-airoha-Implement-BQL-support.patch[1] - airoha/patches-6.12/138-v7.1-net-airoha-Add-missing-RX_CPU_IDX-configuration-in-a.patch[2] - airoha/patches-6.12/149-v7.1-net-airoha-Move-ndesc-initialization-at-end-of-airoh.patch[3] - generic/backport-6.12/940-v7.1-net-dsa-realtek-rtl8365mb-fix-mode-mask-calculation.patch[5] Manually rebased patches: - airoha/patches-6.12/048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol.patch[1] - ath79/patches-6.12/800-leds-add-reset-controller-based-driver.patch[4] - bcm27xx/patches-6.12/950-0122-bcmgenet-Better-coalescing-parameter-defaults.patch[6] We also backported four patches to fix perf tool regression: - generic/backport-6.12/216-01-revert-perf-cgroup-update-metric-leader-in-evlist__e.patch - generic/backport-6.12/216-02-revert-perf-tool_pmu-fix-aggregation-on-duration_tim.patch - generic/backport-6.12/216-03-revert-perf-python-add-parse_events-function.patch - generic/backport-6.12/216-04-revert-perf-tool_pmu-factor-tool-events-into-their-o.patch All other patches are automatically refreshed. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=ca24fcac1daaa5e8a667981d81986a3eb4b9fb04 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=f00037a99bc2332ef59dc85298b98b20af165904 [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=d36be272adda7f313e39dd118086955d993bf6a7 [4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=07d3611389ba7d78b80ea360a42ce32ab2521fbc [5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=3354d6c62fd4baa7b32cbd80cc5a8aa3f2bd0656 [6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=b84351dcc359667bc952131c1424b692ec83dce2 Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Link: https://github.com/openwrt/openwrt/pull/23444 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
90 lines
2.6 KiB
Diff
90 lines
2.6 KiB
Diff
From 2d693f4d08ff72e0ccc8a4d3bb3ba6e52f15c9c9 Mon Sep 17 00:00:00 2001
|
|
From: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
|
|
Date: Mon, 13 Jan 2025 17:29:27 +0100
|
|
Subject: [PATCH] drm/v3d: CPU job submissions shouldn't affect V3D GPU clock
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
We can avoid calling the v3d_clock_up_put and v3d_clock_up_get
|
|
when a job is submitted to a CPU queue. We don't need to change
|
|
the V3D core frequency to run a CPU job as it is executed on
|
|
the CPU. This way we avoid delaying timestamps CPU jobs by 4.5ms
|
|
that is the time that it takes the firmware to increase the V3D
|
|
core frequency.
|
|
|
|
Fixes: fe6a858096c1 ("drm/v3d: Correct clock settng calls to new APIs")
|
|
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
|
|
Reviewed-by: Maíra Canal <mcanal@igalia.com>
|
|
---
|
|
drivers/gpu/drm/v3d/v3d_submit.c | 28 +++++++++++++++++++++++-----
|
|
1 file changed, 23 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/v3d/v3d_submit.c
|
|
+++ b/drivers/gpu/drm/v3d/v3d_submit.c
|
|
@@ -125,9 +125,9 @@ v3d_lookup_bos(struct drm_device *dev,
|
|
}
|
|
|
|
static void
|
|
-v3d_job_free(struct kref *ref)
|
|
+v3d_job_free_common(struct v3d_job *job,
|
|
+ bool is_gpu_job)
|
|
{
|
|
- struct v3d_job *job = container_of(ref, struct v3d_job, refcount);
|
|
struct v3d_dev *v3d = job->v3d;
|
|
int i;
|
|
|
|
@@ -140,7 +140,8 @@ v3d_job_free(struct kref *ref)
|
|
dma_fence_put(job->irq_fence);
|
|
dma_fence_put(job->done_fence);
|
|
|
|
- v3d_clock_up_put(v3d);
|
|
+ if (is_gpu_job)
|
|
+ v3d_clock_up_put(v3d);
|
|
|
|
if (job->perfmon)
|
|
v3d_perfmon_put(job->perfmon);
|
|
@@ -149,6 +150,22 @@ v3d_job_free(struct kref *ref)
|
|
}
|
|
|
|
static void
|
|
+v3d_job_free(struct kref *ref)
|
|
+{
|
|
+ struct v3d_job *job = container_of(ref, struct v3d_job, refcount);
|
|
+
|
|
+ v3d_job_free_common(job, true);
|
|
+}
|
|
+
|
|
+static void
|
|
+v3d_cpu_job_free(struct kref *ref)
|
|
+{
|
|
+ struct v3d_job *job = container_of(ref, struct v3d_job, refcount);
|
|
+
|
|
+ v3d_job_free_common(job, false);
|
|
+}
|
|
+
|
|
+static void
|
|
v3d_render_job_free(struct kref *ref)
|
|
{
|
|
struct v3d_render_job *job = container_of(ref, struct v3d_render_job,
|
|
@@ -242,8 +259,9 @@ v3d_job_init(struct v3d_dev *v3d, struct
|
|
if (ret && ret != -ENOENT)
|
|
goto fail_deps;
|
|
}
|
|
+ if (queue != V3D_CPU)
|
|
+ v3d_clock_up_get(v3d);
|
|
|
|
- v3d_clock_up_get(v3d);
|
|
kref_init(&job->refcount);
|
|
|
|
return 0;
|
|
@@ -1355,7 +1373,7 @@ v3d_submit_cpu_ioctl(struct drm_device *
|
|
trace_v3d_submit_cpu_ioctl(&v3d->drm, cpu_job->job_type);
|
|
|
|
ret = v3d_job_init(v3d, file_priv, &cpu_job->base,
|
|
- v3d_job_free, 0, &se, V3D_CPU);
|
|
+ v3d_cpu_job_free, 0, &se, V3D_CPU);
|
|
if (ret) {
|
|
v3d_job_deallocate((void *)&cpu_job);
|
|
goto fail;
|