From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D59784A1396; Sat, 28 Feb 2026 17:46:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300800; cv=none; b=UCsGY8w4FT9Nz4uEK0Bjy6hcNb+kiApeOh6dZxugrxvlwByxIYhcwle9UNgjvI/y9UEAHUKcnrJhzbrA1N8hrETkocaID2ng4J0uockVZO4K5NE9rE+M1KFSsPAqRK5s1sl0T6EmGm7qIhWpvyZcZSnPbQmpHz78WRBTpFfHCLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300800; c=relaxed/simple; bh=2scoCBvhZAIoQeLtM290ODpfT1nL/8CztbW9CC9dEcQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CqtmswGSpOjk6uBHURdV9JXBp3Jg6pQqub/0c1rHpXwltybnDHC0H0Dn37r2op79rLo4N2yk3zVNO2rigGJWc1uy9MBsafq22UPQ6dog9luEuwJWJNgmfo+SomQByljXbdJzIgH0N79COtcrMQooLFlK38K5M7e/w5SYv+OEGY0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YGXdmVrF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YGXdmVrF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28729C19423; Sat, 28 Feb 2026 17:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300800; bh=2scoCBvhZAIoQeLtM290ODpfT1nL/8CztbW9CC9dEcQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YGXdmVrFxBJfQ+UHBnXmukjW3Mk0yyjQgWIZhNWdRBZNynoW90zbWpOuW/ROUSeS5 t2oqRvxrXxfKlsq6On2Sjr/I9DowI79ZUExxAQjAmw7ckCIX2Ck27nYpWs05iOc4Ib OoN8cRRaQEVpYnEgreyPKQCoMSnjcAchHUNIqEpBgAHCnqfvsHT7E8tU8uqxUYuFV5 m2Enz2XjtcTn2woNS240VJI1Vw7olgbT01/In45KQxMUZz1OzYqUwysEeVqw7IKSxQ 5bauBZD1FASIRA9YS15blNouDGf8t1RguEHAlZ2yvkSbvI8XSjfQ8JmcfWUIsMp1Jn I2MR3whrX6LOQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alex Deucher , Mario Kleiner , Sasha Levin Subject: [PATCH 6.19 833/844] drm/amdgpu: keep vga memory on MacBooks with switchable graphics Date: Sat, 28 Feb 2026 12:32:26 -0500 Message-ID: <20260228173244.1509663-834-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Alex Deucher [ Upstream commit 096bb75e13cc508d3915b7604e356bcb12b17766 ] On Intel MacBookPros with switchable graphics, when the iGPU is enabled, the address of VRAM gets put at 0 in the dGPU's virtual address space. This is non-standard and seems to cause issues with the cursor if it ends up at 0. We have the framework to reserve memory at 0 in the address space, so enable it here if the vram start address is 0. Reviewed-and-tested-by: Mario Kleiner Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4302 Cc: stable@vger.kernel.org Cc: Mario Kleiner Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index 2b37398337afc..b8613888c5c33 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c @@ -1019,6 +1019,16 @@ void amdgpu_gmc_get_vbios_allocations(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; -- 2.51.0