linux-next: manual merge of the drm tree with the drm-fixes tree
Subsystems (3)
Mark Brown
maintainerHi all,
Today's linux-next merge of the drm tree got a conflict in:
drivers/gpu/drm/xe/xe_pagefault.c
between commit:
20fce5b34b21a ("drm/xe: Guard page-fault worker with runtime PM check")
from the drm-fixes tree and commit:
f2b4b3f814662 ("drm/xe: Chain page faults via queue-resident cache to avoid fault storms")
from the drm tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
drivers/gpu/drm/xe/xe_pagefault.c +0 -0
@@@ -14,9 -14,9 +14,10 @@@#include "xe_gt_types.h" #include "xe_gt_stats.h" #include "xe_hw_engine.h" +#include "xe_log.h" #include "xe_pagefault.h" #include "xe_pagefault_types.h" +#include "xe_pm.h"#include "xe_svm.h" #include "xe_trace_bo.h" #include "xe_vm.h" static void xe_pagefault_queue_work (struct work_struct *w) { -struct xe_pagefault_queue *pf_queue = -container_of (w,typeof (*pf_queue), worker); -struct xe_device *xe = pf_queue->xe; -struct xe_pagefault pf; +struct xe_pagefault_work *pf_work = +container_of (w,typeof (*pf_work), work); +struct xe_device *xe = pf_work->xe; +struct xe_pagefault_queue *pf_queue = &xe->usm.pf_queue; +struct xe_pagefault *pf; +ktime_t start =xe_gt_stats_ktime_get ();unsigned long threshold; +u64 cache_start =XE_PAGEFAULT_CACHE_START_INVALID , cache_end =0 ; +u32 cache_asid =0 ; +/* + * A live VM holds a PM reference, but a torn-down VM does not. + * Guard the entire worker loop to safely drain stale faults and + * prevent autosuspends from desyncing batched CT flushes. + */ +guard (xe_pm_runtime)(xe); +#define USM_QUEUE_MAX_RUNTIME_MS 20 threshold = jiffies +msecs_to_jiffies (USM_QUEUE_MAX_RUNTIME_MS );drm_dbg (&xe->drm,"xe_pagefault_entry_size=%d, total_num_eus=%d, pf_queue->size=%u" ,xe_pagefault_entry_size (), total_num_eus, pf_queue->size); + pf_queue->xe = xe;spin_lock_init (&pf_queue->lock); -INIT_WORK (&pf_queue->worker, xe_pagefault_queue_work); pf_queue->data =drmm_kzalloc (&xe->drm, pf_queue->size,GFP_KERNEL );if (!pf_queue->data)