diff mbox series

[PATCHv2] drm/amdgpu: disable ASPM on Intel AlderLake based systems

Message ID 20220408190502.4103670-1-richard.gong@amd.com (mailing list archive)
State New, archived
Headers show
Series [PATCHv2] drm/amdgpu: disable ASPM on Intel AlderLake based systems | expand

Commit Message

Gong, Richard April 8, 2022, 7:05 p.m. UTC
Active State Power Management (ASPM) feature is enabled since kernel 5.14.
There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
used with Intel AlderLake based systems to enable ASPM. Using these GFX
cards as video/display output, Intel Alder Lake based systems will hang
during suspend/resume.

Add extra check to disable ASPM on Intel AlderLake based systems.

Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885
Signed-off-by: Richard Gong <richard.gong@amd.com>
---
v2: correct commit description
    move the check from chip family to problematic platform
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

Comments

Alex Deucher April 8, 2022, 7:08 p.m. UTC | #1
On Fri, Apr 8, 2022 at 3:05 PM Richard Gong <richard.gong@amd.com> wrote:
>
> Active State Power Management (ASPM) feature is enabled since kernel 5.14.
> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
> used with Intel AlderLake based systems to enable ASPM. Using these GFX
> cards as video/display output, Intel Alder Lake based systems will hang
> during suspend/resume.
>
> Add extra check to disable ASPM on Intel AlderLake based systems.
>
> Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885
> Signed-off-by: Richard Gong <richard.gong@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
> v2: correct commit description
>     move the check from chip family to problematic platform
> ---
>  drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
> index 039b90cdc3bc..8b4eaf54b23e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -81,6 +81,10 @@
>  #include "mxgpu_vi.h"
>  #include "amdgpu_dm.h"
>
> +#if IS_ENABLED(CONFIG_X86_64)
> +#include <asm/intel-family.h>
> +#endif
> +
>  #define ixPCIE_LC_L1_PM_SUBSTATE       0x100100C6
>  #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK       0x00000001L
>  #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK   0x00000002L
> @@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct amdgpu_device *adev)
>                 WREG32_PCIE(ixPCIE_LC_CNTL, data);
>  }
>
> +static bool intel_core_apsm_chk(void)
> +{
> +#if IS_ENABLED(CONFIG_X86_64)
> +       struct cpuinfo_x86 *c = &cpu_data(0);
> +
> +       return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
> +#else
> +       return false;
> +#endif
> +}
> +
>  static void vi_program_aspm(struct amdgpu_device *adev)
>  {
>         u32 data, data1, orig;
>         bool bL1SS = false;
>         bool bClkReqSupport = true;
>
> -       if (!amdgpu_device_should_use_aspm(adev))
> +       if (!amdgpu_device_should_use_aspm(adev) || intel_core_apsm_chk())
>                 return;
>
>         if (adev->flags & AMD_IS_APU ||
> --
> 2.25.1
>
Mario Limonciello April 8, 2022, 7:12 p.m. UTC | #2
[Public]



> -----Original Message-----
> From: Alex Deucher <alexdeucher@gmail.com>
> Sent: Friday, April 8, 2022 14:09
> To: Gong, Richard <Richard.Gong@amd.com>
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Dave Airlie
> <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; Limonciello, Mario
> <Mario.Limonciello@amd.com>; Maling list - DRI developers <dri-
> devel@lists.freedesktop.org>; amd-gfx list <amd-gfx@lists.freedesktop.org>;
> LKML <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCHv2] drm/amdgpu: disable ASPM on Intel AlderLake based
> systems
> 
> On Fri, Apr 8, 2022 at 3:05 PM Richard Gong <richard.gong@amd.com> wrote:
> >
> > Active State Power Management (ASPM) feature is enabled since kernel 5.14.
> > There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
> > used with Intel AlderLake based systems to enable ASPM. Using these GFX
> > cards as video/display output, Intel Alder Lake based systems will hang
> > during suspend/resume.
> >
> > Add extra check to disable ASPM on Intel AlderLake based systems.
> >
> > Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
> > Link:
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.fr
> eedesktop.org%2Fdrm%2Famd%2F-
> %2Fissues%2F1885&amp;data=04%7C01%7Cmario.limonciello%40amd.com%7
> C440357cd10e74d8c4e1d08da1993344b%7C3dd8961fe4884e608e11a82d994e1
> 83d%7C0%7C0%7C637850417310167943%7CUnknown%7CTWFpbGZsb3d8eyJ
> WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C
> 3000&amp;sdata=WXyESh1FGlxgFLH14P7pYJu3tsyp53uKpUP9NyDV5yE%3D&am
> p;reserved=0
> > Signed-off-by: Richard Gong <richard.gong@amd.com>
> 
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

> 
> > ---
> > v2: correct commit description
> >     move the check from chip family to problematic platform
> > ---
> >  drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++-
> >  1 file changed, 16 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c
> b/drivers/gpu/drm/amd/amdgpu/vi.c
> > index 039b90cdc3bc..8b4eaf54b23e 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> > @@ -81,6 +81,10 @@
> >  #include "mxgpu_vi.h"
> >  #include "amdgpu_dm.h"
> >
> > +#if IS_ENABLED(CONFIG_X86_64)
> > +#include <asm/intel-family.h>
> > +#endif
> > +
> >  #define ixPCIE_LC_L1_PM_SUBSTATE       0x100100C6
> >  #define
> PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK
> 0x00000001L
> >  #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK
> 0x00000002L
> > @@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct
> amdgpu_device *adev)
> >                 WREG32_PCIE(ixPCIE_LC_CNTL, data);
> >  }
> >
> > +static bool intel_core_apsm_chk(void)
> > +{
> > +#if IS_ENABLED(CONFIG_X86_64)
> > +       struct cpuinfo_x86 *c = &cpu_data(0);
> > +
> > +       return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
> > +#else
> > +       return false;
> > +#endif
> > +}
> > +
> >  static void vi_program_aspm(struct amdgpu_device *adev)
> >  {
> >         u32 data, data1, orig;
> >         bool bL1SS = false;
> >         bool bClkReqSupport = true;
> >
> > -       if (!amdgpu_device_should_use_aspm(adev))
> > +       if (!amdgpu_device_should_use_aspm(adev) || intel_core_apsm_chk())
> >                 return;
> >
> >         if (adev->flags & AMD_IS_APU ||
> > --
> > 2.25.1
> >
Paul Menzel April 9, 2022, 12:19 a.m. UTC | #3
Dear Richard,


Thank you for your patch.

Am 08.04.22 um 21:05 schrieb Richard Gong:
> Active State Power Management (ASPM) feature is enabled since kernel 5.14.
> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
> used with Intel AlderLake based systems to enable ASPM. Using these GFX

Alder Lake

> cards as video/display output, Intel Alder Lake based systems will hang
> during suspend/resume.

Please reflow for 75 characters per line.

Also please mention the exact system you had problems with (also 
firmware versions).

> 
> Add extra check to disable ASPM on Intel AlderLake based systems.

Is that a problem with Intel Alder Lake or the Dell system? Shouldn’t 
ASPM just be disabled for the problematic cards for the Dell system. You 
write newer cards worked fine.

> Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885
> Signed-off-by: Richard Gong <richard.gong@amd.com>
> ---
> v2: correct commit description
>      move the check from chip family to problematic platform
> ---
>   drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++-
>   1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
> index 039b90cdc3bc..8b4eaf54b23e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -81,6 +81,10 @@
>   #include "mxgpu_vi.h"
>   #include "amdgpu_dm.h"
>   
> +#if IS_ENABLED(CONFIG_X86_64)
> +#include <asm/intel-family.h>
> +#endif
> +
>   #define ixPCIE_LC_L1_PM_SUBSTATE	0x100100C6
>   #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK	0x00000001L
>   #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK	0x00000002L
> @@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct amdgpu_device *adev)
>   		WREG32_PCIE(ixPCIE_LC_CNTL, data);
>   }
>   
> +static bool intel_core_apsm_chk(void)

