On Wed, Sep 2, 2026 at 9:08 AM Alex Deucher <[email protected]> wrote: > > On Wed, Sep 2, 2026 at 3:35 AM Christian König <[email protected]> > wrote: > > > > On 9/1/26 22:10, Alex Deucher wrote: > > > We need to disallow gfxoff if we touch GC MMIO registers. > > > At the moment we use KIQ or MES for TLB flushes so > > > no intended functional change. > > > > One reason to use the KIQ for TLB invalidation was to avoid > > enabling/disabling GFXOFF all the time. > > > > So this change here might work around GFXOFF issues, but that only hides > > the problems we have with GFXOFF and doesn't fix them. > > > > The same is true for all other generations. > > This was meant to be a short term fix which could more easily be > backported on the way to enabling SDMA later in the series to work > around issues like KIQ dying when doing invalidations. >
Regardless, we shouldn't be touching these registers while gfxoff is allowed so even with these patches applied, we'd still be using the KIQ and MES path if those engines are available. This just makes sure the fallback case is safe. Alex > Alex > > > > > Regards, > > Christian. > > > > > > > > Signed-off-by: Alex Deucher <[email protected]> > > > --- > > > drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 +++++++ > > > 1 file changed, 7 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c > > > b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c > > > index b46b87291c512..80f1cf1f21736 100644 > > > --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c > > > +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c > > > @@ -808,6 +808,10 @@ static void gmc_v9_0_flush_gpu_tlb(struct > > > amdgpu_device *adev, uint32_t vmid, > > > return; > > > } > > > > > > + /* disabllow gfxoff when we invalidate */ > > > + if (vmhub < AMDGPU_MMHUB0(0)) > > > + amdgpu_gfx_off_ctrl(adev, false); > > > + > > > /* This path is needed before KIQ/MES/GFXOFF are set up */ > > > spin_lock(&adev->gmc.invalidate_lock); > > > > > > @@ -873,6 +877,9 @@ static void gmc_v9_0_flush_gpu_tlb(struct > > > amdgpu_device *adev, uint32_t vmid, > > > > > > spin_unlock(&adev->gmc.invalidate_lock); > > > > > > + if (vmhub < AMDGPU_MMHUB0(0)) > > > + amdgpu_gfx_off_ctrl(adev, true); > > > + > > > if (j < adev->usec_timeout) > > > return; > > > > >
