AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com
Cc: christian.koenig@amd.com, Maciej Kucharek <qchcio@gmail.com>,
	stable@vger.kernel.org, Maciej Kucharek <qchcio@gmail.com>
Subject: Re: [PATCH v3 2/3] drm/amdgpu: reset CIK ASIC on Apple boards with VRAM at 0
Date: Sun, 25 Oct 2026 18:14:40 +0100	[thread overview]
Message-ID: <0lACxgrfQz2H5tv1x9Ohww@gmail.com> (raw)
In-Reply-To: <20261015181837.41690-3-qchcio@gmail.com>

On 2026. október 15., csütörtök 20:18:36 közép-európai téli idő Maciej 
Kucharek wrote:
> 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.  The SI fix resets and
> posts the ASIC at load, so the driver uses the VBIOS layout from the
> start:
> 
>   "drm/amdgpu: reset SI ASIC on MacBookPros with VRAM at 0"
> 
> No MacBookPro has a CIK GPU, and no affected CIK board is known.  Add
> the same test to cik_need_reset_on_init(), so that SI, CIK and VI
> handle this firmware layout in the same way. 

Just a side note: some old iMacs have a Bonaire GPU, which is CI.
Not sure if those boards are affected or not, but it definitely won't hurt.

> gmc_v7_0 reads
> MC_VM_FB_LOCATION once at init and does not reprogram it.  A CIK board
> with VRAM at 0 therefore has the same problem as the SI boards.
> 
> After the reset, FB_BASE is not 0, so the new test does not fire again
> on a module reload.
> 
> Only compile-tested.
> 
> Suggested-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Maciej Kucharek <qchcio@gmail.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/cik.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c
> b/drivers/gpu/drm/amd/amdgpu/cik.c index d29991a4a..e1029239b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/cik.c
> +++ b/drivers/gpu/drm/amd/amdgpu/cik.c
> @@ -1927,6 +1927,16 @@ static bool cik_need_reset_on_init(struct
> amdgpu_device *adev) {
>  	u32 clock_cntl, pc;
> 
> +	/*
> +	 * MacBookPros with switchable graphics put VRAM at 0 when the iGPU
> +	 * is enabled.  Any later post (S3 resume, GPU reset) moves it back 
to
> +	 * the vbios default, so reset and post on load to start with the
> +	 * vbios layout.
> +	 */
> +	if (adev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE &&
> +	    !(RREG32(mmMC_VM_FB_LOCATION) & 
MC_VM_FB_LOCATION__FB_BASE_MASK))
> +		return true;
> +
>  	if (adev->flags & AMD_IS_APU)
>  		return false;





  reply	other threads:[~2026-10-25 17:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 19:20 [PATCH] drm/amdgpu: reset SI ASIC on MacBookPros with VRAM at 0 Maciej Kucharek
2026-10-14 21:39 ` Deucher, Alexander
2026-10-15  9:57   ` [PATCH v2 0/3] drm/amdgpu: reset SI/CIK/VI ASIC on Apple boards " Maciej Kucharek
2026-10-15  9:57     ` [PATCH v2 1/3] drm/amdgpu: reset SI ASIC on MacBookPros " Maciej Kucharek
2026-10-22  7:36       ` Brad Drury
2026-10-25 17:14         ` Timur Kristóf
2026-10-15  9:57     ` [PATCH v2 2/3] drm/amdgpu: reset CIK ASIC on Apple boards " Maciej Kucharek
2026-10-15  9:57     ` [PATCH v2 3/3] drm/amdgpu: reset VI " Maciej Kucharek
2026-10-15 13:26       ` Alex Deucher
2026-10-15 18:18         ` [PATCH v3 0/3] drm/amdgpu: reset SI/CIK/VI " Maciej Kucharek
2026-10-15 18:18           ` [PATCH v3 1/3] drm/amdgpu: reset SI ASIC on MacBookPros " Maciej Kucharek
2026-10-15 18:18           ` [PATCH v3 2/3] drm/amdgpu: reset CIK ASIC on Apple boards " Maciej Kucharek
2026-10-25 17:14             ` Timur Kristóf [this message]
2026-10-15 18:18           ` [PATCH v3 3/3] drm/amdgpu: reset VI " Maciej Kucharek
2026-10-17  0:09             ` Francisco Beltrán Millalén
2026-10-15 19:01         ` [PATCH v2 " Alex Deucher
2026-10-17 14:26       ` Sergey Armodin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0lACxgrfQz2H5tv1x9Ohww@gmail.com \
    --to=timur.kristof@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=qchcio@gmail.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox