Skip to content

Commit 55e8a3f

Browse files
nirmoylucasdemarchi
authored andcommitted
drm/xe: Move LNL scheduling WA to xe_device.h
Move LNL scheduling WA to xe_device.h so this can be used in other places without needing keep the same comment about removal of this WA in the future. The WA, which flushes work or workqueues, is now wrapped in macros and can be reused wherever needed. Cc: Badal Nilawar <[email protected]> Cc: Matthew Auld <[email protected]> Cc: Matthew Brost <[email protected]> Cc: Himal Prasad Ghimiray <[email protected]> Cc: Lucas De Marchi <[email protected]> cc: [email protected] # v6.11+ Suggested-by: John Harrison <[email protected]> Signed-off-by: Nirmoy Das <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]> (cherry picked from commit cbe006a) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 4b468a9 commit 55e8a3f

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

drivers/gpu/drm/xe/xe_device.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,18 @@ void xe_device_declare_wedged(struct xe_device *xe);
178178
struct xe_file *xe_file_get(struct xe_file *xef);
179179
void xe_file_put(struct xe_file *xef);
180180

181+
/*
182+
* Occasionally it is seen that the G2H worker starts running after a delay of more than
183+
* a second even after being queued and activated by the Linux workqueue subsystem. This
184+
* leads to G2H timeout error. The root cause of issue lies with scheduling latency of
185+
* Lunarlake Hybrid CPU. Issue disappears if we disable Lunarlake atom cores from BIOS
186+
* and this is beyond xe kmd.
187+
*
188+
* TODO: Drop this change once workqueue scheduling delay issue is fixed on LNL Hybrid CPU.
189+
*/
190+
#define LNL_FLUSH_WORKQUEUE(wq__) \
191+
flush_workqueue(wq__)
192+
#define LNL_FLUSH_WORK(wrk__) \
193+
flush_work(wrk__)
194+
181195
#endif

drivers/gpu/drm/xe/xe_guc_ct.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -897,17 +897,8 @@ static int guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
897897

898898
ret = wait_event_timeout(ct->g2h_fence_wq, g2h_fence.done, HZ);
899899

900-
/*
901-
* Occasionally it is seen that the G2H worker starts running after a delay of more than
902-
* a second even after being queued and activated by the Linux workqueue subsystem. This
903-
* leads to G2H timeout error. The root cause of issue lies with scheduling latency of
904-
* Lunarlake Hybrid CPU. Issue dissappears if we disable Lunarlake atom cores from BIOS
905-
* and this is beyond xe kmd.
906-
*
907-
* TODO: Drop this change once workqueue scheduling delay issue is fixed on LNL Hybrid CPU.
908-
*/
909900
if (!ret) {
910-
flush_work(&ct->g2h_worker);
901+
LNL_FLUSH_WORK(&ct->g2h_worker);
911902
if (g2h_fence.done) {
912903
xe_gt_warn(gt, "G2H fence %u, action %04x, done\n",
913904
g2h_fence.seqno, action[0]);

0 commit comments

Comments
 (0)