On MacBookPros with switchable graphics, the firmware puts VRAM at MC address 0 when the iGPU is enabled. A later post (S3 resume, GPU reset) moves VRAM back to the VBIOS default, and the driver keeps using the old layout. This series resets and posts the ASIC at driver load on Apple boards with VRAM at 0. It adds the same test to si.c, cik.c and vi.c.
Testing: - Patch 1 (SI) is tested on a MacBookPro11,5: 4 of 4 S3 cycles resume. - Patches 2 (CIK) and 3 (VI) are only compile-tested. - No MacBookPro has a CIK GPU, so patch 2 is for consistency only. - Patch 3 also resets other Polaris MacBookPros with VRAM at 0, for example the MacBookPro13,3. This is not tested. - The series does not change Vega or Navi. Patch 3 removes vi_reset_quirks[]. Andre, Frederick and Francisco, you added its entries for the MacBookPro15,1 and 14,3. If you can, please test patch 3 on those machines: - MacBookPro14,3: S3 resume works. - MacBookPro15,1: S3 resume works, and a module reload after S3 works. Changes in v3: - VI: remove vi_reset_quirks[], because the new test replaces it (Alex). Changes in v2: - Add the same test to cik.c and vi.c (Alex). - SI commit message: cite only the MacBookPro14,3 quirk as the same cause. The MacBookPro15,1 quirk fixes a different failure. - Code comment: add the iGPU condition. v2: https://lore.kernel.org/amd-gfx/[email protected]/ v1: https://lore.kernel.org/amd-gfx/[email protected]/ Maciej Kucharek (3): drm/amdgpu: reset SI ASIC on MacBookPros with VRAM at 0 drm/amdgpu: reset CIK ASIC on Apple boards with VRAM at 0 drm/amdgpu: reset VI ASIC on Apple boards with VRAM at 0 drivers/gpu/drm/amd/amdgpu/cik.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/si.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/vi.c | 29 +++++++++-------------------- 3 files changed, 29 insertions(+), 20 deletions(-) -- 2.55.0
