]> Gentwo Git Trees - linux/.git/commit
drm/xe/xe_guc_ads: Consolidate guc_waklv_enable functions
authorJonathan Cavitt <jonathan.cavitt@intel.com>
Mon, 28 Jul 2025 19:48:06 +0000 (19:48 +0000)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 5 Aug 2025 14:59:38 +0000 (07:59 -0700)
commit7c9de25efa7677acd4feae905165571be05b6f29
treeccb0b31b86e9358db50f2aa71b9644d6221f32cf
parentbcddb12c027434fdf0491c1a05a3fe4fd2263d71
drm/xe/xe_guc_ads: Consolidate guc_waklv_enable functions

Presently, multiple versions of the guc_waklv_enable_.* function exist,
all with different numbers of dwords added to the klv_entry array.  This
is not extensible, and more duplicates of the function will need to be
created if it ever becomes necessary to support 3 or more dwords per wa
in the future.

Consolidate the disparate guc_waklv_enable functions into a single
guc_waklv_enable function that can take an arbitrary number of dword
values.

v2:
- Update length value properly (Shuicheng)

v3: (Harrison)
- Use data as a term instead of dwords or arr
- Reformat warning message to use hex values
- Eliminate need for kzalloc and klv_entry array
- Reorder function parameters to fix line wrapping

v4:
- Miscellaneous formatting fixes (Cavitt)

v5: (Harrison)
- s/data_range/data_len_dw
- Use data_len_dw to calculate size for xe_map_memcpy_to

Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Lucas De Marchi <lucas.demarch@intel.com>
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: John Harrison <john.c.harrison@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://lore.kernel.org/r/20250728194806.68176-2-jonathan.cavitt@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_guc_ads.c