aspm

> +{
> +#if IS_ENABLED(CONFIG_X86_64)
> +	struct cpuinfo_x86 *c = &cpu_data(0);
> +
> +	return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
> +#else
> +	return false;
> +#endif

Please do the check in C code and not the preprocessor.

> +}
> +
>   static void vi_program_aspm(struct amdgpu_device *adev)
>   {
>   	u32 data, data1, orig;
>   	bool bL1SS = false;
>   	bool bClkReqSupport = true;
>   
> -	if (!amdgpu_device_should_use_aspm(adev))
> +	if (!amdgpu_device_should_use_aspm(adev) || intel_core_apsm_chk())
>   		return;
>   
>   	if (adev->flags & AMD_IS_APU ||


Kind regards,

Paul
Nils Wallménius April 10, 2022, 1:54 p.m. UTC | #4
Hi Richard, see inline comment.

Den fre 8 apr. 2022 21:05Richard Gong <richard.gong@amd.com> skrev:

> Active State Power Management (ASPM) feature is enabled since kernel 5.14.
> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
> used with Intel AlderLake based systems to enable ASPM. Using these GFX
> cards as video/display output, Intel Alder Lake based systems will hang
> during suspend/resume.
>
> Add extra check to disable ASPM on Intel AlderLake based systems.
>
> Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885
> Signed-off-by: Richard Gong <richard.gong@amd.com>
> ---
> v2: correct commit description
>     move the check from chip family to problematic platform
> ---
>  drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c
> b/drivers/gpu/drm/amd/amdgpu/vi.c
> index 039b90cdc3bc..8b4eaf54b23e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -81,6 +81,10 @@
>  #include "mxgpu_vi.h"
>  #include "amdgpu_dm.h"
>
> +#if IS_ENABLED(CONFIG_X86_64)
> +#include <asm/intel-family.h>
> +#endif
> +
>  #define ixPCIE_LC_L1_PM_SUBSTATE       0x100100C6
>  #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK
>  0x00000001L
>  #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK   0x00000002L
> @@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct amdgpu_device
> *adev)
>                 WREG32_PCIE(ixPCIE_LC_CNTL, data);
>  }
>

