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

2022-04-10 Thread Nils Wallménius
Hi Richard, see inline comment.

Den fre 8 apr. 2022 21:05Richard Gong  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 
> ---
> 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 
> +#endif
> +
>  #define ixPCIE_LC_L1_PM_SUBSTATE   0x100100C6
>  #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK
>  0x0001L
>  #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK   0x0002L
> @@ -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
>
>


Lenovo Cezanne — some ip blocks fail on both amdgpu_device_ip_hw_init_phase1 and amdgpu_device_ip_hw_init_phase2

2022-04-10 Thread Innocenti Maresin
Hello.
Sorry to distract the developers for a private busyness, but it’s a
non-trivial diagnostic problem. I bought a laptop where the GPU is
probably faulty or badly misconfigured (note “[drm] BIOS signature
incorrect cc cc” and the next message about memory ranges) but indeed
present. All attempts to use either of two Linux drivers (see
https://linux-hardware.org/?id=cpu:amd-25-80-0-ryzen-7-5800u-with-radeon-graphics&hwid=a26ef811f12f
) failed. Of course, it doesn’t prove anything conclusively, and AMD
virtually turned me around
(https://community.amd.com/t5/graphics/tools-to-check-for-malfunction-of-ryzen-s-gpu/m-p/519397
). But I am reluctant to complain to the manufacturer (namely, Lenovo)
until expend all possibilities to make the stuff work.

The recent attempt to run (modprobe) the open amdgpu driver with
linux-5.16.18 produced:
[ 1234.755272] AMD-Vi: AMD IOMMUv2 loaded and initialized
[ 1234.884288] [drm] amdgpu kernel modesetting enabled.
[ 1234.885947] device class 'kfd': registering
[ 1234.885973] device: 'kfd': device_add
[ 1234.885984] PM: Adding info for No Bus:kfd
[ 1234.886032] amdgpu: Virtual CRAT table created for CPU
[ 1234.886039] amdgpu: Topology: Add CPU node
[ 1234.886506] bus: 'pci': add driver amdgpu
[ 1234.886527] bus: 'pci': __driver_probe_device: matched device
:04:00.0 with driver amdgpu
[ 1234.886531] bus: 'pci': really_probe: probing driver amdgpu with
device :04:00.0
[ 1234.886535] amdgpu :04:00.0: no default pinctrl state
[ 1234.886545] checking generic (b000 13d) vs hw (b000 1000)
[ 1234.886547] checking generic (b000 13d) vs hw (b000 1000)
[ 1234.886548] fb0: switching to amdgpu from VESA VGA
[ 1234.886551] device: 'fb0': device_unregister
[ 1234.886598] PM: Removing info for No Bus:fb0
[ 1234.886607] device: 'fb0': device_create_release
[ 1234.886740] Console: switching to colour dummy device 160x64
[ 1234.886757] device: 'vtcon1': device_unregister
[ 1234.886766] PM: Removing info for No Bus:vtcon1
[ 1234.886774] device: 'vtcon1': device_create_release
[ 1234.886782] amdgpu :04:00.0: vgaarb: deactivate vga console
[ 1234.886899] [drm] initializing kernel modesetting (RENOIR
0x1002:0x1638 0x17AA:0x3809 0xC1).
[ 1234.886901] amdgpu :04:00.0: amdgpu: Trusted Memory Zone (TMZ)
feature enabled
[ 1234.886939] [drm] register mmio base: 0xC070
[ 1234.886940] [drm] register mmio size: 524288
[ 1234.888465] [drm] add ip block number 0 
[ 1234.888466] [drm] add ip block number 1 
[ 1234.888467] [drm] add ip block number 2 
[ 1234.888468] [drm] add ip block number 3 
[ 1234.888468] [drm] add ip block number 4 
[ 1234.888469] [drm] add ip block number 5 
[ 1234.888470] [drm] add ip block number 6 
[ 1234.888470] [drm] add ip block number 7 
[ 1234.888471] [drm] add ip block number 8 
[ 1234.888471] [drm] add ip block number 9 
[ 1234.896313] [drm] BIOS signature incorrect cc cc
[ 1234.896319] resource sanity check: requesting [mem
0x000c-0x000d], which spans more than PCI Bus :00 [mem
0x000c-0x000cbfff window]
[ 1234.896322] caller pci_map_rom+0x73/0x1c0 mapping multiple BARs
[ 1234.898188] amdgpu :04:00.0: amdgpu: Fetched VBIOS from ROM BAR
[ 1234.898189] amdgpu: ATOM BIOS: 113-CEZANNE-X18
[ 1234.905717] [drm] VCN decode is enabled in VM mode
[ 1234.905719] [drm] VCN encode is enabled in VM mode
[ 1234.905720] [drm] JPEG decode is enabled in VM mode
[ 1234.905722] amdgpu :04:00.0: amdgpu: PCIE atomic ops is not supported
[ 1234.905748] [drm] vm size is 262144 GB, 4 levels, block size is
9-bit, fragment size is 9-bit
[ 1234.905754] amdgpu :04:00.0: amdgpu: VRAM: 2048M
0x00F4 - 0x00F47FFF (2048M used)
[ 1234.905756] amdgpu :04:00.0: amdgpu: GART: 1024M
0x - 0x3FFF
[ 1234.905758] amdgpu :04:00.0: amdgpu: AGP: 267419648M
0x00F8 - 0x
[ 1234.905764] [drm] Detected VRAM RAM=2048M, BAR=2048M
[ 1234.905765] [drm] RAM width 128bits DDR4
[ 1234.905822] [drm] amdgpu: 2048M of VRAM memory ready
[ 1234.905824] [drm] amdgpu: 3072M of GTT memory ready.
[ 1234.905828] [drm] GART: num cpu pages 262144, num gpu pages 262144
[ 1234.905961] [drm] PCIE GART of 1024M enabled.
[ 1234.905964] [drm] PTB located at 0x00F4013C7000
[ 1234.906471] amdgpu :04:00.0: amdgpu: PSP runtime database doesn't exist
[ 1234.906956] [drm] Loading DMUB firmware via PSP: version=0x01010020
[ 1234.909652] [drm] Found VCN firmware Version ENC: 1.16 DEC: 5 VEP:
0 Revision: 3
[ 1234.909660] amdgpu :04:00.0: amdgpu: Will use PSP to load VCN firmware
[ 1234.910507] [drm] hw_init (phase1) succeeded for 2 IP blocks of 10,
going forth...
[ 1235.633664] [drm] reserve 0x40 from 0xf47f80 for PSP TMR
[ 1235.643014] [drm] failed to load ucode SDMA0(0x0)
[ 1235.643019] [drm] psp gfx command LOAD_IP_FW(0x6) failed and
response status is (0xF)
[ 1235.643234] [drm] failed to load ucode CP_CE(0x8)
[ 1235.643236] [drm] psp gfx command LOAD_IP_FW(0x6) failed a

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

