On 7/13/26 20:27, 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.
IIRC we actually tried this before and reverted it because it caused quite a bit of trouble. The final solution was to use the semaphore to prevent GFXOFF from happening. 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 1fcc0594fd0a9..83b91c94a6623 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; >