There's a typo in the new function name apsm/aspm. Btw might be worth a
comment why this check is done?

Regards
Nils


> +static bool intel_core_apsm_chk(void)
> +{
> +#if IS_ENABLED(CONFIG_X86_64)
> +       struct cpuinfo_x86 *c = &cpu_data(0);
> +
> +       return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
> +#else
> +       return false;
> +#endif
> +}
> +
>  static void vi_program_aspm(struct amdgpu_device *adev)
>  {
>         u32 data, data1, orig;
>         bool bL1SS = false;
>         bool bClkReqSupport = true;
>
> -       if (!amdgpu_device_should_use_aspm(adev))
> +       if (!amdgpu_device_should_use_aspm(adev) || intel_core_apsm_chk())
>                 return;
>
>         if (adev->flags & AMD_IS_APU ||
> --
> 2.25.1
>
>
Gong, Richard April 11, 2022, 12:27 a.m. UTC | #5
Hi Pail.

On 4/8/2022 7:19 PM, Paul Menzel wrote:
> Dear Richard,
>
>
> Thank you for your patch.
>
> Am 08.04.22 um 21:05 schrieb Richard Gong:
>> Active State Power Management (ASPM) feature is enabled since kernel 
>> 5.14.
>> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
>> used with Intel AlderLake based systems to enable ASPM. Using these GFX
>
> Alder Lake
will correct in the next version.
>
>> cards as video/display output, Intel Alder Lake based systems will hang
>> during suspend/resume.
>
> Please reflow for 75 characters per line.
>
> Also please mention the exact system you had problems with (also 
> firmware versions).
>
>>
>> Add extra check to disable ASPM on Intel AlderLake based systems.
>
> Is that a problem with Intel Alder Lake or the Dell system? Shouldn’t 
> ASPM just be disabled for the problematic cards for the Dell system. 
> You write newer cards worked fine.

There is a problem with Dell system (Dell Precision DT workstation), 
which is based on Intel Alder Lake.

ASPM works just fine on these GPU's. It's more of an issue with whether 
the underlying platform supports ASPM or not.

>
>> Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
>> Link: 
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1885&amp;data=04%7C01%7Crichard.gong%40amd.com%7C6b94ff2249244c04974e08da19bea71b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637850604066094079%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FiF%2Bnwzm5RlClT%2Fv%2B0RJvmVwsc%2FiwV3jCiFq7PB84wM%3D&amp;reserved=0
>> Signed-off-by: Richard Gong <richard.gong@amd.com>
>> ---
>> v2: correct commit description
>>      move the check from chip family to problematic platform
>> ---
>>   drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++-
>>   1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c 
>> b/drivers/gpu/drm/amd/amdgpu/vi.c
>> index 039b90cdc3bc..8b4eaf54b23e 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
>> @@ -81,6 +81,10 @@
>>   #include "mxgpu_vi.h"
>>   #include "amdgpu_dm.h"
>>   +#if IS_ENABLED(CONFIG_X86_64)
>> +#include <asm/intel-family.h>
>> +#endif
>> +
>>   #define ixPCIE_LC_L1_PM_SUBSTATE    0x100100C6
>>   #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 
>> 0x00000001L
>>   #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK 
>> 0x00000002L
>> @@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct 
>> amdgpu_device *adev)
>>           WREG32_PCIE(ixPCIE_LC_CNTL, data);
>>   }
>>   +static bool intel_core_apsm_chk(void)
>
> aspm
s/apsm/aspm in the next version
>
>> +{
>> +#if IS_ENABLED(CONFIG_X86_64)
>> +    struct cpuinfo_x86 *c = &cpu_data(0);
>> +
>> +    return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
>> +#else
>> +    return false;
>> +#endif
>
> Please do the check in C code and not the preprocessor.
followed the pattern with other upsteram drivers.
>
>> +}
>> +
>>   static void vi_program_aspm(struct amdgpu_device *adev)
>>   {
>>       u32 data, data1, orig;
>>       bool bL1SS = false;
>>       bool bClkReqSupport = true;
>>   -    if (!amdgpu_device_should_use_aspm(adev))
>> +    if (!amdgpu_device_should_use_aspm(adev) || intel_core_apsm_chk())
>>           return;
>>         if (adev->flags & AMD_IS_APU ||
>
>
> Kind regards,
>
> Paul

Regards,

Richard
Gong, Richard April 11, 2022, 12:30 a.m. UTC | #6
Hi Nils,

On 4/10/2022 8:54 AM, Nils Wallménius wrote:
> Hi Richard, see inline comment.
>
> Den fre 8 apr. 2022 21:05Richard Gong <richard.gong@amd.com> skrev:
>
>     Active State Power Management (ASPM) feature is enabled since
>     kernel 5.14.
>     There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
>     used with Intel AlderLake based systems to enable ASPM. Using
>     these GFX
>     cards as video/display output, Intel Alder Lake based systems will
>     hang
>     during suspend/resume.
>
>     Add extra check to disable ASPM on Intel AlderLake based systems.
>
>     Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
>     Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885
>     <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1885&data=04%7C01%7Crichard.gong%40amd.com%7Cd46b7fb14c6d44a277d408da1af99f63%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637851956929855129%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=B3SXfB65dqx3EBQzUZh6xCmtpO9ynPj3PvwrWe9Q%2BpU%3D&reserved=0>
>     Signed-off-by: Richard Gong <richard.gong@amd.com>
>     ---
>     v2: correct commit description
>         move the check from chip family to problematic platform
>     ---
>      drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++-
>      1 file changed, 16 insertions(+), 1 deletion(-)
>
>     diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c
>     b/drivers/gpu/drm/amd/amdgpu/vi.c
>     index 039b90cdc3bc..8b4eaf54b23e 100644
>     --- a/drivers/gpu/drm/amd/amdgpu/vi.c
>     +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
>     @@ -81,6 +81,10 @@
>      #include "mxgpu_vi.h"
>      #include "amdgpu_dm.h"
>
>     +#if IS_ENABLED(CONFIG_X86_64)
>     +#include <asm/intel-family.h>
>     +#endif
>     +
>      #define ixPCIE_LC_L1_PM_SUBSTATE       0x100100C6
>      #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK
>          0x00000001L
>      #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK
>      0x00000002L
>     @@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct
>     amdgpu_device *adev)
>                     WREG32_PCIE(ixPCIE_LC_CNTL, data);
>      }
>
>
> There's a typo in the new function name apsm/aspm. Btw might be worth 
> a comment why this check is done?
>
Thanks for review,

