Skip to content

Commit

Permalink
Auto update to lts2023-ubuntu v6.6.36-240710T031018Z
Browse files Browse the repository at this point in the history
Source of patches:
eed53fa20 Kernel update 240710T031018Z
Signed-off-by: sys_oak <[email protected]>
  • Loading branch information
sys-oak committed Jul 10, 2024
1 parent ccbaae8 commit 4d453d5
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From 4a129142a97f831bbe99a8f9f94921db80d2d885 Mon Sep 17 00:00:00 2001
From: Junxiao Chang <[email protected]>
Date: Mon, 8 Jul 2024 08:25:39 +0800
Subject: [PATCH] drm/i915/guc: invalidate tlb only if guc submission is
enabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

xa_alloc for guc tlb_lookup is initialized in guc submission. For
some platform which guc submission is not enabled by default,
xa_alloc for guc tlb_lookup might crash kernel.

Signed-off-by: Krystian Garliński <[email protected]>
Signed-off-by: Junxiao Chang <[email protected]>
---
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index a84c717981d0..bd524fa3e2a4 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1983,7 +1983,7 @@ static int number_mlrc_guc_id(struct intel_guc *guc);
bool intel_guc_tlb_invalidation_is_available(struct intel_guc *guc)
{
return HAS_GUC_TLB_INVALIDATION(guc_to_gt(guc)->i915) &&
- intel_guc_is_ready(guc);
+ intel_guc_is_ready(guc) && guc_submission_initialized(guc);
}

static int init_tlb_lookup(struct intel_guc *guc)
@@ -4906,6 +4906,12 @@ static int guc_send_invalidate_tlb(struct intel_guc *guc,
if (!intel_gt_is_enabled(gt))
return -EINVAL;

+ /* If guc submission is not initialized, guc tlb lookup couldn't be
+ * accessed either.
+ */
+ if (!guc_submission_initialized(guc))
+ return -EINVAL;
+
init_waitqueue_head(&_wq.wq);

if (xa_alloc_cyclic_irq(&guc->tlb_lookup, &seqno, wq,
--
2.34.1

1 change: 1 addition & 0 deletions kernel-patches/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@
0001-drm-i915-mtl-Update-workaround-14018575942.drm
0001-drm-i915-Update-ADL-N-PCI-IDs.drm
0002-drm-i915-Don-t-apply-border-when-no-border-requested.drm
0001-drm-i915-guc-invalidate-tlb-only-if-guc-submission-is-.drm
#tsn
0001-net-phylink-Add-module_exit.tsn
0001-net-stmmac-Set-mac_managed_pm-flag-from-stmmac-to-reso.tsn
Expand Down

0 comments on commit 4d453d5

Please sign in to comment.