2022-04-10 Thread Gong, Richard

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&data=04%7C01%7Crichard.gong%40amd.com%7C6b94ff2249244c04974e08da19bea71b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637850604066094079%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2FiF%2Bnwzm5RlClT%2Fv%2B0RJvmVwsc%2FiwV3jCiFq7PB84wM%3D&reserved=0

Signed-off-by: Richard Gong 
---
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 
+#endif
+
  #define ixPCIE_LC_L1_PM_SUBSTATE    0x100100C6
  #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 
0x0001L
  #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK 
0x0002L
@@ -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



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

2022-04-10 Thread Gong, Richard

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  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 
---
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 
+#endif
+
 #define ixPCIE_LC_L1_PM_SUBSTATE       0x100100C6
 #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK
     0x0001L
 #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK
 0x0002L
@@ -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


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

2022-04-10 Thread Gong, Richard



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&data=04%7C01%7Crichard.gong%40amd.com%7C6b94ff2249244c04974e08da19bea71b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637850604066094079%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2FiF%2Bnwzm5RlClT%2Fv%2B0RJvmVwsc%2FiwV3jCiFq7PB84wM%3D&reserved=0

Signed-off-by: Richard Gong 
---
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 
+#endif
+
  #define ixPCIE_LC_L1_PM_SUBSTATE    0x100100C6
  #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 
0x0001L
  #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK 
0x0002L
@@ -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


[V2 1/3] drm/debug: Expose connector's max supported bpc via debugfs

2022-04-10 Thread Bhanuprakash Modem
It's useful to know the connector's max supported bpc for IGT
testing. Expose it via a debugfs file on the connector "output_bpc".

Example: cat /sys/kernel/debug/dri/0/DP-1/output_bpc

V2:
* Fix typo in comments (Harry)

Cc: Jani Nikula 
Cc: Ville Syrjälä 
Cc: Harry Wentland 
Signed-off-by: Bhanuprakash Modem 
---
 drivers/gpu/drm/drm_debugfs.c | 21 +
 1 file changed, 21 insertions(+)

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 7f1b82dbaebb..fb04b7a984de 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -395,6 +395,23 @@ static int vrr_range_show(struct seq_file *m, void *data)
 }
 DEFINE_SHOW_ATTRIBUTE(vrr_range);
 
+/*
+ * Returns Connector's max supported bpc through debugfs file.
+ * Example usage: cat /sys/kernel/debug/dri/0/DP-1/output_bpc
+ */
+static int output_bpc_show(struct seq_file *m, void *data)
+{
+   struct drm_connector *connector = m->private;
+
+   if (connector->status != connector_status_connected)
+   return -ENODEV;
+
+   seq_printf(m, "Maximum: %u\n", connector->display_info.bpc);
+
+   return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(output_bpc);
+
 static const struct file_operations drm_edid_fops = {
.owner = THIS_MODULE,
.open = edid_open,
@@ -437,6 +454,10 @@ void drm_debugfs_connector_add(struct drm_connector 
*connector)
debugfs_create_file("vrr_range", S_IRUGO, root, connector,
&vrr_range_fops);
 
+   /* max bpc */
+   debugfs_create_file("output_bpc", 0444, root, connector,
+   &output_bpc_fops);
+
if (connector->funcs->debugfs_init)
connector->funcs->debugfs_init(connector, root);
 }
-- 
2.35.1



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

2022-04-10 Thread Lazar, Lijo




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 
---
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 
+#endif
+
  #define ixPCIE_LC_L1_PM_SUBSTATE  0x100100C6
  #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK  
0x0001L
  #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK  0x0002L
@@ -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 ||