Skip to contentSkip to conversation

drm/amdgpu: no DC support for headless chips

PATCH In review Alex Deucher 3 participants 4 messages Dec 23, 2021 – Dec 24, 2021

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: no DC support for headless chips

Chips with no display hardware should return false for DC support.

Fixes f7f12b25823c0d ("drm/amdgpu: default to true in amdgpu_device_asic_has_dc_support")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +8 -0
index 9dc86c5a1cad..58e2034984de 100644
@@ -3166,6 +3166,14 @@ static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
 bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
 {
 	switch (asic_type) {
+#ifdef CONFIG_DRM_AMDGPU_SI
+	case CHIP_HAINAN:
+#endif
+	case CHIP_TOPAZ:
+	case CHIP_ARCTURUS:
+	case CHIP_ALDEBARAN:
+		/* chips with no display hardware */
+		return false;
 #if defined(CONFIG_DRM_AMD_DC)
 	case CHIP_TAHITI:
 	case CHIP_PITCAIRN:
Signature · 1 line
2.33.1
#1 lore raw

[Public]

For the first two CHIP_HAINAN and CHIP_TOPAZ, using asic_type is fine. But for CHIP_ARCTURUS and CHIP_ALDEBARAN, I wonder if there is any dc hardware harvesting info carried by harvest table in VBIOS. If that's the case, I think we can drop these two, as we can promise it by checking AMD_HARVEST_IP_DMU_MASK in amdgpu_device_has_dc_support.

Regards,
Guchun

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, December 24, 2021 3:20 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; [email protected]
Subject: [PATCH] drm/amdgpu: no DC support for headless chips

Chips with no display hardware should return false for DC support.

Fixes f7f12b25823c0d ("drm/amdgpu: default to true in amdgpu_device_asic_has_dc_support")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +8 -1
index 9dc86c5a1cad..58e2034984de 100644
@@ -3166,6 +3166,14 @@ static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)  bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)  {
 	switch (asic_type) {
+#ifdef CONFIG_DRM_AMDGPU_SI
+	case CHIP_HAINAN:
+#endif
+	case CHIP_TOPAZ:
+	case CHIP_ARCTURUS:
+	case CHIP_ALDEBARAN:
+		/* chips with no display hardware */
+		return false;
 #if defined(CONFIG_DRM_AMD_DC)
 	case CHIP_TAHITI:
 	case CHIP_PITCAIRN:
--

2.33.1

#2 lore raw
Quoted 4 lines · Guchun

[Public]

For the first two CHIP_HAINAN and CHIP_TOPAZ, using asic_type is fine. But for CHIP_ARCTURUS and CHIP_ALDEBARAN, I wonder if there is any dc hardware harvesting info carried by harvest table in VBIOS. If that's the case, I think we can drop these two, as we can promise it by checking AMD_HARVEST_IP_DMU_MASK in amdgpu_device_has_dc_support.

There is no IP discovery table for these chips, but they don't have any display IPs in the hardcoded IP discovery info in the driver. I don't think this should affect them, but I wasn't sure..

Alex

Quoted 38 lines

Regards,
Guchun

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, December 24, 2021 3:20 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; [email protected]
Subject: [PATCH] drm/amdgpu: no DC support for headless chips

Chips with no display hardware should return false for DC support.

Fixes f7f12b25823c0d ("drm/amdgpu: default to true in amdgpu_device_asic_has_dc_support")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +8 -1
index 9dc86c5a1cad..58e2034984de 100644
@@ -3166,6 +3166,14 @@ static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)  bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)  {
        switch (asic_type) {
+#ifdef CONFIG_DRM_AMDGPU_SI
+       case CHIP_HAINAN:
+#endif
+       case CHIP_TOPAZ:
+       case CHIP_ARCTURUS:
+       case CHIP_ALDEBARAN:
+               /* chips with no display hardware */
+               return false;
 #if defined(CONFIG_DRM_AMD_DC)
        case CHIP_TAHITI:
        case CHIP_PITCAIRN:
--

2.33.1

#3 lore raw

[Public]

Hi Alex,

Thanks for clarification. The patch is: Reviewed-by: Guchun Chen <[email protected]> .

My concern is that amdgpu_device_has_dc_support is called at multiple places. Before this patch, for ARCTURUS and ALDEBARAN, it goes to default case, and returns true by default, but hardcoded IP discovery setting guarantees no DC is initialized on those two, so far, it's fine. However, after this patch, amdgpu_device_has_dc_support will explicitly return false, and accordingly it changed some setting/execution like driver_feature or in suspend/resume. I am not pretty sure about the impact. Anyway, we can re-visit it if there is regression.

Regards,
Guchun

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, December 24, 2021 2:16 PM
To: Chen, Guchun <[email protected]>
Cc: Deucher, Alexander <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH] drm/amdgpu: no DC support for headless chips

Quoted 4 lines · Guchun

[Public]

For the first two CHIP_HAINAN and CHIP_TOPAZ, using asic_type is fine. But for CHIP_ARCTURUS and CHIP_ALDEBARAN, I wonder if there is any dc hardware harvesting info carried by harvest table in VBIOS. If that's the case, I think we can drop these two, as we can promise it by checking AMD_HARVEST_IP_DMU_MASK in amdgpu_device_has_dc_support.

There is no IP discovery table for these chips, but they don't have any display IPs in the hardcoded IP discovery info in the driver. I don't think this should affect them, but I wasn't sure..

Alex

Quoted 42 lines

Regards,
Guchun

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, December 24, 2021 3:20 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; [email protected]
Subject: [PATCH] drm/amdgpu: no DC support for headless chips

Chips with no display hardware should return false for DC support.

Fixes f7f12b25823c0d ("drm/amdgpu: default to true in

amdgpu_device_asic_has_dc_support")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +8 -1
index 9dc86c5a1cad..58e2034984de 100644
@@ -3166,6 +3166,14 @@ static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)  bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)  {
        switch (asic_type) {
+#ifdef CONFIG_DRM_AMDGPU_SI
+       case CHIP_HAINAN:
+#endif
+       case CHIP_TOPAZ:
+       case CHIP_ARCTURUS:
+       case CHIP_ALDEBARAN:
+               /* chips with no display hardware */
+               return false;
 #if defined(CONFIG_DRM_AMD_DC)
        case CHIP_TAHITI:
        case CHIP_PITCAIRN:
--

2.33.1