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. As Alex asked in the review of v1, 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 keeps vi_reset_quirks[]. Its MacBookPro15,1 entries fix a module reload after S3, when VRAM is no longer at 0. The new test may not cover that case. The new test also catches the MacBookPro14,3, so its entry is now redundant. I can remove it in a follow-up if you prefer. 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. 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 | 10 ++++++++++ 3 files changed, 30 insertions(+) -- 2.55.0
