Skip to content

Commit a242ef4

Browse files
akhilpo-qcomRob Clark
authored andcommitted
drm/msm/a6xx: Fix hangcheck for IFPC
From the hangcheck handler, KMD checks a few registers in GX domain to see if the GPU made any progress. But it cannot access those registers when IFPC is enabled. Since HW based hang detection is pretty decent, lets rely on it instead of these registers when IFPC is enabled. Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/673378/ Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
1 parent 365075b commit a242ef4

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2420,13 +2420,24 @@ static uint32_t a6xx_get_rptr(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
24202420

24212421
static bool a6xx_progress(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
24222422
{
2423-
struct msm_cp_state cp_state = {
2423+
struct msm_cp_state cp_state;
2424+
bool progress;
2425+
2426+
/*
2427+
* With IFPC, KMD doesn't know whether GX power domain is collapsed
2428+
* or not. So, we can't blindly read the below registers in GX domain.
2429+
* Lets trust the hang detection in HW and lie to the caller that
2430+
* there was progress.
2431+
*/
2432+
if (to_adreno_gpu(gpu)->info->quirks & ADRENO_QUIRK_IFPC)
2433+
return true;
2434+
2435+
cp_state = (struct msm_cp_state) {
24242436
.ib1_base = gpu_read64(gpu, REG_A6XX_CP_IB1_BASE),
24252437
.ib2_base = gpu_read64(gpu, REG_A6XX_CP_IB2_BASE),
24262438
.ib1_rem = gpu_read(gpu, REG_A6XX_CP_IB1_REM_SIZE),
24272439
.ib2_rem = gpu_read(gpu, REG_A6XX_CP_IB2_REM_SIZE),
24282440
};
2429-
bool progress;
24302441

24312442
/*
24322443
* Adjust the remaining data to account for what has already been

0 commit comments

Comments
 (0)