s/intel_core_apsm_chk/intel_core_aspm_chk in the next view.

Regards,

Richard

> Regards
> Nils
>
>
>     +static bool intel_core_apsm_chk(void)
>     +{
>     +#if IS_ENABLED(CONFIG_X86_64)
>     +       struct cpuinfo_x86 *c = &cpu_data(0);
>     +
>     +       return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
>     +#else
>     +       return false;
>     +#endif
>     +}
>     +
>      static void vi_program_aspm(struct amdgpu_device *adev)
>      {
>             u32 data, data1, orig;
>             bool bL1SS = false;
>             bool bClkReqSupport = true;
>
>     -       if (!amdgpu_device_should_use_aspm(adev))
>     +       if (!amdgpu_device_should_use_aspm(adev) ||
>     intel_core_apsm_chk())
>                     return;
>
>             if (adev->flags & AMD_IS_APU ||
>     -- 
>     2.25.1
>
Gong, Richard April 11, 2022, 12:37 a.m. UTC | #7
On 4/8/2022 7:19 PM, Paul Menzel wrote:
> Dear Richard,
>
>
> Thank you for your patch.
>
> Am 08.04.22 um 21:05 schrieb Richard Gong:
>> Active State Power Management (ASPM) feature is enabled since kernel 
>> 5.14.
>> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
>> used with Intel AlderLake based systems to enable ASPM. Using these GFX
>
> Alder Lake
Actually there are 2 formats (one with space, another is w/o space) in 
the upstream sources, so I will keep that unchanged and use the format 
w/o space.
>
>> cards as video/display output, Intel Alder Lake based systems will hang
>> during suspend/resume.
>
> Please reflow for 75 characters per line.
>
> Also please mention the exact system you had problems with (also 
> firmware versions).
>
>>
>> Add extra check to disable ASPM on Intel AlderLake based systems.
>
> Is that a problem with Intel Alder Lake or the Dell system? Shouldn’t 
> ASPM just be disabled for the problematic cards for the Dell system. 
> You write newer cards worked fine.
>
>> Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
>> Link: 
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1885&amp;data=04%7C01%7Crichard.gong%40amd.com%7C6b94ff2249244c04974e08da19bea71b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637850604066094079%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FiF%2Bnwzm5RlClT%2Fv%2B0RJvmVwsc%2FiwV3jCiFq7PB84wM%3D&amp;reserved=0
>> Signed-off-by: Richard Gong <richard.gong@amd.com>
>> ---
>> v2: correct commit description
>>      move the check from chip family to problematic platform
>> ---
>>   drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++-
>>   1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c 
>> b/drivers/gpu/drm/amd/amdgpu/vi.c
>> index 039b90cdc3bc..8b4eaf54b23e 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
>> @@ -81,6 +81,10 @@
>>   #include "mxgpu_vi.h"
>>   #include "amdgpu_dm.h"
>>   +#if IS_ENABLED(CONFIG_X86_64)
>> +#include <asm/intel-family.h>
>> +#endif
>> +
>>   #define ixPCIE_LC_L1_PM_SUBSTATE    0x100100C6
>>   #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 
>> 0x00000001L
>>   #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK 
>> 0x00000002L
>> @@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct 
>> amdgpu_device *adev)
>>           WREG32_PCIE(ixPCIE_LC_CNTL, data);
>>   }
>>   +static bool intel_core_apsm_chk(void)
>
> aspm
>
>> +{
>> +#if IS_ENABLED(CONFIG_X86_64)
>> +    struct cpuinfo_x86 *c = &cpu_data(0);
>> +
>> +    return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
>> +#else
>> +    return false;
>> +#endif
>
> Please do the check in C code and not the preprocessor.
>
>> +}
>> +
>>   static void vi_program_aspm(struct amdgpu_device *adev)
>>   {
>>       u32 data, data1, orig;
>>       bool bL1SS = false;
>>       bool bClkReqSupport = true;
>>   -    if (!amdgpu_device_should_use_aspm(adev))
>> +    if (!amdgpu_device_should_use_aspm(adev) || intel_core_apsm_chk())
>>           return;
>>         if (adev->flags & AMD_IS_APU ||
>
>
> Kind regards,
>
> Paul
Lazar, Lijo April 11, 2022, 4:15 a.m. UTC | #8
On 4/9/2022 12:35 AM, Richard Gong wrote:
> Active State Power Management (ASPM) feature is enabled since kernel 5.14.
> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
> used with Intel AlderLake based systems to enable ASPM. Using these GFX
> cards as video/display output, Intel Alder Lake based systems will hang
> during suspend/resume.
> 
> Add extra check to disable ASPM on Intel AlderLake based systems.
> 
> Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885
> Signed-off-by: Richard Gong <richard.gong@amd.com>
> ---
> v2: correct commit description
>      move the check from chip family to problematic platform
> ---
>   drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++-
>   1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
> index 039b90cdc3bc..8b4eaf54b23e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -81,6 +81,10 @@
>   #include "mxgpu_vi.h"
>   #include "amdgpu_dm.h"
>   
> +#if IS_ENABLED(CONFIG_X86_64)
> +#include <asm/intel-family.h>
> +#endif
> +
>   #define ixPCIE_LC_L1_PM_SUBSTATE	0x100100C6
>   #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK	0x00000001L
>   #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK	0x00000002L
> @@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct amdgpu_device *adev)
>   		WREG32_PCIE(ixPCIE_LC_CNTL, data);
>   }
>   
> +static bool intel_core_apsm_chk(void)

