drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits
Subsystems (3)
Alex Deucher
maintainerPATCH v2 1/1 drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits
The DMA mask on SI parts is 40 bits not 44. Copy
paste typo.
--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2 -2
@@ -841,12 +841,12 @@ static int gmc_v6_0_sw_init(void *handle) adev->gmc.mc_mask =0xffffffffffULL ; - r =dma_set_mask_and_coherent (adev->dev,DMA_BIT_MASK (44 )); + r =dma_set_mask_and_coherent (adev->dev,DMA_BIT_MASK (40 ));if (r) {dev_warn (adev->dev,"No suitable DMA available.\n" );return r; } - adev->need_swiotlb =drm_need_swiotlb (44 ); + adev->need_swiotlb =drm_need_swiotlb (40 ); r =gmc_v6_0_init_microcode (adev);if (r) {
Signature · 1 line
2.31.1
Dear Alex,
Quoted 4 lines · Alex Deucher
The DMA mask on SI parts is 40 bits not 44. Copy
paste typo.Fixes 244511f386ccb9 ("drm/amdgpu: simplify and cleanup setting the dma mask")
This was present in Linux 5.4-rc1. Can it also be the cause of some of the crashes with the AMD Ryzen systems like Bug 206487 - Random freezes/crashes with enabled C-State C6 - AMD Ryzen [1]? I know, there were also some things with Linux 4.19.57, but, if my memory serves correctly, they were much more often with Linux 5.4. Some crashes had MCE and other did not, some froze the system, some rebooted it.
Quoted 18 lines
Acked-by Christian König <[email protected]>Tested-by Paul Menzel <[email protected]>Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +0
-1@@ -841,12 +841,12 @@ static int gmc_v6_0_sw_init(void *handle) adev->gmc.mc_mask =0xffffffffffULL ; - r =dma_set_mask_and_coherent (adev->dev,DMA_BIT_MASK (44 ));
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c static int gmc_v6_0_sw_init(void *handle) · line 852
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2
-1+ r =dma_set_mask_and_coherent (adev->dev,DMA_BIT_MASK (40 ));if (r) {dev_warn (adev->dev,"No suitable DMA available.\n" );return r; } - adev->need_swiotlb =drm_need_swiotlb (44 ); + adev->need_swiotlb =drm_need_swiotlb (40 ); r =gmc_v6_0_init_microcode (adev);if (r) {
Kind regards,
Paul
Quoted 8 lines · Paul Menzel
Dear Alex,
Quoted 3 lines · Alex Deucher
The DMA mask on SI parts is 40 bits not 44. Copy
paste typo.
Quoted 8 lines
Quoted 1 line
Fixes 244511f386ccb9 ("drm/amdgpu: simplify and cleanup setting the dma mask")This was present in Linux 5.4-rc1. Can it also be the cause of some of the crashes with the AMD Ryzen systems like Bug 206487 - Random freezes/crashes with enabled C-State C6 - AMD Ryzen [1]? I know, there were also some things with Linux 4.19.57, but, if my memory serves correctly, they were much more often with Linux 5.4. Some crashes had MCE and other did not, some froze the system, some rebooted it.
I doubt it would cause an MCE. You should just see an IOMMU page fault.
Alex
Quoted 37 lines
Quoted 19 lines
Acked-by Christian König <[email protected]>Tested-by Paul Menzel <[email protected]>Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +0
-1@@ -841,12 +841,12 @@ static int gmc_v6_0_sw_init(void *handle) adev->gmc.mc_mask =0xffffffffffULL ; - r =dma_set_mask_and_coherent (adev->dev,DMA_BIT_MASK (44 ));drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c static int gmc_v6_0_sw_init(void *handle) · line 852
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2
-1+ r =dma_set_mask_and_coherent (adev->dev,DMA_BIT_MASK (40 ));if (r) {dev_warn (adev->dev,"No suitable DMA available.\n" );return r; } - adev->need_swiotlb =drm_need_swiotlb (44 ); + adev->need_swiotlb =drm_need_swiotlb (40 ); r =gmc_v6_0_init_microcode (adev);if (r) {Kind regards,
Paul
Dear Linux stable folks,
Am 28.10.21 um 16:21 schrieb Alex Deucher:
Quoted 8 lines
The DMA mask on SI parts is 40 bits not 44. Copy
paste typo.Fixes 244511f386ccb9 ("drm/amdgpu: simplify and cleanup setting the dma mask")Acked-by Christian König <[email protected]>Tested-by Paul Menzel <[email protected]>Signed-off-by Alex Deucher <[email protected]>
This is commit 403475be6d8b122c3e6b8a47e075926d7299e5ef in Linus’ master branch. Could you please apply it to the stable series (5.4+)?
Kind regards,
Paul