Skip to content

Commit e22aa8c

Browse files
nirmoygregkh
authored andcommitted
drm/xe: Move LNL scheduling WA to xe_device.h
[ Upstream commit 55e8a3f ] 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 <badal.nilawar@intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> cc: stable@vger.kernel.org # v6.11+ Suggested-by: John Harrison <John.C.Harrison@Intel.com> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029120117.449694-1-nirmoy.das@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> (cherry picked from commit cbe006a) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 85e4d92 commit e22aa8c

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

drivers/gpu/drm/xe/xe_device.h

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

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

drivers/gpu/drm/xe/xe_guc_ct.c

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

889889
ret = wait_event_timeout(ct->g2h_fence_wq, g2h_fence.done, HZ);
890890

891-
/*
892-
* Occasionally it is seen that the G2H worker starts running after a delay of more than
893-
* a second even after being queued and activated by the Linux workqueue subsystem. This
894-
* leads to G2H timeout error. The root cause of issue lies with scheduling latency of
895-
* Lunarlake Hybrid CPU. Issue dissappears if we disable Lunarlake atom cores from BIOS
896-
* and this is beyond xe kmd.
897-
*
898-
* TODO: Drop this change once workqueue scheduling delay issue is fixed on LNL Hybrid CPU.
899-
*/
900891
if (!ret) {
901-
flush_work(&ct->g2h_worker);
892+
LNL_FLUSH_WORK(&ct->g2h_worker);
902893
if (g2h_fence.done) {
903894
xe_gt_warn(gt, "G2H fence %u, action %04x, done\n",
904895
g2h_fence.seqno, action[0]);

0 commit comments

Comments
 (0)