diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2023-04-28 01:32:47 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:32:15 +0300 |
commit | 7b829f6dd638c2cb45c7710bc7cd1d0395ea9bc1 (patch) | |
tree | 448733b2e8e85fe1a8e4b6caa652c07eb16293a0 /drivers/gpu/drm/xe/xe_guc_ads.c | |
parent | 1bd4db39dee51161c48e8669e410fff0a0f69be1 (diff) | |
download | linux-7b829f6dd638c2cb45c7710bc7cd1d0395ea9bc1.tar.xz |
drm/xe/guc: Convert GuC registers to REG_FIELD/REG_BIT
Cleanup GuC register declarations by converting them to use REG_FIELD,
REG_BIT and REG_GENMASK. While converting, also reorder the bitfields
so they follow the convention of declaring the higher bits first.
v2:
- Drop unused HUC_LOADING_AGENT_VCR and DMA_ADDRESS_SPACE_GTT (Matt Roper)
- Simplify HUC_LOADING_AGENT_GUC define (Matt Roper)
Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com>
Link: https://lore.kernel.org/r/20230427223256.1432787-2-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_guc_ads.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_guc_ads.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c index fe1d5be1241e..d4fc2d357a78 100644 --- a/drivers/gpu/drm/xe/xe_guc_ads.c +++ b/drivers/gpu/drm/xe/xe_guc_ads.c @@ -561,8 +561,7 @@ static void guc_doorbell_init(struct xe_guc_ads *ads) ads_blob_write(ads, system_info.generic_gt_sysinfo[GUC_GENERIC_GT_SYSINFO_DOORBELL_COUNT_PER_SQIDI], - ((distdbreg >> GEN12_DOORBELLS_PER_SQIDI_SHIFT) - & GEN12_DOORBELLS_PER_SQIDI) + 1); + REG_FIELD_GET(GEN12_DOORBELLS_PER_SQIDI_MASK, distdbreg) + 1); } } |