Skip to content

Commit 159afd9

Browse files
committed
drm/xe/guc: Clear whole g2h_fence during initialization
The struct g2h_fence must be explicitly initializated using the g2h_fence_init() function to avoid trash values in its members, but we missed to update this helper function with the new member. To fix that and avoid any future mistakes, memset the whole struct first, then update remaining non-zero members. Fixes: 94de94d ("drm/xe/guc: Cancel ongoing H2G requests when stopping CT") Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Lukasz Laguna <lukasz.laguna@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://lore.kernel.org/r/20250723175639.206875-1-michal.wajdeczko@intel.com
1 parent 538b27a commit 159afd9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/gpu/drm/xe/xe_guc_ct.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,8 @@ struct g2h_fence {
9595

9696
static void g2h_fence_init(struct g2h_fence *g2h_fence, u32 *response_buffer)
9797
{
98+
memset(g2h_fence, 0, sizeof(*g2h_fence));
9899
g2h_fence->response_buffer = response_buffer;
99-
g2h_fence->response_data = 0;
100-
g2h_fence->response_len = 0;
101-
g2h_fence->fail = false;
102-
g2h_fence->retry = false;
103-
g2h_fence->done = false;
104100
g2h_fence->seqno = ~0x0;
105101
}
106102

0 commit comments

Comments
 (0)