mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: extend MacBook VRAM-at-0 workaround to VERDE
@ 2026-09-25  7:24 Ayhan Çiçek
  2026-09-25 13:18 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Ayhan Çiçek @ 2026-09-25  7:24 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig
  Cc: amd-gfx, dri-devel, linux-kernel, airlied, simona, Ayhan Çiçek

The existing MacBook workaround reserves VRAM at address 0 for
Polaris ASICs when the iGPU is enabled. This prevents cursor
allocations from landing at address 0.

A MacBookPro11,5 with Radeon R9 M370X (VERDE) hits the same
failure mode. Hardware cursor updates repeatedly log
"DC: Cursor address is 0!" followed by
"DC failed to set cursor attributes".

Extend the existing workaround to CHIP_VERDE. With this change,
hardware cursor operation is stable, the cursor errors remain at
zero during repeated cursor movement, and cursor disappearance
and flicker are no longer observed.

Signed-off-by: Ayhan Çiçek <ayhancicek@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index 1bf2a42fa..9e7f9cc2b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -1086,6 +1086,7 @@ void amdgpu_gmc_init_vga_resv_regions(struct amdgpu_device *adev)
 	case CHIP_RENOIR:
 		adev->mman.keep_stolen_vga_memory = true;
 		break;
+	case CHIP_VERDE:
 	case CHIP_POLARIS10:
 	case CHIP_POLARIS11:
 	case CHIP_POLARIS12:
-- 
2.55.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amdgpu: extend MacBook VRAM-at-0 workaround to VERDE
  2026-09-25  7:24 [PATCH] drm/amdgpu: extend MacBook VRAM-at-0 workaround to VERDE Ayhan Çiçek
@ 2026-09-25 13:18 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2026-09-25 13:18 UTC (permalink / raw)
  To: Ayhan Çiçek
  Cc: alexander.deucher, christian.koenig, amd-gfx, dri-devel,
	linux-kernel, airlied, simona

[-- Attachment #1: Type: text/plain, Size: 1555 bytes --]

On Fri, Sep 25, 2026 at 3:46 AM Ayhan Çiçek <ayhancicek@gmail.com> wrote:
>
> The existing MacBook workaround reserves VRAM at address 0 for
> Polaris ASICs when the iGPU is enabled. This prevents cursor
> allocations from landing at address 0.
>
> A MacBookPro11,5 with Radeon R9 M370X (VERDE) hits the same
> failure mode. Hardware cursor updates repeatedly log
> "DC: Cursor address is 0!" followed by
> "DC failed to set cursor attributes".
>
> Extend the existing workaround to CHIP_VERDE. With this change,
> hardware cursor operation is stable, the cursor errors remain at
> zero during repeated cursor movement, and cursor disappearance
> and flicker are no longer observed.

Sounds like this may be consistent for most or all Macs.  How about
something like the attached patch?

Alex

>
> Signed-off-by: Ayhan Çiçek <ayhancicek@gmail.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index 1bf2a42fa..9e7f9cc2b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -1086,6 +1086,7 @@ void amdgpu_gmc_init_vga_resv_regions(struct amdgpu_device *adev)
>         case CHIP_RENOIR:
>                 adev->mman.keep_stolen_vga_memory = true;
>                 break;
> +       case CHIP_VERDE:
>         case CHIP_POLARIS10:
>         case CHIP_POLARIS11:
>         case CHIP_POLARIS12:
> --
> 2.55.0
>

[-- Attachment #2: 0001-drm-amdgpu-make-Mac-FB-workaround-generic.patch --]
[-- Type: text/x-patch, Size: 1805 bytes --]

From a92384b77af3818310b471c9ef0484a1a64e8166 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Fri, 25 Sep 2026 09:16:26 -0400
Subject: [PATCH] drm/amdgpu: make Mac FB workaround generic

Rather than adding a case of every chip where this is seen
just check if the FB is at 0 and the ssid is apple.  This
should cover all chips which fall into this case.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index 1bf2a42fa63ce..92b3221590fb6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -1086,20 +1086,17 @@ void amdgpu_gmc_init_vga_resv_regions(struct amdgpu_device *adev)
 	case CHIP_RENOIR:
 		adev->mman.keep_stolen_vga_memory = true;
 		break;
-	case CHIP_POLARIS10:
-	case CHIP_POLARIS11:
-	case CHIP_POLARIS12:
-		/* MacBookPros with switchable graphics put VRAM at 0 when
-		 * the iGPU is enabled which results in cursor issues if
-		 * the cursor ends up at 0.  Reserve vram at 0 in that case.
-		 */
-		if (adev->gmc.vram_start == 0)
-			adev->mman.keep_stolen_vga_memory = true;
-		break;
 	default:
 		adev->mman.keep_stolen_vga_memory = false;
 		break;
 	}
+	/* MacBookPros with switchable graphics put VRAM at 0 when
+	 * the iGPU is enabled which results in cursor issues if
+	 * the cursor ends up at 0.  Reserve vram at 0 in that case.
+	 */
+	if ((adev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE) &&
+	    (adev->gmc.vram_start == 0))
+		adev->mman.keep_stolen_vga_memory = true;
 
 	if (amdgpu_sriov_vf(adev) ||
 	    !amdgpu_device_has_display_hardware(adev)) {
-- 
2.55.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-25 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25  7:24 [PATCH] drm/amdgpu: extend MacBook VRAM-at-0 workaround to VERDE Ayhan Çiçek
2026-09-25 13:18 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®