drm/amd/pm: defer UCLK DPM on selected Apple Navi GPUs
Subsystems (3)
PATCH v4 1/1 drm/amd/pm: defer UCLK DPM on selected Apple Navi GPUs
From: Atharva Tiwari <[email protected]>
Some Apple Navi GPUs intermittently time out during SMU initialization when EnableAllSmuFeatures includes UCLK DPM. Leave UCLK out of that early request and enable it from Navi post-init, after display hardware init and before the UMC workaround and UMD clock setup.
Read back the enabled features before rebuilding the memory clock table and sustainable clock limits. Also check the PPT memory states used by display initialization before late enablement. Keep memory-voltage DPM and respect the user's memory-DPM setting and the secure Navi 10 exclusion.
Limit this workaround to Apple 7340/0218 revision 41, 7340/0219, and 731b/021a revision 40. Revisions and PCI IDs here are hexadecimal. The underlying initialization dependency behind the timing sensitivity is still unknown.
This builds on Atharva Tiwari's submitted 0219 delayed-UCLK patch and Guna's diagnosis. Ed Schofield moved the enable point into the Navi callback, added state validation and clock-table refresh, and extended the board matching.
Independent tests of the related T2 implementation support improved boot reliability on 0219 and 021a; those are not tests of this exact AMD patch.
---
Hi Alex, hi Atharva,
Here is v4 of the delayed-UCLK workaround. Atharva is credited as the author in From:, with my rework credited through Co-developed-by:. The local development history starts from Atharva's original 0219 submission [1], followed by my move to the Navi post-init callback, state validation, clock-table refresh and additional board support. This export is a single replacement patch against AMD staging at 8a4e96cf2; it is not an incremental patch to apply on top of v2 or Atharva's original patch. (V3 was a local revision that I didn't submit to this list.)
Atharva, I agree that display initialization may explain the timing dependency. This patch already enables UCLK after display hardware initialization on the normal probe path. It is intended as a targeted workaround for the reported boot failures; it does not establish the underlying cause or address native 5K support. Could you share the exact initialization-ordering diff, kernel version and GPU IDs from your experiment? In the AMD staging tree used for this patch, dce_v10_0_early_init() handles Tonga/Fiji, while these Navi boards use the DCN path.
My goal is to stop the intermittent boot failures on my iMac (0218) and other affected machines. Testing of my related T2 candidate in PR 61 [2], which was based on my local v3, is encouraging:
- Matt Olney's report on 021a [3] records internal-display boot success improving from 2/10 to 10/10, with mixed restart types. External-display results were 4/10 versus 4/5, with uncertain kernel selection on the failed candidate attempt.
- Vivek Chauhan's report on 0219 [4] records boot success improving from 1/5 to 3/3.
These results are from the T2 implementation, not this exact AMD v4 export. The T2 patch stack also includes a separate correction to its existing fixed allowed-feature mask on 0219, which clean AMD does not need and this patch does not contain. The results support improved boot reliability on these machines, but do not establish full performance or reliability across all display configurations.
Compared with public v2, v4 adds 731b/021a revision 40, preserves the existing secure-Navi-10 exclusion and generalizes the helper names. It retains 7340/0218 revision 41 and 7340/0219. All IDs and revisions here are hexadecimal.
Compared with my local v3 / T2 Linux PR #61, v4 excludes 020f: 3v3nFloW reported that initialization completed but the machine subsequently hung under load [5]. Their follow-up testing with a fixed memory-clock level
[6] suggests that memory-clock changes cause the hang, but doesn't establish whether GPU load or display activity triggers it. I've also excluded 021b from this version, which we don't yet have testing results for.
Local build and host checks pass. I am currently travelling without my iMac and have no new v4 hardware results, but I am submitting this version for merging, with the workaround limited to the three board matches supported by the existing evidence from the volunteer testers mentioned above.
Alex, this patch replaces v2 and applies directly to the AMD staging commit identified above.
Thanks,
Ed
[1] https://lore.kernel.org/amd-gfx/[email protected]/
[2] https://github.com/t2linux/linux-t2-patches/pull/61
[3] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5637976466
[4] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5645652752
[5] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5646139127
[6] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5646438512
v3 was local, not submitted. Since public v2: add the tested 021a/40 match, retain the secure-Navi-10 exclusion, and generalize helper names. Since local v3: remove 020f (load hangs) and 021b (no testing evidence).
Base: 8a4e96cf2acd1e0340581df100b559f77ad7d855 (AMD staging). This is a full replacement, not a patch to apply on top of v2.
.../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +100 -0
@@ -60,6 +60,37 @@static int navi10_init_ppt_limits (struct smu_context *smu); +static bool is_asic_secure (struct smu_context *smu); + +static bool navi10_apple_needs_late_uclk (struct smu_context *smu) +{ +struct amdgpu_device *adev = smu->adev; +struct pci_dev *pdev = adev->pdev; + +if (pdev->vendor !=PCI_VENDOR_ID_ATI || + pdev->subsystem_vendor !=PCI_VENDOR_ID_APPLE || + !(adev->pm.pp_feature &PP_MCLK_DPM_MASK )) +return false; + +/* Preserve the existing secure Navi 10 memory-DPM exclusion. */ +if (is_asic_secure (smu) && +amdgpu_ip_version (adev,MP1_HWIP ,0 ) ==IP_VERSION (11 ,0 ,0 ) && + adev->rev_id ==0 ) +return false; + +switch (pdev->device) { +case 0x7340 : +return (pdev->subsystem_device ==0x0218 && + pdev->revision ==0x41 ) || + pdev->subsystem_device ==0x0219 ; +case 0x731b : +return pdev->subsystem_device ==0x021a && + pdev->revision ==0x40 ; +default : +return false; + } +} +static const struct smu_feature_bits navi10_dpm_features = { .bits = {SMU_FEATURE_BIT_INIT (FEATURE_DPM_PREFETCHER_BIT ),
@@ -356,6 +387,11 @@ navi10_init_allowed_features(struct smu_context *smu)smu_feature_list_set_bit (smu,SMU_FEATURE_LIST_ALLOWED ,FEATURE_MEM_MVDD_SCALING_BIT ); } +/* Defer UCLK on the selected Apple boards until IP late init. */ +if (navi10_apple_needs_late_uclk (smu)) +smu_feature_list_clear_bit (smu,SMU_FEATURE_LIST_ALLOWED , +FEATURE_DPM_UCLK_BIT ); +if (is_asic_secure (smu) && (amdgpu_ip_version (adev,MP1_HWIP ,0 ) ==IP_VERSION (11 ,0 ,0 )) && (adev->rev_id ==0 ))
@@ -470,6 +506,25 @@ static int navi10_store_powerplay_table(struct smu_context *smu)return 0 ; } +/* DCN20 consumes these PPT states before the post-init UCLK enable. */ +static int navi10_apple_check_uclk_states (struct smu_context *smu) +{ +PPTable_t *ppt = smu->smu_table.driver_pptable; +unsigned int count, i; + +if (!navi10_apple_needs_late_uclk (smu)) +return 0 ; + + count = ppt->DpmDescriptor[PPCLK_UCLK ].NumDiscreteLevels; +if (!count || count >ARRAY_SIZE (ppt->FreqTableUclk)) +return -EINVAL ; +for (i =0 ; i < count; i++) { +if (!ppt->FreqTableUclk[i]) +return -EINVAL ; + } +return 0 ; +} +static int navi10_setup_pptable (struct smu_context *smu) {int ret =0 ;
@@ -490,6 +545,10 @@ static int navi10_setup_pptable(struct smu_context *smu)if (ret)return ret; + ret =navi10_apple_check_uclk_states (smu); +if (ret) +return ret; +return navi10_init_ppt_limits (smu); }
@@ -3219,6 +3278,41 @@ static int navi10_enable_mgpu_fan_boost(struct smu_context *smu) NULL); } +/* IP late init follows display hw_init; refresh clocks before UMC/UMD setup. */ +static int navi10_apple_late_uclk_enable (struct smu_context *smu) +{ +struct smu_11_0_dpm_context *dpm = smu->smu_dpm.dpm_context; +struct smu_dpm_table *table = &dpm->dpm_tables.uclk_table; +PPTable_t *ppt = smu->smu_table.driver_pptable; +struct smu_feature_bits enabled; +int ret; + +if (!navi10_apple_needs_late_uclk (smu)) +return 0 ; + + ret =smu_cmn_feature_set_enabled (smu,SMU_FEATURE_DPM_UCLK_BIT , true); +if (ret) +return ret; + ret =smu_cmn_get_enabled_mask (smu, &enabled); +if (ret) +return ret; +if (!smu_feature_bits_is_set (&enabled,FEATURE_DPM_UCLK_BIT )) +return -EIO ; + +smu_feature_list_set_bit (smu,SMU_FEATURE_LIST_SUPPORTED , +FEATURE_DPM_UCLK_BIT ); + table->clk_type =SMU_UCLK ; + ret =smu_v11_0_set_single_dpm_table (smu,SMU_UCLK , table); +if (ret) +return ret; +if (!table->count) +return -EINVAL ; +if (!ppt->DpmDescriptor[PPCLK_UCLK ].SnapToDiscrete) + table->flags |=SMU_DPM_TABLE_FINE_GRAINED ; + +return smu_v11_0_init_max_sustainable_clocks (smu); +} +static int navi10_post_smu_init (struct smu_context *smu) {struct amdgpu_device *adev = smu->adev;
@@ -3227,6 +3321,12 @@ static int navi10_post_smu_init(struct smu_context *smu)if (amdgpu_sriov_vf (adev))return 0 ; + ret =navi10_apple_late_uclk_enable (smu); +if (ret) { +dev_err (adev->dev,"Failed to enable late UCLK DPM: %d\n" , ret); +return ret; + } + ret =navi10_run_umc_cdr_workaround (smu);if (ret)dev_err (adev->dev,"Failed to apply umc cdr workaround!\n" );
Signature · 1 line
2.43.0
+ Andre
Quoted 13 lines · Ed Schofield
From: Atharva Tiwari <[email protected]>
Some Apple Navi GPUs intermittently time out during SMU initialization when EnableAllSmuFeatures includes UCLK DPM. Leave UCLK out of that early request and enable it from Navi post-init, after display hardware init and before the UMC workaround and UMD clock setup.
Read back the enabled features before rebuilding the memory clock table and sustainable clock limits. Also check the PPT memory states used by display initialization before late enablement. Keep memory-voltage DPM and respect the user's memory-DPM setting and the secure Navi 10 exclusion.
Quoted 4 lines
Limit this workaround to Apple 7340/0218 revision 41, 7340/0219, and 731b/021a revision 40. Revisions and PCI IDs here are hexadecimal. The underlying initialization dependency behind the timing sensitivity is still unknown.
@Andre Eikmeyer I think this patch should fix your system as well. @Atharva Tiwari are you ok with this patch?
Thanks,
Alex
Quoted 245 lines
This builds on Atharva Tiwari's submitted 0219 delayed-UCLK patch and Guna's diagnosis. Ed Schofield moved the enable point into the Navi callback, added state validation and clock-table refresh, and extended the board matching.
Independent tests of the related T2 implementation support improved boot reliability on 0219 and 021a; those are not tests of this exact AMD patch.Assisted-by Codex:GPT-6Signed-off-by Atharva Tiwari <[email protected]>Co-developed-by Ed Schofield <[email protected]>Signed-off-by Ed Schofield <[email protected]>---
Hi Alex, hi Atharva,Here is v4 of the delayed-UCLK workaround. Atharva is credited as the author in
From:, with my rework credited throughCo-developed-by:. The local development history starts from Atharva's original 0219 submission [1], followed by my move to the Navi post-init callback, state validation, clock-table refresh and additional board support. This export is a single replacement patch against AMD staging at8a4e96cf2; it is not an incremental patch to apply on top of v2 or Atharva's original patch. (V3 was a local revision that I didn't submit to this list.)Atharva, I agree that display initialization may explain the timing dependency. This patch already enables UCLK after display hardware initialization on the normal probe path. It is intended as a targeted workaround for the reported boot failures; it does not establish the underlying cause or address native 5K support. Could you share the exact initialization-ordering diff, kernel version and GPU IDs from your experiment? In the AMD staging tree used for this patch,
dce_v10_0_early_init()handles Tonga/Fiji, while these Navi boards use the DCN path.My goal is to stop the intermittent boot failures on my iMac (0218) and other affected machines. Testing of my related T2 candidate in PR 61 [2], which was based on my local v3, is encouraging:
- Matt Olney's report on 021a [3] records internal-display boot success improving from 2/10 to 10/10, with mixed restart types. External-display results were 4/10 versus 4/5, with uncertain kernel selection on the failed candidate attempt.
- Vivek Chauhan's report on 0219 [4] records boot success improving from 1/5 to 3/3.These results are from the T2 implementation, not this exact AMD v4 export. The T2 patch stack also includes a separate correction to its existing fixed allowed-feature mask on 0219, which clean AMD does not need and this patch does not contain. The results support improved boot reliability on these machines, but do not establish full performance or reliability across all display configurations.
Compared with public v2, v4 adds 731b/021a revision 40, preserves the existing secure-Navi-10 exclusion and generalizes the helper names. It retains 7340/0218 revision 41 and 7340/0219. All IDs and revisions here are hexadecimal.
Compared with my local v3 / T2 Linux PR #61, v4 excludes 020f: 3v3nFloW reported that initialization completed but the machine subsequently hung under load [5]. Their follow-up testing with a fixed memory-clock level
[6] suggests that memory-clock changes cause the hang, but doesn't establish whether GPU load or display activity triggers it. I've also excluded 021b from this version, which we don't yet have testing results for.Local build and host checks pass. I am currently travelling without my iMac and have no new v4 hardware results, but I am submitting this version for merging, with the workaround limited to the three board matches supported by the existing evidence from the volunteer testers mentioned above.
Alex, this patch replaces v2 and applies directly to the AMD staging commit identified above.
Thanks,
Ed[1] https://lore.kernel.org/amd-gfx/[email protected]/
[2] https://github.com/t2linux/linux-t2-patches/pull/61
[3] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5637976466
[4] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5645652752
[5] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5646139127
[6] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5646438512v3 was local, not submitted. Since public v2: add the tested 021a/40 match, retain the secure-Navi-10 exclusion, and generalize helper names. Since local v3: remove 020f (load hangs) and 021b (no testing evidence).
Base:8a4e96cf2acd1e0340581df100b559f77ad7d855(AMD staging). This is a full replacement, not a patch to apply on top of v2..../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+)drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +100
-1@@ -60,6 +60,37 @@static int navi10_init_ppt_limits (struct smu_context *smu); +static bool is_asic_secure (struct smu_context *smu); + +static bool navi10_apple_needs_late_uclk (struct smu_context *smu) +{ +struct amdgpu_device *adev = smu->adev; +struct pci_dev *pdev = adev->pdev; + +if (pdev->vendor !=PCI_VENDOR_ID_ATI || + pdev->subsystem_vendor !=PCI_VENDOR_ID_APPLE || + !(adev->pm.pp_feature &PP_MCLK_DPM_MASK )) +return false; + +/* Preserve the existing secure Navi 10 memory-DPM exclusion. */ +if (is_asic_secure (smu) && +amdgpu_ip_version (adev,MP1_HWIP ,0 ) ==IP_VERSION (11 ,0 ,0 ) && + adev->rev_id ==0 ) +return false; + +switch (pdev->device) { +case 0x7340 : +return (pdev->subsystem_device ==0x0218 && + pdev->revision ==0x41 ) || + pdev->subsystem_device ==0x0219 ; +case 0x731b : +return pdev->subsystem_device ==0x021a && + pdev->revision ==0x40 ; +default : +return false; + } +} +static const struct smu_feature_bits navi10_dpm_features = { .bits = {SMU_FEATURE_BIT_INIT (FEATURE_DPM_PREFETCHER_BIT ),@@ -356,6 +387,11 @@ navi10_init_allowed_features(struct smu_context *smu)smu_feature_list_set_bit (smu,SMU_FEATURE_LIST_ALLOWED ,FEATURE_MEM_MVDD_SCALING_BIT ); } +/* Defer UCLK on the selected Apple boards until IP late init. */ +if (navi10_apple_needs_late_uclk (smu)) +smu_feature_list_clear_bit (smu,SMU_FEATURE_LIST_ALLOWED , +FEATURE_DPM_UCLK_BIT ); +if (is_asic_secure (smu) && (amdgpu_ip_version (adev,MP1_HWIP ,0 ) ==IP_VERSION (11 ,0 ,0 )) && (adev->rev_id ==0 ))@@ -470,6 +506,25 @@ static int navi10_store_powerplay_table(struct smu_context *smu)return 0 ; } +/* DCN20 consumes these PPT states before the post-init UCLK enable. */ +static int navi10_apple_check_uclk_states (struct smu_context *smu) +{ +PPTable_t *ppt = smu->smu_table.driver_pptable; +unsigned int count, i; + +if (!navi10_apple_needs_late_uclk (smu)) +return 0 ; + + count = ppt->DpmDescriptor[PPCLK_UCLK ].NumDiscreteLevels; +if (!count || count >ARRAY_SIZE (ppt->FreqTableUclk)) +return -EINVAL ; +for (i =0 ; i < count; i++) { +if (!ppt->FreqTableUclk[i]) +return -EINVAL ; + } +return 0 ; +} +static int navi10_setup_pptable (struct smu_context *smu) {int ret =0 ;@@ -490,6 +545,10 @@ static int navi10_setup_pptable(struct smu_context *smu)if (ret)return ret; + ret =navi10_apple_check_uclk_states (smu); +if (ret) +return ret; +return navi10_init_ppt_limits (smu); }@@ -3219,6 +3278,41 @@ static int navi10_enable_mgpu_fan_boost(struct smu_context *smu) NULL); } +/* IP late init follows display hw_init; refresh clocks before UMC/UMD setup. */ +static int navi10_apple_late_uclk_enable (struct smu_context *smu) +{ +struct smu_11_0_dpm_context *dpm = smu->smu_dpm.dpm_context; +struct smu_dpm_table *table = &dpm->dpm_tables.uclk_table; +PPTable_t *ppt = smu->smu_table.driver_pptable; +struct smu_feature_bits enabled; +int ret; + +if (!navi10_apple_needs_late_uclk (smu)) +return 0 ; + + ret =smu_cmn_feature_set_enabled (smu,SMU_FEATURE_DPM_UCLK_BIT , true); +if (ret) +return ret; + ret =smu_cmn_get_enabled_mask (smu, &enabled); +if (ret) +return ret; +if (!smu_feature_bits_is_set (&enabled,FEATURE_DPM_UCLK_BIT )) +return -EIO ; + +smu_feature_list_set_bit (smu,SMU_FEATURE_LIST_SUPPORTED , +FEATURE_DPM_UCLK_BIT ); + table->clk_type =SMU_UCLK ; + ret =smu_v11_0_set_single_dpm_table (smu,SMU_UCLK , table); +if (ret) +return ret; +if (!table->count) +return -EINVAL ; +if (!ppt->DpmDescriptor[PPCLK_UCLK ].SnapToDiscrete) + table->flags |=SMU_DPM_TABLE_FINE_GRAINED ; + +return smu_v11_0_init_max_sustainable_clocks (smu); +} +static int navi10_post_smu_init (struct smu_context *smu) {struct amdgpu_device *adev = smu->adev;@@ -3227,6 +3321,12 @@ static int navi10_post_smu_init(struct smu_context *smu)if (amdgpu_sriov_vf (adev))return 0 ; + ret =navi10_apple_late_uclk_enable (smu); +if (ret) { +dev_err (adev->dev,"Failed to enable late UCLK DPM: %d\n" , ret); +return ret; + } + ret =navi10_run_umc_cdr_workaround (smu);if (ret)dev_err (adev->dev,"Failed to apply umc cdr workaround!\n" ); --2.43.0
Quoted 6 lines
@Andre Eikmeyer I think this patch should fix your system as well. @Atharva Tiwari are you ok with this patch?
Thanks,
Alex
No, as i said this is not the reason, and we've already fixed it properly You can see it here:
https://github.com/t2linux/linux-t2-patches/blob/main/7003-amdgpu-add-support-for-5K.patch
(Adds 5K support and fixes the boot issue).
And for the 16,1 issue (i assume), the only fix is
https://lore.kernel.org/all/[email protected]/
The PPTables provided uclk clock speeds is wrong, thats what causes the issue, initializing UCLK in post_init wont solve that.
Quoted 1 line · On Thu, 29 Oct 2026 17:57:49 -0400 Alex Deucher <[email protected]> wrote:
@Andre Eikmeyer I think this patch should fix your system as well.
Hi Alex,
I guess you have seen it already but the patch doesn't match the 16,1. Its boards are 7340/020f and 7340/0210, and v4 only matches 0218, 0219 and 021a.
That hang is what I sent a fix for
https://lore.kernel.org/all/[email protected]/
The VBIOS trains the UMC p-states at different frequencies the pp-table lists. The SMU hangs as soon as UCLK switches into level 2. Deferring the UCLK enable doesn't change the levels, so the hang just moves from boot to later under load.
The two patches can coexist after a trivial rebase.
Quoted 1 line
...your system...
I need to clarify here. I actually don't own a 16,1. But I maintain a distro (KaiT2en) that specializes on T2 Macs. So the patches I develop are extensively tested by the community before submitting. Atharwa is part of this community. Ed is not, but Atharwa reviewed and tested the code.
Best,
Andre
Quoted 12 lines · André Eikmeyer
Quoted 1 line · On Thu, 29 Oct 2026 17:57:49 -0400 Alex Deucher <[email protected]> wrote:
@Andre Eikmeyer I think this patch should fix your system as well.
Hi Alex,
I guess you have seen it already but the patch doesn't match the 16,1. Its boards are 7340/020f and 7340/0210, and v4 only matches 0218, 0219 and 021a.
Quoted 8 lines
That hang is what I sent a fix for
https://lore.kernel.org/all/[email protected]/The VBIOS trains the UMC p-states at different frequencies the pp-table lists. The SMU hangs as soon as UCLK switches into level 2. Deferring the UCLK enable doesn't change the levels, so the hang just moves from boot to later under load.
It is the same issue. I don't want two fixes for the same issue. I just sent an updated version of this patch expanded to cover more macs.
Alex
Quoted 12 lines
The two patches can coexist after a trivial rebase.
Quoted 1 line
...your system...
I need to clarify here. I actually don't own a 16,1. But I maintain a distro (KaiT2en) that specializes on T2 Macs. So the patches I develop are extensively tested by the community before submitting. Atharwa is part of this community. Ed is not, but Atharwa reviewed and tested the code.
Best,
Andre
Quoted 5 lines
It is the same issue. I don't want two fixes for the same issue. I just sent an updated version of this patch expanded to cover more macs.
Alex
How is the problems same exactly?, Does initializing UCLK later change the PPTable?, and as said this is not even a solution for iMacs, so why are we still trying to upstream this?, and btw initializing UCLK later with 5K, makes it not initialize at all, so the patch is just wrong.
Quoted 11 lines · Atharva Tiwari
Quoted 6 lines
It is the same issue. I don't want two fixes for the same issue. I just sent an updated version of this patch expanded to cover more macs.
Alex
How is the problems same exactly?, Does initializing UCLK later change the PPTable?, and as said this is not even a solution for iMacs, so why are we still trying to upstream this?, and btw initializing UCLK later with 5K, makes it not initialize at all, so the patch is just wrong.
I asked around internally with the windows team about this issue and was told macs needed to enable UCLK DPM later, but no one was aware of any uclk dpm patching.
Alex
Quoted 3 lines · On Tue, 3 Nov 2026 10:14:12 -0500 Alex Deucher <[email protected]> wrote:
I asked around internally with the windows team about this issue and was told macs needed to enable UCLK DPM later, but no one was aware of any uclk dpm patching.
Can you please elaborate about the relation between the windows team and Apple logicboards? The macOS kexts even set a 740mhz cap for particular memory chip revisions.
Hi Alex
Quoted 9 lines
Quoted 7 lines · Atharva Tiwari
Quoted 6 lines
It is the same issue. I don't want two fixes for the same issue. I just sent an updated version of this patch expanded to cover more macs.
Alex
Quoted 8 lines
Quoted 4 lines
How is the problems same exactly?, Does initializing UCLK later change the PPTable?, and as said this is not even a solution for iMacs, so why are we still trying to upstream this?, and btw initializing UCLK later with 5K, makes it not initialize at all, so the patch is just wrong.
I asked around internally with the windows team about this issue and
was told macs needed to enable UCLK DPM later, but no one was aware of
any uclk dpm patching.We have filed multiple bug reports regarding the 5K issue on iMacs but they have simply been tagged and left over for many years. Now suddenly one day a person without properly consulting the author sends a patch upstream, inspite of the author himself saying doesn't work.
I own a MacBookPro16,1 and the v5 send doesn't work at all to fix it for me.
Since Windows team is willing to help us please fix the 5K issue on iMacs as well. And the devs aim achieve hybrid graphics, which Windows does not support.
For my testing results, the patch in v5 (https://lore.kernel.org/all/[email protected]/T/#u) doesn't solve what is claims to. It might be possible its needed, but in that case even more workups and patches should also needed to get the GPUs running properly on Linux only.
I believe patches submitted by the author himself should be acknowledged. We already are victims of AI cannon, pls don't make things worse.
Hi Alex, hi Atharva, hi all,
Alex, I'd like to withdraw my September v4 submission. I also don't support applying v5 as posted or the simplified patch you attached later in this thread. Please remove my Co-developed-by and Signed-off-by tags from both versions. I no longer think deferring UCLK is the right approach for the iMacs.
I also excluded the MacBookPro16,1 (020f) from v4 deliberately because a tester found that with deferred UCLK it still hung after login, as it does without the patch [1], which seems to fit André's PPTable diagnosis.
Since then, I've been working with Atharva to get his native-5K iMac support upstream. His patch initializes the display before the SMU, which has also prevented the boot failures without deferring UCLK. On my iMac20,1 (0218), 13 of 20 warm boots failed with the upstream order; with display first, all 40 boots passed [4]. Another tester reported one warm and one cold boot, both successful, on a 0219 [2]. On an iMac20,2 (021a), changing only the initialization order improved warm boot success from 11 out of 20 to 100 out of 100 [3]. His patch only applies to the iMac20,1 and iMac20,2, so it doesn't fix the 16,1 either.
I don't think the iMacs and the MacBookPro16,1 have the same problem. The iMacs fail while amdgpu is loading: the SMU stops responding to EnableAllSmuFeatures (message 6), and the probe fails with -62. With the display initialized first, the same message succeeds with UCLK included, and the iMac boots normally. The 16,1 loads amdgpu without errors and hangs later, after login, with or without deferred UCLK [1]. So deferring UCLK seems to help the iMacs only because it moves the enable after display init, and it doesn't help the MacBookPro16,1.
I have prepared a draft patch with Atharva as author and me as co-developer, incorporating his review feedback. It combines display-first initialization and native 5120x2880 support through two tiled connectors with suspend/resume and display power-management changes. The current draft is here:
This has passed some initial automated testing on my iMac20,1 but I need to do more testing and get Atharva's final review and sign-off.
Alex, thanks for following up on the boot issue and checking with the Windows team.
Best regards,
Ed
[1] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5646139127
[2] https://github.com/t2linux/wiki/issues/743#issuecomment-6083265811
[3] https://github.com/t2linux/wiki/issues/743#issuecomment-6131809640
[4] https://github.com/t2linux/wiki/issues/743#issuecomment-6163146905
Quoted 36 lines · Ed Schofield
Hi Alex, hi Atharva, hi all,
Alex, I'd like to withdraw my September v4 submission. I also don't support applying v5 as posted or the simplified patch you attached later in this thread. Please remove my Co-developed-by and Signed-off-by tags from both versions. I no longer think deferring UCLK is the right approach for the iMacs.
I also excluded the MacBookPro16,1 (020f) from v4 deliberately because a tester found that with deferred UCLK it still hung after login, as it does without the patch [1], which seems to fit André's PPTable diagnosis.
Since then, I've been working with Atharva to get his native-5K iMac support upstream. His patch initializes the display before the SMU, which has also prevented the boot failures without deferring UCLK. On my iMac20,1 (0218), 13 of 20 warm boots failed with the upstream order; with display first, all 40 boots passed [4]. Another tester reported one warm and one cold boot, both successful, on a 0219 [2]. On an iMac20,2 (021a), changing only the initialization order improved warm boot success from 11 out of 20 to 100 out of 100 [3]. His patch only applies to the iMac20,1 and iMac20,2, so it doesn't fix the 16,1 either.
I don't think the iMacs and the MacBookPro16,1 have the same problem. The iMacs fail while amdgpu is loading: the SMU stops responding to EnableAllSmuFeatures (message 6), and the probe fails with -62. With the display initialized first, the same message succeeds with UCLK included, and the iMac boots normally. The 16,1 loads amdgpu without errors and hangs later, after login, with or without deferred UCLK [1]. So deferring UCLK seems to help the iMacs only because it moves the enable after display init, and it doesn't help the MacBookPro16,1.
I have prepared a draft patch with Atharva as author and me as co-developer, incorporating his review feedback. It combines display-first initialization and native 5120x2880 support through two tiled connectors with suspend/resume and display power-management changes. The current draft is here:
Quoted 4 lines
This has passed some initial automated testing on my iMac20,1 but I need to do more testing and get Atharva's final review and sign-off.
There are already patches on the list to support the 5K Macs:
https://lists.freedesktop.org/archives/dri-devel/2026-November/610011.html
Alex
Quoted 11 lines
Alex, thanks for following up on the boot issue and checking with the Windows team.
Best regards,
Ed[1] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5646139127
[2] https://github.com/t2linux/wiki/issues/743#issuecomment-6083265811
[3] https://github.com/t2linux/wiki/issues/743#issuecomment-6131809640
[4] https://github.com/t2linux/wiki/issues/743#issuecomment-6163146905
Quoted 41 lines · Alex Deucher
Quoted 36 lines · Ed Schofield
Hi Alex, hi Atharva, hi all,
Alex, I'd like to withdraw my September v4 submission. I also don't support applying v5 as posted or the simplified patch you attached later in this thread. Please remove my Co-developed-by and Signed-off-by tags from both versions. I no longer think deferring UCLK is the right approach for the iMacs.
I also excluded the MacBookPro16,1 (020f) from v4 deliberately because a tester found that with deferred UCLK it still hung after login, as it does without the patch [1], which seems to fit André's PPTable diagnosis.
Since then, I've been working with Atharva to get his native-5K iMac support upstream. His patch initializes the display before the SMU, which has also prevented the boot failures without deferring UCLK. On my iMac20,1 (0218), 13 of 20 warm boots failed with the upstream order; with display first, all 40 boots passed [4]. Another tester reported one warm and one cold boot, both successful, on a 0219 [2]. On an iMac20,2 (021a), changing only the initialization order improved warm boot success from 11 out of 20 to 100 out of 100 [3]. His patch only applies to the iMac20,1 and iMac20,2, so it doesn't fix the 16,1 either.
I don't think the iMacs and the MacBookPro16,1 have the same problem. The iMacs fail while amdgpu is loading: the SMU stops responding to EnableAllSmuFeatures (message 6), and the probe fails with -62. With the display initialized first, the same message succeeds with UCLK included, and the iMac boots normally. The 16,1 loads amdgpu without errors and hangs later, after login, with or without deferred UCLK [1]. So deferring UCLK seems to help the iMacs only because it moves the enable after display init, and it doesn't help the MacBookPro16,1.
I have prepared a draft patch with Atharva as author and me as co-developer, incorporating his review feedback. It combines display-first initialization and native 5120x2880 support through two tiled connectors with suspend/resume and display power-management changes. The current draft is here:
Quoted 7 lines
Quoted 4 lines
This has passed some initial automated testing on my iMac20,1 but I need to do more testing and get Atharva's final review and sign-off.
There are already patches on the list to support the 5K Macs:
https://lists.freedesktop.org/archives/dri-devel/2026-November/610011.html
Those patches are for older non T2 iMacs. We are discussing iMac20,1 and 20,2 which are T2 Macs.
Quoted 14 lines
Alex
Quoted 11 lines
Alex, thanks for following up on the boot issue and checking with the Windows team.
Best regards,
Ed[1] https://github.com/t2linux/linux-t2-patches/pull/61#issuecomment-5646139127
[2] https://github.com/t2linux/wiki/issues/743#issuecomment-6083265811
[3] https://github.com/t2linux/wiki/issues/743#issuecomment-6131809640
[4] https://github.com/t2linux/wiki/issues/743#issuecomment-6163146905
Quoted 1 line · On Tue, 3 Nov 2026 09:30:34 -0500 Alex Deucher <[email protected]> wrote:
It is the same issue. I don't want two fixes for the same issue.
Understandable, but it is not. Two devs told you the same independently.
On another note I reviewed your patch. It only rejects empty or zero levels. On the 16,1 the pptable levels (736/750 MHz) are non-zero. Besides other issues in the code, the commit message says the exact patch wasn't tested, yet v5 extends it to every Apple Navi 1x. I am sorry but your patch is implausible to me.
Andre
Quoted 6 lines · André Eikmeyer
Quoted 1 line · On Tue, 3 Nov 2026 09:30:34 -0500 Alex Deucher <[email protected]> wrote:
It is the same issue. I don't want two fixes for the same issue.
Quoted 7 lines
Understandable, but it is not. Two devs told you the same independently.
On another note I reviewed your patch. It only rejects empty or zero levels. On the 16,1 the pptable levels (736/750 MHz) are non-zero. Besides other issues in the code, the commit message says the exact patch wasn't tested, yet v5 extends it to every Apple Navi 1x. I am sorry but your patch is implausible to me.
I forgot to remove the pptable check. Can you try a simplified version of the patch? I think all you need to do is delay the UCLK DPM enablement until late_init. Something like the attached patch.
Alex
From 0cf8c5010875a2cf2574be2bfb690fd85a0da748 Mon Sep 17 00:00:00 2001
From: Atharva Tiwari <[email protected]>
Date: Wed, 16 Sep 2026 14:40:14 +0000
Subject: [PATCH] drm/amd/pm: defer UCLK DPM on selected Apple Navi GPUs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Apple Navi GPUs intermittently time out during SMU initialization when EnableAllSmuFeatures includes UCLK DPM. Leave UCLK out of that early request and enable it from Navi post-init, after display hardware init and before the UMC workaround and UMD clock setup.
Read back the enabled features before rebuilding the memory clock table and sustainable clock limits. Also check the PPT memory states used by display initialization before late enablement. Keep memory-voltage DPM and respect the user's memory-DPM setting and the secure Navi 10 exclusion.
This builds on Atharva Tiwari's submitted 0219 delayed-UCLK patch and Guna's diagnosis. Ed Schofield moved the enable point into the Navi callback, added state validation.
Independent tests of the related T2 implementation support improved boot reliability on 0219 and 021a; those are not tests of this exact AMD patch.
--- .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +54 -0
@@ -60,6 +60,25 @@static int navi10_init_ppt_limits (struct smu_context *smu); +static bool is_asic_secure (struct smu_context *smu); + +static bool navi10_apple_needs_late_uclk (struct smu_context *smu) +{ +struct amdgpu_device *adev = smu->adev; +struct pci_dev *pdev = adev->pdev; + +if (!(adev->pm.pp_feature &PP_MCLK_DPM_MASK )) +return false; + +/* Preserve the existing secure Navi 10 memory-DPM exclusion. */ +if (is_asic_secure (smu) && +amdgpu_ip_version (adev,MP1_HWIP ,0 ) ==IP_VERSION (11 ,0 ,0 ) && + adev->rev_id ==0 ) +return false; + +return pdev->subsystem_vendor ==PCI_VENDOR_ID_APPLE ; +} +static const struct smu_feature_bits navi10_dpm_features = { .bits = {SMU_FEATURE_BIT_INIT (FEATURE_DPM_PREFETCHER_BIT ),
@@ -356,6 +375,11 @@ navi10_init_allowed_features(struct smu_context *smu)smu_feature_list_set_bit (smu,SMU_FEATURE_LIST_ALLOWED ,FEATURE_MEM_MVDD_SCALING_BIT ); } +/* Defer UCLK on the selected Apple boards until IP late init. */ +if (navi10_apple_needs_late_uclk (smu)) +smu_feature_list_clear_bit (smu,SMU_FEATURE_LIST_ALLOWED , +FEATURE_DPM_UCLK_BIT ); +if (is_asic_secure (smu) && (amdgpu_ip_version (adev,MP1_HWIP ,0 ) ==IP_VERSION (11 ,0 ,0 )) && (adev->rev_id ==0 ))
@@ -3219,6 +3243,30 @@ static int navi10_enable_mgpu_fan_boost(struct smu_context *smu) NULL); } +/* IP late init follows display hw_init; refresh clocks before UMC/UMD setup. */ +static int navi10_apple_late_uclk_enable (struct smu_context *smu) +{ +struct smu_feature_bits enabled; +int ret; + +if (!navi10_apple_needs_late_uclk (smu)) +return 0 ; + + ret =smu_cmn_feature_set_enabled (smu,SMU_FEATURE_DPM_UCLK_BIT , true); +if (ret) +return ret; + ret =smu_cmn_get_enabled_mask (smu, &enabled); +if (ret) +return ret; +if (!smu_feature_bits_is_set (&enabled,FEATURE_DPM_UCLK_BIT )) +return -EIO ; + +smu_feature_list_set_bit (smu,SMU_FEATURE_LIST_SUPPORTED , +FEATURE_DPM_UCLK_BIT ); + +return 0 ; +} +static int navi10_post_smu_init (struct smu_context *smu) {struct amdgpu_device *adev = smu->adev;
@@ -3227,6 +3275,12 @@ static int navi10_post_smu_init(struct smu_context *smu)if (amdgpu_sriov_vf (adev))return 0 ; + ret =navi10_apple_late_uclk_enable (smu); +if (ret) { +dev_err (adev->dev,"Failed to enable late UCLK DPM: %d\n" , ret); +return ret; + } + ret =navi10_run_umc_cdr_workaround (smu);if (ret)dev_err (adev->dev,"Failed to apply umc cdr workaround!\n" );
Signature · 1 line
2.56.0
Quoted 5 lines
I forgot to remove the pptable check. Can you try a simplified version of the patch? I think all you need to do is delay the UCLK DPM enablement until
late_init. Something like the attached patch.Alex
Also, i've tested this patch with the 5K patch, the UCLK then just never gets initialized, so this patch is literally incompatible with 5K.
And also if ur wondering, what patch am i talking about you can see it here:
https://github.com/t2linux/linux-t2-patches/blob/main/7003-amdgpu-add-support-for-5K.patch
I still need to make combine patch (otherwise bad tearing in gnome/mutter), and i need to enable 5K in EFI aswell to remove the shitty quirk to initialize display eariler than smu, And make it usable with simpledrm.
Quoted 3 lines · On Tue, 3 Nov 2026 10:53:56 -0500 Alex Deucher <[email protected]> wrote:
I forgot to remove the pptable check. Can you try a simplified version of the patch? I think all you need to do is delay the UCLK DPM enablement until
late_init. Something like the attached patch.
Alex, as I told you earlier. I don't own a 16,1. I developed the patch I submitted. It took me months to figure out while debugging via ssh. Currently a community of nearly 6000 people are happily using it. I dont understand your fixation towards a patch that fixes nothing. I dont understand why you write patches based on obvious slop without even being able to test. And I dont see why I should help you with it. There is simply no point in it.