On Thu, Jul 11, 2024 at 10:00:19AM +0000, Vladimir Lypak wrote: > Two fields of preempt_record which are used by CP aren't reset on > resume: "data" and "info". This is the reason behind faults which happen > when we try to switch to the ring that was active last before suspend. > In addition those faults can't be recovered from because we use suspend > and resume to do so (keeping values of those fields again). > > Fixes: b1fc2839d2f9 ("drm/msm: Implement preemption for A5XX targets") > Signed-off-by: Vladimir Lypak <vladimir.lypak@xxxxxxxxx> > --- > drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c > index f58dd564d122..67a8ef4adf6b 100644 > --- a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c > +++ b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c > @@ -204,6 +204,8 @@ void a5xx_preempt_hw_init(struct msm_gpu *gpu) > return; > > for (i = 0; i < gpu->nr_rings; i++) { > + a5xx_gpu->preempt[i]->data = 0; > + a5xx_gpu->preempt[i]->info = 0; I don't see this bit in the downstream driver. Just curious, do we need to clear both fields to avoid the gpu faults? -Akhil > a5xx_gpu->preempt[i]->wptr = 0; > a5xx_gpu->preempt[i]->rptr = 0; > a5xx_gpu->preempt[i]->rbase = gpu->rb[i]->iova; > -- > 2.45.2 >