Skip to content

Commit 3773a57

Browse files
konradybciorobclark
authored andcommitted
drm/msm/a6xx: Improve a6xx_bus_clear_pending_transactions()
Unify the indentation and explain the cryptic 0xF value. Reviewed-by: Akhil P Oommen <[email protected]> Signed-off-by: Konrad Dybcio <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/542756/ Signed-off-by: Rob Clark <[email protected]>
1 parent 6e332c9 commit 3773a57

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/gpu/drm/msm/adreno/a6xx_gpu.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,17 +1705,18 @@ static void a6xx_llc_slices_init(struct platform_device *pdev,
17051705
a6xx_gpu->llc_mmio = ERR_PTR(-EINVAL);
17061706
}
17071707

1708-
#define GBIF_CLIENT_HALT_MASK BIT(0)
1709-
#define GBIF_ARB_HALT_MASK BIT(1)
1708+
#define GBIF_CLIENT_HALT_MASK BIT(0)
1709+
#define GBIF_ARB_HALT_MASK BIT(1)
1710+
#define VBIF_XIN_HALT_CTRL0_MASK GENMASK(3, 0)
17101711

17111712
void a6xx_bus_clear_pending_transactions(struct adreno_gpu *adreno_gpu, bool gx_off)
17121713
{
17131714
struct msm_gpu *gpu = &adreno_gpu->base;
17141715

17151716
if (!a6xx_has_gbif(adreno_gpu)) {
1716-
gpu_write(gpu, REG_A6XX_VBIF_XIN_HALT_CTRL0, 0xf);
1717+
gpu_write(gpu, REG_A6XX_VBIF_XIN_HALT_CTRL0, VBIF_XIN_HALT_CTRL0_MASK);
17171718
spin_until((gpu_read(gpu, REG_A6XX_VBIF_XIN_HALT_CTRL1) &
1718-
0xf) == 0xf);
1719+
(VBIF_XIN_HALT_CTRL0_MASK)) == VBIF_XIN_HALT_CTRL0_MASK);
17191720
gpu_write(gpu, REG_A6XX_VBIF_XIN_HALT_CTRL0, 0);
17201721

17211722
return;

0 commit comments

Comments
 (0)