rockchip: backport rk3588 usb reset fixes
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
b83f5b92a2
commit
edca1d0019
@ -1196,7 +1196,7 @@ Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
|
||||
#include <net/tcx.h>
|
||||
|
||||
#define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \
|
||||
@@ -3811,6 +3812,8 @@ attach_type_to_prog_type(enum bpf_attach
|
||||
@@ -3827,6 +3828,8 @@ attach_type_to_prog_type(enum bpf_attach
|
||||
return BPF_PROG_TYPE_LSM;
|
||||
case BPF_TCX_INGRESS:
|
||||
case BPF_TCX_EGRESS:
|
||||
@ -1205,7 +1205,7 @@ Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
|
||||
return BPF_PROG_TYPE_SCHED_CLS;
|
||||
default:
|
||||
return BPF_PROG_TYPE_UNSPEC;
|
||||
@@ -3867,7 +3870,9 @@ static int bpf_prog_attach_check_attach_
|
||||
@@ -3883,7 +3886,9 @@ static int bpf_prog_attach_check_attach_
|
||||
return 0;
|
||||
case BPF_PROG_TYPE_SCHED_CLS:
|
||||
if (attach_type != BPF_TCX_INGRESS &&
|
||||
@ -1216,7 +1216,7 @@ Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
default:
|
||||
@@ -3950,7 +3955,11 @@ static int bpf_prog_attach(const union b
|
||||
@@ -3966,7 +3971,11 @@ static int bpf_prog_attach(const union b
|
||||
ret = cgroup_bpf_prog_attach(attr, ptype, prog);
|
||||
break;
|
||||
case BPF_PROG_TYPE_SCHED_CLS:
|
||||
@ -1229,7 +1229,7 @@ Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
@@ -4011,7 +4020,11 @@ static int bpf_prog_detach(const union b
|
||||
@@ -4027,7 +4036,11 @@ static int bpf_prog_detach(const union b
|
||||
ret = cgroup_bpf_prog_detach(attr, ptype);
|
||||
break;
|
||||
case BPF_PROG_TYPE_SCHED_CLS:
|
||||
@ -1242,7 +1242,7 @@ Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
@@ -4073,6 +4086,9 @@ static int bpf_prog_query(const union bp
|
||||
@@ -4089,6 +4102,9 @@ static int bpf_prog_query(const union bp
|
||||
case BPF_TCX_INGRESS:
|
||||
case BPF_TCX_EGRESS:
|
||||
return tcx_prog_query(attr, uattr);
|
||||
@ -1252,7 +1252,7 @@ Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -5054,7 +5070,11 @@ static int link_create(union bpf_attr *a
|
||||
@@ -5070,7 +5086,11 @@ static int link_create(union bpf_attr *a
|
||||
ret = bpf_xdp_link_attach(attr, prog);
|
||||
break;
|
||||
case BPF_PROG_TYPE_SCHED_CLS:
|
||||
|
@ -0,0 +1,44 @@
|
||||
From 8b9c12757f919157752646faf3821abf2b7d2a64 Mon Sep 17 00:00:00 2001
|
||||
From: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Date: Fri, 22 Nov 2024 15:30:05 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: add reset-names for combphy on rk3568
|
||||
|
||||
The reset-names of combphy are missing, add it.
|
||||
|
||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Fixes: fd3ac6e80497 ("dt-bindings: phy: rockchip: rk3588 has two reset lines")
|
||||
Link: https://lore.kernel.org/r/20241122073006.99309-1-amadeus@jmu.edu.cn
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 1 +
|
||||
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 2 ++
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
@@ -223,6 +223,7 @@
|
||||
assigned-clocks = <&pmucru CLK_PCIEPHY0_REF>;
|
||||
assigned-clock-rates = <100000000>;
|
||||
resets = <&cru SRST_PIPEPHY0>;
|
||||
+ reset-names = "phy";
|
||||
rockchip,pipe-grf = <&pipegrf>;
|
||||
rockchip,pipe-phy-grf = <&pipe_phy_grf0>;
|
||||
#phy-cells = <1>;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
@@ -1747,6 +1747,7 @@
|
||||
assigned-clocks = <&pmucru CLK_PCIEPHY1_REF>;
|
||||
assigned-clock-rates = <100000000>;
|
||||
resets = <&cru SRST_PIPEPHY1>;
|
||||
+ reset-names = "phy";
|
||||
rockchip,pipe-grf = <&pipegrf>;
|
||||
rockchip,pipe-phy-grf = <&pipe_phy_grf1>;
|
||||
#phy-cells = <1>;
|
||||
@@ -1763,6 +1764,7 @@
|
||||
assigned-clocks = <&pmucru CLK_PCIEPHY2_REF>;
|
||||
assigned-clock-rates = <100000000>;
|
||||
resets = <&cru SRST_PIPEPHY2>;
|
||||
+ reset-names = "phy";
|
||||
rockchip,pipe-grf = <&pipegrf>;
|
||||
rockchip,pipe-phy-grf = <&pipe_phy_grf2>;
|
||||
#phy-cells = <1>;
|
@ -0,0 +1,37 @@
|
||||
From fbcbffbac994aca1264e3c14da96ac9bfd90466e Mon Sep 17 00:00:00 2001
|
||||
From: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Date: Fri, 22 Nov 2024 15:30:06 +0800
|
||||
Subject: [PATCH] phy: rockchip: naneng-combphy: fix phy reset
|
||||
|
||||
Currently, the USB port via combophy on the RK3528/RK3588 SoC is broken.
|
||||
|
||||
usb usb8-port1: Cannot enable. Maybe the USB cable is bad?
|
||||
|
||||
This is due to the combphy of RK3528/RK3588 SoC has multiple resets, but
|
||||
only "phy resets" need assert and deassert, "apb resets" don't need.
|
||||
So change the driver to only match the phy resets, which is also what
|
||||
the vendor kernel does.
|
||||
|
||||
Fixes: 7160820d742a ("phy: rockchip: add naneng combo phy for RK3568")
|
||||
Cc: FUKAUMI Naoki <naoki@radxa.com>
|
||||
Cc: Michael Zimmermann <sigmaepsilon92@gmail.com>
|
||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
|
||||
Tested-by: FUKAUMI Naoki <naoki@radxa.com>
|
||||
Link: https://lore.kernel.org/r/20241122073006.99309-2-amadeus@jmu.edu.cn
|
||||
Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
||||
---
|
||||
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
|
||||
@@ -309,7 +309,7 @@ static int rockchip_combphy_parse_dt(str
|
||||
|
||||
priv->ext_refclk = device_property_present(dev, "rockchip,ext-refclk");
|
||||
|
||||
- priv->phy_rst = devm_reset_control_array_get_exclusive(dev);
|
||||
+ priv->phy_rst = devm_reset_control_get(dev, "phy");
|
||||
if (IS_ERR(priv->phy_rst))
|
||||
return dev_err_probe(dev, PTR_ERR(priv->phy_rst), "failed to get phy reset\n");
|
||||
|
@ -181,9 +181,9 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com
|
||||
return -ENOENT;
|
||||
+ }
|
||||
|
||||
job->entity = entity;
|
||||
job->s_fence = drm_sched_fence_alloc(entity, owner);
|
||||
@@ -671,7 +677,7 @@ void drm_sched_job_arm(struct drm_sched_
|
||||
/*
|
||||
* We don't know for sure how the user has allocated. Thus, zero the
|
||||
@@ -679,7 +685,7 @@ void drm_sched_job_arm(struct drm_sched_
|
||||
sched = entity->rq->sched;
|
||||
|
||||
job->sched = sched;
|
||||
@ -192,7 +192,7 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com
|
||||
job->id = atomic64_inc_return(&sched->job_id_count);
|
||||
|
||||
drm_sched_fence_init(job->s_fence, job->entity);
|
||||
@@ -888,10 +894,10 @@ drm_sched_select_entity(struct drm_gpu_s
|
||||
@@ -896,10 +902,10 @@ drm_sched_select_entity(struct drm_gpu_s
|
||||
return NULL;
|
||||
|
||||
/* Kernel run queue has higher priority than normal run queue*/
|
||||
@ -206,7 +206,7 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com
|
||||
if (entity)
|
||||
break;
|
||||
}
|
||||
@@ -1071,6 +1077,7 @@ static int drm_sched_main(void *param)
|
||||
@@ -1079,6 +1085,7 @@ static int drm_sched_main(void *param)
|
||||
*
|
||||
* @sched: scheduler instance
|
||||
* @ops: backend operations for this scheduler
|
||||
@ -214,7 +214,7 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com
|
||||
* @hw_submission: number of hw submissions that can be in flight
|
||||
* @hang_limit: number of times to allow a job to hang before dropping it
|
||||
* @timeout: timeout value in jiffies for the scheduler
|
||||
@@ -1084,11 +1091,12 @@ static int drm_sched_main(void *param)
|
||||
@@ -1092,11 +1099,12 @@ static int drm_sched_main(void *param)
|
||||
*/
|
||||
int drm_sched_init(struct drm_gpu_scheduler *sched,
|
||||
const struct drm_sched_backend_ops *ops,
|
||||
@ -228,7 +228,7 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com
|
||||
sched->ops = ops;
|
||||
sched->hw_submission_limit = hw_submission;
|
||||
sched->name = name;
|
||||
@@ -1097,8 +1105,36 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
@@ -1105,8 +1113,36 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
sched->hang_limit = hang_limit;
|
||||
sched->score = score ? score : &sched->_score;
|
||||
sched->dev = dev;
|
||||
@ -267,7 +267,7 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com
|
||||
|
||||
init_waitqueue_head(&sched->wake_up_worker);
|
||||
init_waitqueue_head(&sched->job_scheduled);
|
||||
@@ -1115,11 +1151,18 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
@@ -1123,11 +1159,18 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
ret = PTR_ERR(sched->thread);
|
||||
sched->thread = NULL;
|
||||
DRM_DEV_ERROR(sched->dev, "Failed to create scheduler for %s.\n", name);
|
||||
@ -287,7 +287,7 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com
|
||||
}
|
||||
EXPORT_SYMBOL(drm_sched_init);
|
||||
|
||||
@@ -1138,8 +1181,8 @@ void drm_sched_fini(struct drm_gpu_sched
|
||||
@@ -1146,8 +1189,8 @@ void drm_sched_fini(struct drm_gpu_sched
|
||||
if (sched->thread)
|
||||
kthread_stop(sched->thread);
|
||||
|
||||
@ -298,7 +298,7 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com
|
||||
|
||||
spin_lock(&rq->lock);
|
||||
list_for_each_entry(s_entity, &rq->entities, list)
|
||||
@@ -1150,7 +1193,7 @@ void drm_sched_fini(struct drm_gpu_sched
|
||||
@@ -1158,7 +1201,7 @@ void drm_sched_fini(struct drm_gpu_sched
|
||||
*/
|
||||
s_entity->stopped = true;
|
||||
spin_unlock(&rq->lock);
|
||||
@ -307,7 +307,7 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com
|
||||
}
|
||||
|
||||
/* Wakeup everyone stuck in drm_sched_entity_flush for this scheduler */
|
||||
@@ -1160,6 +1203,8 @@ void drm_sched_fini(struct drm_gpu_sched
|
||||
@@ -1168,6 +1211,8 @@ void drm_sched_fini(struct drm_gpu_sched
|
||||
cancel_delayed_work_sync(&sched->work_tdr);
|
||||
|
||||
sched->ready = false;
|
||||
@ -316,7 +316,7 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com
|
||||
}
|
||||
EXPORT_SYMBOL(drm_sched_fini);
|
||||
|
||||
@@ -1186,9 +1231,10 @@ void drm_sched_increase_karma(struct drm
|
||||
@@ -1194,9 +1239,10 @@ void drm_sched_increase_karma(struct drm
|
||||
if (bad->s_priority != DRM_SCHED_PRIORITY_KERNEL) {
|
||||
atomic_inc(&bad->karma);
|
||||
|
||||
|
@ -92,7 +92,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
@@ -4615,7 +4615,7 @@ bool amdgpu_device_has_job_running(struc
|
||||
@@ -4652,7 +4652,7 @@ bool amdgpu_device_has_job_running(struc
|
||||
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
|
||||
struct amdgpu_ring *ring = adev->rings[i];
|
||||
|
||||
@ -101,7 +101,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
continue;
|
||||
|
||||
spin_lock(&ring->sched.job_list_lock);
|
||||
@@ -4757,7 +4757,7 @@ int amdgpu_device_pre_asic_reset(struct
|
||||
@@ -4794,7 +4794,7 @@ int amdgpu_device_pre_asic_reset(struct
|
||||
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
|
||||
struct amdgpu_ring *ring = adev->rings[i];
|
||||
|
||||
@ -110,7 +110,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
continue;
|
||||
|
||||
/* Clear job fence from fence drv to avoid force_completion
|
||||
@@ -5297,7 +5297,7 @@ int amdgpu_device_gpu_recover(struct amd
|
||||
@@ -5338,7 +5338,7 @@ int amdgpu_device_gpu_recover(struct amd
|
||||
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
|
||||
struct amdgpu_ring *ring = tmp_adev->rings[i];
|
||||
|
||||
@ -119,7 +119,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
continue;
|
||||
|
||||
drm_sched_stop(&ring->sched, job ? &job->base : NULL);
|
||||
@@ -5372,7 +5372,7 @@ skip_hw_reset:
|
||||
@@ -5413,7 +5413,7 @@ skip_hw_reset:
|
||||
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
|
||||
struct amdgpu_ring *ring = tmp_adev->rings[i];
|
||||
|
||||
@ -128,7 +128,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
continue;
|
||||
|
||||
drm_sched_start(&ring->sched, true);
|
||||
@@ -5698,7 +5698,7 @@ pci_ers_result_t amdgpu_pci_error_detect
|
||||
@@ -5739,7 +5739,7 @@ pci_ers_result_t amdgpu_pci_error_detect
|
||||
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
|
||||
struct amdgpu_ring *ring = adev->rings[i];
|
||||
|
||||
@ -137,7 +137,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
continue;
|
||||
|
||||
drm_sched_stop(&ring->sched, NULL);
|
||||
@@ -5826,7 +5826,7 @@ void amdgpu_pci_resume(struct pci_dev *p
|
||||
@@ -5867,7 +5867,7 @@ void amdgpu_pci_resume(struct pci_dev *p
|
||||
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
|
||||
struct amdgpu_ring *ring = adev->rings[i];
|
||||
|
||||
@ -188,7 +188,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
}
|
||||
EXPORT_SYMBOL(drm_sched_start);
|
||||
|
||||
@@ -1252,3 +1252,38 @@ void drm_sched_increase_karma(struct drm
|
||||
@@ -1260,3 +1260,38 @@ void drm_sched_increase_karma(struct drm
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(drm_sched_increase_karma);
|
||||
|
@ -164,7 +164,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -874,7 +883,7 @@ static bool drm_sched_can_queue(struct d
|
||||
@@ -882,7 +891,7 @@ static bool drm_sched_can_queue(struct d
|
||||
void drm_sched_wakeup_if_can_queue(struct drm_gpu_scheduler *sched)
|
||||
{
|
||||
if (drm_sched_can_queue(sched))
|
||||
@ -173,7 +173,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -985,60 +994,41 @@ drm_sched_pick_best(struct drm_gpu_sched
|
||||
@@ -993,60 +1002,41 @@ drm_sched_pick_best(struct drm_gpu_sched
|
||||
EXPORT_SYMBOL(drm_sched_pick_best);
|
||||
|
||||
/**
|
||||
@ -256,7 +256,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
}
|
||||
|
||||
s_fence = sched_job->s_fence;
|
||||
@@ -1069,7 +1059,9 @@ static int drm_sched_main(void *param)
|
||||
@@ -1077,7 +1067,9 @@ static int drm_sched_main(void *param)
|
||||
|
||||
wake_up(&sched->job_scheduled);
|
||||
}
|
||||
@ -267,7 +267,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1077,6 +1069,8 @@ static int drm_sched_main(void *param)
|
||||
@@ -1085,6 +1077,8 @@ static int drm_sched_main(void *param)
|
||||
*
|
||||
* @sched: scheduler instance
|
||||
* @ops: backend operations for this scheduler
|
||||
@ -276,7 +276,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
* @num_rqs: number of runqueues, one for each priority, up to DRM_SCHED_PRIORITY_COUNT
|
||||
* @hw_submission: number of hw submissions that can be in flight
|
||||
* @hang_limit: number of times to allow a job to hang before dropping it
|
||||
@@ -1091,6 +1085,7 @@ static int drm_sched_main(void *param)
|
||||
@@ -1099,6 +1093,7 @@ static int drm_sched_main(void *param)
|
||||
*/
|
||||
int drm_sched_init(struct drm_gpu_scheduler *sched,
|
||||
const struct drm_sched_backend_ops *ops,
|
||||
@ -284,7 +284,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
u32 num_rqs, uint32_t hw_submission, unsigned int hang_limit,
|
||||
long timeout, struct workqueue_struct *timeout_wq,
|
||||
atomic_t *score, const char *name, struct device *dev)
|
||||
@@ -1121,14 +1116,22 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
@@ -1129,14 +1124,22 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
for (i = DRM_SCHED_PRIORITY_MIN; i < sched->num_rqs; i++) {
|
||||
sched->sched_rq[i] = kzalloc(sizeof(*sched->sched_rq[i]), GFP_KERNEL);
|
||||
if (!sched->sched_rq[i])
|
||||
@@ -1136,31 +1139,26 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
@@ -1144,31 +1147,26 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
drm_sched_rq_init(sched, sched->sched_rq[i]);
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
drm_err(sched, "%s: Failed to setup GPU scheduler--out of memory\n", __func__);
|
||||
return ret;
|
||||
}
|
||||
@@ -1178,8 +1176,7 @@ void drm_sched_fini(struct drm_gpu_sched
|
||||
@@ -1186,8 +1184,7 @@ void drm_sched_fini(struct drm_gpu_sched
|
||||
struct drm_sched_entity *s_entity;
|
||||
int i;
|
||||
|
||||
@ -359,7 +359,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
|
||||
for (i = sched->num_rqs - 1; i >= DRM_SCHED_PRIORITY_MIN; i--) {
|
||||
struct drm_sched_rq *rq = sched->sched_rq[i];
|
||||
@@ -1202,6 +1199,8 @@ void drm_sched_fini(struct drm_gpu_sched
|
||||
@@ -1210,6 +1207,8 @@ void drm_sched_fini(struct drm_gpu_sched
|
||||
/* Confirm no work left behind accessing device structures */
|
||||
cancel_delayed_work_sync(&sched->work_tdr);
|
||||
|
||||
@ -368,7 +368,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
sched->ready = false;
|
||||
kfree(sched->sched_rq);
|
||||
sched->sched_rq = NULL;
|
||||
@@ -1262,7 +1261,7 @@ EXPORT_SYMBOL(drm_sched_increase_karma);
|
||||
@@ -1270,7 +1269,7 @@ EXPORT_SYMBOL(drm_sched_increase_karma);
|
||||
*/
|
||||
bool drm_sched_wqueue_ready(struct drm_gpu_scheduler *sched)
|
||||
{
|
||||
@ -377,7 +377,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
}
|
||||
EXPORT_SYMBOL(drm_sched_wqueue_ready);
|
||||
|
||||
@@ -1273,7 +1272,8 @@ EXPORT_SYMBOL(drm_sched_wqueue_ready);
|
||||
@@ -1281,7 +1280,8 @@ EXPORT_SYMBOL(drm_sched_wqueue_ready);
|
||||
*/
|
||||
void drm_sched_wqueue_stop(struct drm_gpu_scheduler *sched)
|
||||
{
|
||||
@ -387,7 +387,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
}
|
||||
EXPORT_SYMBOL(drm_sched_wqueue_stop);
|
||||
|
||||
@@ -1284,6 +1284,7 @@ EXPORT_SYMBOL(drm_sched_wqueue_stop);
|
||||
@@ -1292,6 +1292,7 @@ EXPORT_SYMBOL(drm_sched_wqueue_stop);
|
||||
*/
|
||||
void drm_sched_wqueue_start(struct drm_gpu_scheduler *sched)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -943,8 +969,10 @@ drm_sched_get_cleanup_job(struct drm_gpu
|
||||
@@ -951,8 +977,10 @@ drm_sched_get_cleanup_job(struct drm_gpu
|
||||
typeof(*next), list);
|
||||
|
||||
if (next) {
|
||||
@ -90,7 +90,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
/* start TO timer for next job */
|
||||
drm_sched_start_timeout(sched);
|
||||
}
|
||||
@@ -994,7 +1022,40 @@ drm_sched_pick_best(struct drm_gpu_sched
|
||||
@@ -1002,7 +1030,40 @@ drm_sched_pick_best(struct drm_gpu_sched
|
||||
EXPORT_SYMBOL(drm_sched_pick_best);
|
||||
|
||||
/**
|
||||
@ -132,7 +132,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
*
|
||||
* @w: run job work
|
||||
*/
|
||||
@@ -1003,65 +1064,51 @@ static void drm_sched_run_job_work(struc
|
||||
@@ -1011,65 +1072,51 @@ static void drm_sched_run_job_work(struc
|
||||
struct drm_gpu_scheduler *sched =
|
||||
container_of(w, struct drm_gpu_scheduler, work_run_job);
|
||||
struct drm_sched_entity *entity;
|
||||
@ -228,7 +228,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1145,6 +1192,7 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
@@ -1153,6 +1200,7 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
atomic_set(&sched->hw_rq_count, 0);
|
||||
INIT_DELAYED_WORK(&sched->work_tdr, drm_sched_job_timedout);
|
||||
INIT_WORK(&sched->work_run_job, drm_sched_run_job_work);
|
||||
@ -236,7 +236,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
atomic_set(&sched->_score, 0);
|
||||
atomic64_set(&sched->job_id_count, 0);
|
||||
sched->pause_submit = false;
|
||||
@@ -1274,6 +1322,7 @@ void drm_sched_wqueue_stop(struct drm_gp
|
||||
@@ -1282,6 +1330,7 @@ void drm_sched_wqueue_stop(struct drm_gp
|
||||
{
|
||||
WRITE_ONCE(sched->pause_submit, true);
|
||||
cancel_work_sync(&sched->work_run_job);
|
||||
@ -244,7 +244,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
}
|
||||
EXPORT_SYMBOL(drm_sched_wqueue_stop);
|
||||
|
||||
@@ -1286,5 +1335,6 @@ void drm_sched_wqueue_start(struct drm_g
|
||||
@@ -1294,5 +1343,6 @@ void drm_sched_wqueue_start(struct drm_g
|
||||
{
|
||||
WRITE_ONCE(sched->pause_submit, false);
|
||||
queue_work(sched->submit_wq, &sched->work_run_job);
|
||||
|
@ -42,7 +42,7 @@ Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
|
||||
EXPORT_SYMBOL(drm_sched_entity_push_job);
|
||||
--- a/drivers/gpu/drm/scheduler/sched_main.c
|
||||
+++ b/drivers/gpu/drm/scheduler/sched_main.c
|
||||
@@ -917,12 +917,12 @@ static bool drm_sched_can_queue(struct d
|
||||
@@ -925,12 +925,12 @@ static bool drm_sched_can_queue(struct d
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -40,7 +40,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231110000123.72565-2-ltuik
|
||||
EXPORT_SYMBOL(drm_sched_entity_push_job);
|
||||
--- a/drivers/gpu/drm/scheduler/sched_main.c
|
||||
+++ b/drivers/gpu/drm/scheduler/sched_main.c
|
||||
@@ -922,10 +922,12 @@ static bool drm_sched_can_queue(struct d
|
||||
@@ -930,10 +930,12 @@ static bool drm_sched_can_queue(struct d
|
||||
*
|
||||
* Wake up the scheduler if we can queue jobs.
|
||||
*/
|
||||
|
@ -385,9 +385,9 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231110001638.71750-1-dakr@
|
||||
{
|
||||
if (!entity->rq) {
|
||||
/* This will most likely be followed by missing frames
|
||||
@@ -692,7 +798,13 @@ int drm_sched_job_init(struct drm_sched_
|
||||
return -ENOENT;
|
||||
}
|
||||
@@ -700,7 +806,13 @@ int drm_sched_job_init(struct drm_sched_
|
||||
*/
|
||||
memset(job, 0, sizeof(*job));
|
||||
|
||||
+ if (unlikely(!credits)) {
|
||||
+ pr_err("*ERROR* %s: credits cannot be 0!\n", __func__);
|
||||
@ -399,7 +399,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231110001638.71750-1-dakr@
|
||||
job->s_fence = drm_sched_fence_alloc(entity, owner);
|
||||
if (!job->s_fence)
|
||||
return -ENOMEM;
|
||||
@@ -905,20 +1017,9 @@ void drm_sched_job_cleanup(struct drm_sc
|
||||
@@ -913,20 +1025,9 @@ void drm_sched_job_cleanup(struct drm_sc
|
||||
EXPORT_SYMBOL(drm_sched_job_cleanup);
|
||||
|
||||
/**
|
||||
@ -421,7 +421,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231110001638.71750-1-dakr@
|
||||
*
|
||||
* Wake up the scheduler if we can queue jobs.
|
||||
*/
|
||||
@@ -926,7 +1027,7 @@ void drm_sched_wakeup(struct drm_gpu_sch
|
||||
@@ -934,7 +1035,7 @@ void drm_sched_wakeup(struct drm_gpu_sch
|
||||
struct drm_sched_entity *entity)
|
||||
{
|
||||
if (drm_sched_entity_is_ready(entity))
|
||||
@ -430,7 +430,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231110001638.71750-1-dakr@
|
||||
drm_sched_run_job_queue(sched);
|
||||
}
|
||||
|
||||
@@ -935,7 +1036,11 @@ void drm_sched_wakeup(struct drm_gpu_sch
|
||||
@@ -943,7 +1044,11 @@ void drm_sched_wakeup(struct drm_gpu_sch
|
||||
*
|
||||
* @sched: scheduler instance
|
||||
*
|
||||
@ -443,7 +443,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231110001638.71750-1-dakr@
|
||||
*/
|
||||
static struct drm_sched_entity *
|
||||
drm_sched_select_entity(struct drm_gpu_scheduler *sched)
|
||||
@@ -943,19 +1048,16 @@ drm_sched_select_entity(struct drm_gpu_s
|
||||
@@ -951,19 +1056,16 @@ drm_sched_select_entity(struct drm_gpu_s
|
||||
struct drm_sched_entity *entity;
|
||||
int i;
|
||||
|
||||
@ -466,7 +466,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231110001638.71750-1-dakr@
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1102,7 +1204,7 @@ static void drm_sched_run_job_work(struc
|
||||
@@ -1110,7 +1212,7 @@ static void drm_sched_run_job_work(struc
|
||||
|
||||
s_fence = sched_job->s_fence;
|
||||
|
||||
@ -475,7 +475,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231110001638.71750-1-dakr@
|
||||
drm_sched_job_begin(sched_job);
|
||||
|
||||
trace_drm_run_job(sched_job, entity);
|
||||
@@ -1137,7 +1239,7 @@ static void drm_sched_run_job_work(struc
|
||||
@@ -1145,7 +1247,7 @@ static void drm_sched_run_job_work(struc
|
||||
* @submit_wq: workqueue to use for submission. If NULL, an ordered wq is
|
||||
* allocated and used
|
||||
* @num_rqs: number of runqueues, one for each priority, up to DRM_SCHED_PRIORITY_COUNT
|
||||
@ -484,7 +484,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231110001638.71750-1-dakr@
|
||||
* @hang_limit: number of times to allow a job to hang before dropping it
|
||||
* @timeout: timeout value in jiffies for the scheduler
|
||||
* @timeout_wq: workqueue to use for timeout work. If NULL, the system_wq is
|
||||
@@ -1151,14 +1253,14 @@ static void drm_sched_run_job_work(struc
|
||||
@@ -1159,14 +1261,14 @@ static void drm_sched_run_job_work(struc
|
||||
int drm_sched_init(struct drm_gpu_scheduler *sched,
|
||||
const struct drm_sched_backend_ops *ops,
|
||||
struct workqueue_struct *submit_wq,
|
||||
@ -501,7 +501,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231110001638.71750-1-dakr@
|
||||
sched->name = name;
|
||||
sched->timeout = timeout;
|
||||
sched->timeout_wq = timeout_wq ? : system_wq;
|
||||
@@ -1207,7 +1309,7 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
@@ -1215,7 +1317,7 @@ int drm_sched_init(struct drm_gpu_schedu
|
||||
init_waitqueue_head(&sched->job_scheduled);
|
||||
INIT_LIST_HEAD(&sched->pending_list);
|
||||
spin_lock_init(&sched->job_list_lock);
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <linux/tcp.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
@@ -5373,6 +5374,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5379,6 +5380,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
int jumbo_max, region, rc;
|
||||
enum mac_version chipset;
|
||||
struct net_device *dev;
|
||||
@ -16,7 +16,7 @@
|
||||
u32 txconfig;
|
||||
u16 xid;
|
||||
|
||||
@@ -5380,6 +5382,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5386,6 +5388,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -11,7 +11,7 @@ Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
@@ -266,6 +266,10 @@
|
||||
@@ -267,6 +267,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user