If this is only for Dell systems, use DMI_SYS_VENDOR/DMI_PRODUCT_NAME to 
identify the platform information from SMBIOS.

Better to rename to aspm_support_quirk_check() or similar, and return 
false on is_alderlake() or is_dell_xyz();

Thanks,
Lijo

> +{
> +#if IS_ENABLED(CONFIG_X86_64)
> +	struct cpuinfo_x86 *c = &cpu_data(0);
> +
> +	return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
> +#else
> +	return false;
> +#endif
> +}
> +
>   static void vi_program_aspm(struct amdgpu_device *adev)
>   {
>   	u32 data, data1, orig;
>   	bool bL1SS = false;
>   	bool bClkReqSupport = true;
>   
> -	if (!amdgpu_device_should_use_aspm(adev))
> +	if (!amdgpu_device_should_use_aspm(adev) || intel_core_apsm_chk())
>   		return;
>   
>   	if (adev->flags & AMD_IS_APU ||
>
Paul Menzel April 11, 2022, 7:37 a.m. UTC | #9
Dear Richard,


Thank you for your response, but please reply to your own reply next time.

Am 11.04.22 um 02:37 schrieb Gong, Richard:
> 
> On 4/8/2022 7:19 PM, Paul Menzel wrote:

>> Thank you for your patch.
>>
>> Am 08.04.22 um 21:05 schrieb Richard Gong:
>>> Active State Power Management (ASPM) feature is enabled since kernel 
>>> 5.14.
>>> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
>>> used with Intel AlderLake based systems to enable ASPM. Using these GFX
>>
>> Alder Lake
> Actually there are 2 formats (one with space, another is w/o space) in 
> the upstream sources, so I will keep that unchanged and use the format 
> w/o space.

Do you mean the Linux kernel sources? Anyway, please use the correct 
spelling [1].


Kind regards,

Paul


[1]: 
https://ark.intel.com/content/www/us/en/ark/products/codename/147470/products-formerly-alder-lake.html
[2]: https://en.wikipedia.org/wiki/Alder_Lake
Paul Menzel April 11, 2022, 7:41 a.m. UTC | #10
[Cc: +<Dell.Client.Kernel@dell.com>]

Dear Richard,


Am 11.04.22 um 02:27 schrieb Gong, Richard:

> On 4/8/2022 7:19 PM, Paul Menzel wrote:

>> Am 08.04.22 um 21:05 schrieb Richard Gong:
>>> Active State Power Management (ASPM) feature is enabled since kernel 5.14.
>>> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
>>> used with Intel AlderLake based systems to enable ASPM. Using these GFX
>>
>> Alder Lake
> will correct in the next version.
>>
>>> cards as video/display output, Intel Alder Lake based systems will hang
>>> during suspend/resume.
>>
>> Please reflow for 75 characters per line.
>>
>> Also please mention the exact system you had problems with (also 
>> firmware versions).
>>
>>>
>>> Add extra check to disable ASPM on Intel AlderLake based systems.
>>
>> Is that a problem with Intel Alder Lake or the Dell system? Shouldn’t 
>> ASPM just be disabled for the problematic cards for the Dell system. 
>> You write newer cards worked fine.
> 
> There is a problem with Dell system (Dell Precision DT workstation), 
> which is based on Intel Alder Lake.
> 
> ASPM works just fine on these GPU's. It's more of an issue with whether 
> the underlying platform supports ASPM or not.

At least you didn’t document what the real issue is, that ASPM does not 
work. With current information (some GPU graphics card with the the Dell 
system and others don’t), it could be the GPU, the Dell system 
(firmware, …), a problem with Alder Lake SOC, or another bug. I hope you 
are in contact with Dell to analyze it, so ASPM can be enabled again.

[…]


Kind regards,

Paul
Gong, Richard April 11, 2022, 11:11 a.m. UTC | #11
Hi Lijo,

On 4/10/2022 11:15 PM, Lazar, Lijo wrote:
>
>
> On 4/9/2022 12:35 AM, Richard Gong wrote:
>> Active State Power Management (ASPM) feature is enabled since kernel 
>> 5.14.
>> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
>> used with Intel AlderLake based systems to enable ASPM. Using these GFX
>> cards as video/display output, Intel Alder Lake based systems will hang
>> during suspend/resume.
>>
>> Add extra check to disable ASPM on Intel AlderLake based systems.
>>
>> Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
>> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885
>> Signed-off-by: Richard Gong <richard.gong@amd.com>
>> ---
>> v2: correct commit description
>>      move the check from chip family to problematic platform
>> ---
>>   drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++-
>>   1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c 
>> b/drivers/gpu/drm/amd/amdgpu/vi.c
>> index 039b90cdc3bc..8b4eaf54b23e 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
>> @@ -81,6 +81,10 @@
>>   #include "mxgpu_vi.h"
>>   #include "amdgpu_dm.h"
>>   +#if IS_ENABLED(CONFIG_X86_64)
>> +#include <asm/intel-family.h>
>> +#endif
>> +
>>   #define ixPCIE_LC_L1_PM_SUBSTATE    0x100100C6
>>   #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 
>> 0x00000001L
>>   #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK 
>> 0x00000002L
>> @@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct 
>> amdgpu_device *adev)
>>           WREG32_PCIE(ixPCIE_LC_CNTL, data);
>>   }
>>   +static bool intel_core_apsm_chk(void)
>
> If this is only for Dell systems, use DMI_SYS_VENDOR/DMI_PRODUCT_NAME 
> to identify the platform information from SMBIOS.
Not sure, the report issue was originally for Dell system but may occur 
with others. This is why I just check CPU info.
>
> Better to rename to aspm_support_quirk_check() or similar, and return 
> false on is_alderlake() or is_dell_xyz();
>
Ok, will rename to aspm_support_quick_check in the next versin.

