AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/gmc6: fix DMA mask
@ 2021-10-27 18:22 Alex Deucher
  2021-10-27 18:23 ` Alex Deucher
  2021-10-28  7:07 ` Christian König
  0 siblings, 2 replies; 7+ messages in thread
From: Alex Deucher @ 2021-10-27 18:22 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

The DMA mask on SI parts is 40 bits not 44.  Looks like a copy
paste typo.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


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

* Re: [PATCH] drm/amdgpu/gmc6: fix DMA mask
  2021-10-27 18:22 [PATCH] drm/amdgpu/gmc6: fix DMA mask Alex Deucher
@ 2021-10-27 18:23 ` Alex Deucher
  2021-10-27 22:19   ` Paul Menzel
  2021-10-28  7:07 ` Christian König
  1 sibling, 1 reply; 7+ messages in thread
From: Alex Deucher @ 2021-10-27 18:23 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx list

On Wed, Oct 27, 2021 at 2:22 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>
> The DMA mask on SI parts is 40 bits not 44.  Looks like a copy
> paste typo.
>

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1762

Fixed locally.

Alex

> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> index 0e81e03e9b49..a9354cb2d639 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> @@ -841,7 +841,7 @@ 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;
> --
> 2.31.1
>

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

* Re: [PATCH] drm/amdgpu/gmc6: fix DMA mask
  2021-10-27 18:23 ` Alex Deucher
@ 2021-10-27 22:19   ` Paul Menzel
  2021-10-28  8:32     ` Paul Menzel
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Menzel @ 2021-10-27 22:19 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx list, it+linux-iommu, Alex Deucher

Dear Alex,


On 27.10.21 20:23, Alex Deucher wrote:
> On Wed, Oct 27, 2021 at 2:22 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>>
>> The DMA mask on SI parts is 40 bits not 44.  Looks like a copy
>> paste typo.
>>
> 
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1762
> 
> Fixed locally.

As I have no way to reproduce this, as the ring gfx timeout error is 
logged ten seconds after the IO_PAGE_FAULT, is very likely to be related?

Hopefully I am going to be able to test this on Friday. Does AMD’s QA 
team have the cards to test the `iommu.forcedac=1` case? Is that test 
case going to be added to the “test protocol”?

Lastly, should a Fixes tag be added, so it’s picked up for the stable 
series?


Kind regards,

Paul

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

* Re: [PATCH] drm/amdgpu/gmc6: fix DMA mask
  2021-10-27 18:22 [PATCH] drm/amdgpu/gmc6: fix DMA mask Alex Deucher
  2021-10-27 18:23 ` Alex Deucher
@ 2021-10-28  7:07 ` Christian König
  1 sibling, 0 replies; 7+ messages in thread
From: Christian König @ 2021-10-28  7:07 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx

Am 27.10.21 um 20:22 schrieb Alex Deucher:
> The DMA mask on SI parts is 40 bits not 44.  Looks like a copy
> paste typo.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Acked-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> index 0e81e03e9b49..a9354cb2d639 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> @@ -841,7 +841,7 @@ 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;


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

* Re: [PATCH] drm/amdgpu/gmc6: fix DMA mask
  2021-10-27 22:19   ` Paul Menzel
@ 2021-10-28  8:32     ` Paul Menzel
  2021-10-28 10:06       ` Paul Menzel
  2021-10-28 14:14       ` Alex Deucher
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Menzel @ 2021-10-28  8:32 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx list, it+linux-iommu, Alex Deucher

Dear Alex,


On 28.10.21 00:19, Paul Menzel wrote:

> On 27.10.21 20:23, Alex Deucher wrote:
>> On Wed, Oct 27, 2021 at 2:22 PM Alex Deucher 
>> <alexander.deucher@amd.com> wrote:
>>>
>>> The DMA mask on SI parts is 40 bits not 44.  Looks like a copy
>>> paste typo.
>>
>> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1762
>>
>> Fixed locally.
> 
> As I have no way to reproduce this, as the ring gfx timeout error is 
> logged ten seconds after the IO_PAGE_FAULT, is very likely to be related?
> 
> Hopefully I am going to be able to test this on Friday. Does AMD’s QA 
> team have the cards to test the `iommu.forcedac=1` case? Is that test 
> case going to be added to the “test protocol”?
> 
> Lastly, should a Fixes tag be added, so it’s picked up for the stable 
> series?

Does the value of 44 need to be changed to 40 also five lines below?

-       adev->need_swiotlb = drm_need_swiotlb(44);
+       adev->need_swiotlb = drm_need_swiotlb(40);


