All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits
@ 2021-10-28 14:21 Alex Deucher
  2021-10-28 15:19 ` Paul Menzel
  2021-11-08  8:10   ` Paul Menzel
  0 siblings, 2 replies; 5+ messages in thread
From: Alex Deucher @ 2021-10-28 14:21 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher, Christian König, Paul Menzel

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")
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1762
Acked-by: Christian König <christian.koenig@amd.com>
Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index 0e81e03e9b49..0fe714f54cca 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -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) {
-- 
2.31.1


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

* Re: [PATCH v2] drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits
  2021-10-28 14:21 [PATCH v2] drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits Alex Deucher
@ 2021-10-28 15:19 ` Paul Menzel
  2021-10-28 15:31   ` Alex Deucher
  2021-11-08  8:10   ` Paul Menzel
  1 sibling, 1 reply; 5+ messages in thread
From: Paul Menzel @ 2021-10-28 15:19 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Christian König, amd-gfx, it+linux-iommu

Dear Alex,


On 28.10.21 16:21, Alex Deucher wrote:
> 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.

> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1762
> Acked-by: Christian König <christian.koenig@amd.com>
> Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> index 0e81e03e9b49..0fe714f54cca 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> @@ -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) {
> 


Kind regards,

Paul


[1]: https://bugzilla.kernel.org/show_bug.cgi?id=206487

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

* Re: [PATCH v2] drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits
  2021-10-28 15:19 ` Paul Menzel
@ 2021-10-28 15:31   ` Alex Deucher
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2021-10-28 15:31 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Alex Deucher, Christian König, amd-gfx list, it+linux-iommu

On Thu, Oct 28, 2021 at 11:19 AM Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>
> Dear Alex,
>
>
> On 28.10.21 16:21, Alex Deucher wrote:
> > 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.

I doubt it would cause an MCE.  You should just see an IOMMU page fault.

Alex

>
> > Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1762
> > Acked-by: Christian König <christian.koenig@amd.com>
> > Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> > index 0e81e03e9b49..0fe714f54cca 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> > @@ -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) {
> >
>
>
> Kind regards,
>
> Paul
>
>
> [1]: https://bugzilla.kernel.org/show_bug.cgi?id=206487

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

* Re: [PATCH v2] drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits
  2021-10-28 14:21 [PATCH v2] drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits Alex Deucher
@ 2021-11-08  8:10   ` Paul Menzel
  2021-11-08  8:10   ` Paul Menzel
  1 sibling, 0 replies; 5+ messages in thread
From: Paul Menzel @ 2021-11-08  8:10 UTC (permalink / raw)
  To: stable; +Cc: Christian König, amd-gfx, Alex Deucher

Dear Linux stable folks,


Am 28.10.21 um 16:21 schrieb 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")
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1762
> Acked-by: Christian König <christian.koenig@amd.com>
> Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

This is commit 403475be6d8b122c3e6b8a47e075926d7299e5ef in Linus’ master 
branch. Could you please apply it to the stable series (5.4+)?


Kind regards,

Paul

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

* Re: [PATCH v2] drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits
@ 2021-11-08  8:10   ` Paul Menzel
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Menzel @ 2021-11-08  8:10 UTC (permalink / raw)
  To: stable; +Cc: Alex Deucher, Christian König, amd-gfx

Dear Linux stable folks,


Am 28.10.21 um 16:21 schrieb 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")
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1762
> Acked-by: Christian König <christian.koenig@amd.com>
> Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

This is commit 403475be6d8b122c3e6b8a47e075926d7299e5ef in Linus’ master 
branch. Could you please apply it to the stable series (5.4+)?


Kind regards,

Paul

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

end of thread, other threads:[~2021-11-08  8:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 14:21 [PATCH v2] drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits Alex Deucher
2021-10-28 15:19 ` Paul Menzel
2021-10-28 15:31   ` Alex Deucher
2021-11-08  8:10 ` Paul Menzel
2021-11-08  8:10   ` Paul Menzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.