> Thanks,
> Lijo
>
>> +{
>> +#if IS_ENABLED(CONFIG_X86_64)
>> +    struct cpuinfo_x86 *c = &cpu_data(0);
>> +
>> +    return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
>> +#else
>> +    return false;
>> +#endif
>> +}
>> +
>>   static void vi_program_aspm(struct amdgpu_device *adev)
>>   {
>>       u32 data, data1, orig;
>>       bool bL1SS = false;
>>       bool bClkReqSupport = true;
>>   -    if (!amdgpu_device_should_use_aspm(adev))
>> +    if (!amdgpu_device_should_use_aspm(adev) || intel_core_apsm_chk())
>>           return;
>>         if (adev->flags & AMD_IS_APU ||
>>
Gong, Richard April 11, 2022, 11:38 a.m. UTC | #12
Hi Paul,

On 4/11/2022 2:41 AM, Paul Menzel wrote:
> [Cc: +<Dell.Client.Kernel@dell.com>]
>
> Dear Richard,
>
>
> Am 11.04.22 um 02:27 schrieb Gong, Richard:
>
>> On 4/8/2022 7:19 PM, Paul Menzel wrote:
>
>>> Am 08.04.22 um 21:05 schrieb Richard Gong:
>>>> Active State Power Management (ASPM) feature is enabled since 
>>>> kernel 5.14.
>>>> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
>>>> used with Intel AlderLake based systems to enable ASPM. Using these 
>>>> GFX
>>>
>>> Alder Lake
>> will correct in the next version.
>>>
>>>> cards as video/display output, Intel Alder Lake based systems will 
>>>> hang
>>>> during suspend/resume.
>>>
>>> Please reflow for 75 characters per line.
>>>
>>> Also please mention the exact system you had problems with (also 
>>> firmware versions).
>>>
>>>>
>>>> Add extra check to disable ASPM on Intel AlderLake based systems.
>>>
>>> Is that a problem with Intel Alder Lake or the Dell system? 
>>> Shouldn’t ASPM just be disabled for the problematic cards for the 
>>> Dell system. You write newer cards worked fine.
>>
>> There is a problem with Dell system (Dell Precision DT workstation), 
>> which is based on Intel Alder Lake.
>>
>> ASPM works just fine on these GPU's. It's more of an issue with 
>> whether the underlying platform supports ASPM or not.
>
> At least you didn’t document what the real issue is,

You can refer to bug tag from the comment messages.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885

Regards,

Richard

> that ASPM does not work. With current information (some GPU graphics 
> card with the the Dell system and others don’t), it could be the GPU, 
> the Dell system (firmware, …), a problem with Alder Lake SOC, or 
> another bug. I hope you are in contact with Dell to analyze it, so 
> ASPM can be enabled again.
>
> […]
>
>
> Kind regards,
>
> Paul
Paul Menzel April 11, 2022, 11:45 a.m. UTC | #13
Dear Richard,


Am 11.04.22 um 13:38 schrieb Gong, Richard:

> On 4/11/2022 2:41 AM, Paul Menzel wrote:
>> [Cc: +<Dell.Client.Kernel@dell.com>]

>> Am 11.04.22 um 02:27 schrieb Gong, Richard:
>>
>>> On 4/8/2022 7:19 PM, Paul Menzel wrote:
>>
>>>> Am 08.04.22 um 21:05 schrieb Richard Gong:
>>>>> Active State Power Management (ASPM) feature is enabled since 
>>>>> kernel 5.14.
>>>>> There are some AMD GFX cards (such as WX3200 and RX640) that cannot be
>>>>> used with Intel AlderLake based systems to enable ASPM. Using these 
>>>>> GFX
>>>>
>>>> Alder Lake
>>> will correct in the next version.
>>>>
>>>>> cards as video/display output, Intel Alder Lake based systems will hang
>>>>> during suspend/resume.
>>>>
>>>> Please reflow for 75 characters per line.
>>>>
>>>> Also please mention the exact system you had problems with (also 
>>>> firmware versions).
>>>>
>>>>>
>>>>> Add extra check to disable ASPM on Intel AlderLake based systems.
>>>>
>>>> Is that a problem with Intel Alder Lake or the Dell system? 
>>>> Shouldn’t ASPM just be disabled for the problematic cards for the 
>>>> Dell system. You write newer cards worked fine.
>>>
>>> There is a problem with Dell system (Dell Precision DT workstation), 
>>> which is based on Intel Alder Lake.
>>>
>>> ASPM works just fine on these GPU's. It's more of an issue with 
>>> whether the underlying platform supports ASPM or not.
>>
>> At least you didn’t document what the real issue is,
> 
> You can refer to bug tag from the comment messages.
> 
> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885

No, the commit message should be self-contained, and reviewers and 
readers of the commit message not required to read comments of bug 
reports. Please add the necessary information to the commit message.


Kind regards,

Paul


>> that ASPM does not work. With current information (some GPU graphics 
>> card with the the Dell system and others don’t), it could be the GPU, 
>> the Dell system (firmware, …), a problem with Alder Lake SOC, or 
>> another bug. I hope you are in contact with Dell to analyze it, so 
>> ASPM can be enabled again.
>>
>> […]
>>
>>
>> Kind regards,
>>
>> Paul
kernel test robot April 11, 2022, 10:57 p.m. UTC | #14
Hi Richard,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm/drm-next]
[also build test ERROR on v5.18-rc2 next-20220411]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Richard-Gong/drm-amdgpu-disable-ASPM-on-Intel-AlderLake-based-systems/20220409-030656
base:   git://anongit.freedesktop.org/drm/drm drm-next
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20220412/202204120618.4I6dOUw9-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/bb9a037cafa91918c2ece823591d1d04b812ae17
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Richard-Gong/drm-amdgpu-disable-ASPM-on-Intel-AlderLake-based-systems/20220409-030656
        git checkout bb9a037cafa91918c2ece823591d1d04b812ae17
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=um SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/mutex.h:19,
                    from include/linux/kernfs.h:11,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/pci.h:35,
                    from drivers/gpu/drm/amd/amdgpu/vi.c:24:
   drivers/gpu/drm/amd/amdgpu/vi.c: In function 'intel_core_apsm_chk':
   arch/um/include/asm/processor-generic.h:103:19: error: called object is not a function or function pointer
     103 | #define cpu_data (&boot_cpu_data)
         |                  ~^~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/vi.c:1144:34: note: in expansion of macro 'cpu_data'
    1144 |         struct cpuinfo_x86 *c = &cpu_data(0);
         |                                  ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/vi.c:1146:18: error: invalid use of undefined type 'struct cpuinfo_x86'
    1146 |         return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
         |                  ^~
   drivers/gpu/drm/amd/amdgpu/vi.c:1146:33: error: invalid use of undefined type 'struct cpuinfo_x86'
    1146 |         return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
         |                                 ^~
   drivers/gpu/drm/amd/amdgpu/vi.c:1150:1: error: control reaches end of non-void function [-Werror=return-type]
    1150 | }
         | ^
   cc1: some warnings being treated as errors