Kind regards,

Paul

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

* Re: [PATCH] drm/amdgpu/gmc6: fix DMA mask
  2021-10-28  8:32     ` Paul Menzel
@ 2021-10-28 10:06       ` Paul Menzel
  2021-10-28 14:14       ` Alex Deucher
  1 sibling, 0 replies; 7+ messages in thread
From: Paul Menzel @ 2021-10-28 10:06 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx list, it+linux-iommu, Alex Deucher

Dear Alex,


On 28.10.21 10:32, Paul Menzel wrote:

> On 28.10.21 00:19, Paul Menzel wrote:
> 
>> On 27.10.21 20:23, Alex Deucher wrote:
>>> On Wed, Oct 27, 2021 at 2:22 PM Alex Deucher wrote:
>>>>
>>>> The DMA mask on SI parts is 40 bits not 44.  Looks like a copy
>>>> paste typo.
>>>
>>> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1762
>>>
>>> Fixed locally.
>>
>> As I have no way to reproduce this, as the ring gfx timeout error is 
>> logged ten seconds after the IO_PAGE_FAULT, is very likely to be related?
>>
>> Hopefully I am going to be able to test this on Friday. Does AMD’s QA 
>> team have the cards to test the `iommu.forcedac=1` case? Is that test 
>> case going to be added to the “test protocol”?
>>
>> Lastly, should a Fixes tag be added, so it’s picked up for the stable 
>> series?
> 
> Does the value of 44 need to be changed to 40 also five lines below?
> 
> -       adev->need_swiotlb = drm_need_swiotlb(44);
> +       adev->need_swiotlb = drm_need_swiotlb(40);

I booted the Dell OptiPlex 5055 with this patch (both hunks) on top of 
commit 1fc596a56b (Merge tag 'trace-v5.15-rc6' of 
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace) with 
`iommu.forcedac=1`, and did not get any errors.

Tested-by: Paul Menzel <pmenzel@molgen.mpg.de> (AMD OptiPlex 5055, 
Radeon HD 8570 / R7 240/340 OEM, 1002:6611 with `iommu.forcedac=1`)

Maybe in the commit message summary extend: Fix DMA mask from 44 to 40.


Kind regards,

Paul

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

* Re: [PATCH] drm/amdgpu/gmc6: fix DMA mask
  2021-10-28  8:32     ` Paul Menzel
  2021-10-28 10:06       ` Paul Menzel
@ 2021-10-28 14:14       ` Alex Deucher
  1 sibling, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2021-10-28 14:14 UTC (permalink / raw)
  To: Paul Menzel; +Cc: Alex Deucher, amd-gfx list, it+linux-iommu

On Thu, Oct 28, 2021 at 4:33 AM Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>
> Dear Alex,
>
>
> On 28.10.21 00:19, Paul Menzel wrote:
>
> > On 27.10.21 20:23, Alex Deucher wrote:
> >> On Wed, Oct 27, 2021 at 2:22 PM Alex Deucher
> >> <alexander.deucher@amd.com> wrote:
> >>>
> >>> The DMA mask on SI parts is 40 bits not 44.  Looks like a copy
> >>> paste typo.
> >>
> >> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1762
> >>
> >> Fixed locally.
> >
> > As I have no way to reproduce this, as the ring gfx timeout error is
> > logged ten seconds after the IO_PAGE_FAULT, is very likely to be related?
> >
> > Hopefully I am going to be able to test this on Friday. Does AMD’s QA
> > team have the cards to test the `iommu.forcedac=1` case? Is that test
> > case going to be added to the “test protocol”?
> >
> > Lastly, should a Fixes tag be added, so it’s picked up for the stable
> > series?
>
> Does the value of 44 need to be changed to 40 also five lines below?
>
> -       adev->need_swiotlb = drm_need_swiotlb(44);
> +       adev->need_swiotlb = drm_need_swiotlb(40);
>

Good catch.  I'll fix that too for consistency, but the driver is not
functional with the swiotlb due to the amount of memory the driver
maps.

Thanks!

Alex

>
> Kind regards,
>
> Paul

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

end of thread, other threads:[~2021-10-28 14:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-27 18:22 [PATCH] drm/amdgpu/gmc6: fix DMA mask Alex Deucher
2021-10-27 18:23 ` Alex Deucher
2021-10-27 22:19   ` Paul Menzel
2021-10-28  8:32     ` Paul Menzel
2021-10-28 10:06       ` Paul Menzel
2021-10-28 14:14       ` Alex Deucher
2021-10-28  7:07 ` Christian König

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