mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 02:46:06 +00:00
03a86c24ae
Currently we can call fence_fini() twice if something goes wrong when sending the GuC CT for the tlb request, since we signal the fence and return an error, leading to the caller also calling fini() on the error path in the case of stack version of the flow, which leads to an extra rpm put() which might later cause device to enter suspend when it shouldn't. It looks like we can just drop the fini() call since the fence signaller side will already call this for us. There are known mysterious splats with device going to sleep even with an rpm ref, and this could be one candidate. v2 (Matt B): - Prefer warning if we detect double fini() Fixes: f002702290fc ("drm/xe: Hold a PM ref when GT TLB invalidations are inflight") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241009084808.204432-3-matthew.auld@intel.com (cherry picked from commit cfcbc0520d5055825f0647ab922b655688605183) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_GT_TLB_INVALIDATION_H_
|
|
#define _XE_GT_TLB_INVALIDATION_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include "xe_gt_tlb_invalidation_types.h"
|
|
|
|
struct xe_gt;
|
|
struct xe_guc;
|
|
struct xe_vma;
|
|
|
|
int xe_gt_tlb_invalidation_init(struct xe_gt *gt);
|
|
void xe_gt_tlb_invalidation_reset(struct xe_gt *gt);
|
|
int xe_gt_tlb_invalidation_ggtt(struct xe_gt *gt);
|
|
int xe_gt_tlb_invalidation_vma(struct xe_gt *gt,
|
|
struct xe_gt_tlb_invalidation_fence *fence,
|
|
struct xe_vma *vma);
|
|
int xe_gt_tlb_invalidation_range(struct xe_gt *gt,
|
|
struct xe_gt_tlb_invalidation_fence *fence,
|
|
u64 start, u64 end, u32 asid);
|
|
int xe_guc_tlb_invalidation_done_handler(struct xe_guc *guc, u32 *msg, u32 len);
|
|
|
|
void xe_gt_tlb_invalidation_fence_init(struct xe_gt *gt,
|
|
struct xe_gt_tlb_invalidation_fence *fence,
|
|
bool stack);
|
|
|
|
static inline void
|
|
xe_gt_tlb_invalidation_fence_wait(struct xe_gt_tlb_invalidation_fence *fence)
|
|
{
|
|
dma_fence_wait(&fence->base, false);
|
|
}
|
|
|
|
#endif /* _XE_GT_TLB_INVALIDATION_ */
|