vim +1146 drivers/gpu/drm/amd/amdgpu/vi.c

  1140	
  1141	static bool intel_core_apsm_chk(void)
  1142	{
  1143	#if IS_ENABLED(CONFIG_X86_64)
  1144		struct cpuinfo_x86 *c = &cpu_data(0);
  1145	
> 1146		return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
  1147	#else
  1148		return false;
  1149	#endif
  1150	}
  1151
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 039b90cdc3bc..8b4eaf54b23e 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -81,6 +81,10 @@ 
 #include "mxgpu_vi.h"
 #include "amdgpu_dm.h"
 
+#if IS_ENABLED(CONFIG_X86_64)
+#include <asm/intel-family.h>
+#endif
+
 #define ixPCIE_LC_L1_PM_SUBSTATE	0x100100C6
 #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK	0x00000001L
 #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK	0x00000002L
@@ -1134,13 +1138,24 @@  static void vi_enable_aspm(struct amdgpu_device *adev)
 		WREG32_PCIE(ixPCIE_LC_CNTL, data);
 }
 
+static bool intel_core_apsm_chk(void)
+{
+#if IS_ENABLED(CONFIG_X86_64)
+	struct cpuinfo_x86 *c = &cpu_data(0);
+
+	return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
+#else
+	return false;
+#endif
+}
+
 static void vi_program_aspm(struct amdgpu_device *adev)
 {
 	u32 data, data1, orig;
 	bool bL1SS = false;
 	bool bClkReqSupport = true;
 
-	if (!amdgpu_device_should_use_aspm(adev))
+	if (!amdgpu_device_should_use_aspm(adev) || intel_core_apsm_chk())
 		return;
 
 	if (adev->flags & AMD_IS_APU ||