All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: no DC support for headless chips
@ 2021-12-23 19:19 Alex Deucher
  2021-12-24  2:54 ` Chen, Guchun
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Deucher @ 2021-12-23 19:19 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher, tarequemd.hanif

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")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 9dc86c5a1cad..58e2034984de 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -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


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

* RE: [PATCH] drm/amdgpu: no DC support for headless chips
  2021-12-23 19:19 [PATCH] drm/amdgpu: no DC support for headless chips Alex Deucher
@ 2021-12-24  2:54 ` Chen, Guchun
  2021-12-24  6:15   ` Alex Deucher
  0 siblings, 1 reply; 7+ messages in thread
From: Chen, Guchun @ 2021-12-24  2:54 UTC (permalink / raw)
  To: Deucher, Alexander, amd-gfx; +Cc: Deucher, Alexander, tarequemd.hanif

[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 <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Friday, December 24, 2021 3:20 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; tarequemd.hanif@yahoo.com
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")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 9dc86c5a1cad..58e2034984de 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -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

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

* Re: [PATCH] drm/amdgpu: no DC support for headless chips
  2021-12-24  2:54 ` Chen, Guchun
@ 2021-12-24  6:15   ` Alex Deucher
  2021-12-24  8:19     ` Chen, Guchun
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Deucher @ 2021-12-24  6:15 UTC (permalink / raw)
  To: Chen, Guchun; +Cc: Deucher, Alexander, tarequemd.hanif, amd-gfx

On Thu, Dec 23, 2021 at 9:54 PM Chen, Guchun <Guchun.Chen@amd.com> wrote:
>
> [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


>
> Regards,
> Guchun
>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher
> Sent: Friday, December 24, 2021 3:20 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; tarequemd.hanif@yahoo.com
> 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")
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 9dc86c5a1cad..58e2034984de 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -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

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

* RE: [PATCH] drm/amdgpu: no DC support for headless chips
  2021-12-24  6:15   ` Alex Deucher
@ 2021-12-24  8:19     ` Chen, Guchun
  0 siblings, 0 replies; 7+ messages in thread
From: Chen, Guchun @ 2021-12-24  8:19 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Deucher, Alexander, tarequemd.hanif, amd-gfx

[Public]

Hi Alex,

Thanks for clarification. The patch is: Reviewed-by: Guchun Chen <guchun.chen@amd.com> .

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 <alexdeucher@gmail.com> 
Sent: Friday, December 24, 2021 2:16 PM
To: Chen, Guchun <Guchun.Chen@amd.com>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org; tarequemd.hanif@yahoo.com
Subject: Re: [PATCH] drm/amdgpu: no DC support for headless chips

On Thu, Dec 23, 2021 at 9:54 PM Chen, Guchun <Guchun.Chen@amd.com> wrote:
>
> [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


>
> Regards,
> Guchun
>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of 
> Alex Deucher
> Sent: Friday, December 24, 2021 3:20 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; 
> tarequemd.hanif@yahoo.com
> 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")
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 9dc86c5a1cad..58e2034984de 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -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

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

* RE: [PATCH] drm/amdgpu: no DC support for headless chips
  2021-12-27 17:11 Alex Deucher
  2021-12-28  1:54 ` Quan, Evan
@ 2021-12-28  2:43 ` Chen, Guchun
  1 sibling, 0 replies; 7+ messages in thread
From: Chen, Guchun @ 2021-12-28  2:43 UTC (permalink / raw)
  To: Deucher, Alexander, amd-gfx; +Cc: Deucher, Alexander, Tareque Md . Hanif

[Public]

Reviewed-by: Guchun Chen <guchun.chen@amd.com>

Regards,
Guchun

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Tuesday, December 28, 2021 1:12 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Tareque Md . Hanif <tarequemd.hanif@yahoo.com>
Subject: [PATCH] drm/amdgpu: no DC support for headless chips

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

v2: drop Arcturus and Aldebaran

Fixes: f7f12b25823c0d ("drm/amdgpu: default to true in amdgpu_device_asic_has_dc_support")
Reported-by: Tareque Md.Hanif <tarequemd.hanif@yahoo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 9dc86c5a1cad..694c3726e0f4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3166,6 +3166,12 @@ 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:
+		/* chips with no display hardware */
+		return false;
 #if defined(CONFIG_DRM_AMD_DC)
 	case CHIP_TAHITI:
 	case CHIP_PITCAIRN:
--
2.33.1

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

* RE: [PATCH] drm/amdgpu: no DC support for headless chips
  2021-12-27 17:11 Alex Deucher
@ 2021-12-28  1:54 ` Quan, Evan
  2021-12-28  2:43 ` Chen, Guchun
  1 sibling, 0 replies; 7+ messages in thread
From: Quan, Evan @ 2021-12-28  1:54 UTC (permalink / raw)
  To: Deucher, Alexander, amd-gfx; +Cc: Deucher, Alexander, Tareque Md . Hanif

[AMD Official Use Only]

Reviewed-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: Tuesday, December 28, 2021 1:12 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Tareque Md .
> Hanif <tarequemd.hanif@yahoo.com>
> Subject: [PATCH] drm/amdgpu: no DC support for headless chips
> 
> Chips with no display hardware should return false for
> DC support.
> 
> v2: drop Arcturus and Aldebaran
> 
> Fixes: f7f12b25823c0d ("drm/amdgpu: default to true in
> amdgpu_device_asic_has_dc_support")
> Reported-by: Tareque Md.Hanif <tarequemd.hanif@yahoo.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 9dc86c5a1cad..694c3726e0f4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3166,6 +3166,12 @@ 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:
> +		/* chips with no display hardware */
> +		return false;
>  #if defined(CONFIG_DRM_AMD_DC)
>  	case CHIP_TAHITI:
>  	case CHIP_PITCAIRN:
> --
> 2.33.1

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

* [PATCH] drm/amdgpu: no DC support for headless chips
@ 2021-12-27 17:11 Alex Deucher
  2021-12-28  1:54 ` Quan, Evan
  2021-12-28  2:43 ` Chen, Guchun
  0 siblings, 2 replies; 7+ messages in thread
From: Alex Deucher @ 2021-12-27 17:11 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher, Tareque Md . Hanif

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

v2: drop Arcturus and Aldebaran

Fixes: f7f12b25823c0d ("drm/amdgpu: default to true in amdgpu_device_asic_has_dc_support")
Reported-by: Tareque Md.Hanif <tarequemd.hanif@yahoo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 9dc86c5a1cad..694c3726e0f4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3166,6 +3166,12 @@ 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:
+		/* chips with no display hardware */
+		return false;
 #if defined(CONFIG_DRM_AMD_DC)
 	case CHIP_TAHITI:
 	case CHIP_PITCAIRN:
-- 
2.33.1


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

end of thread, other threads:[~2021-12-28  2:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 19:19 [PATCH] drm/amdgpu: no DC support for headless chips Alex Deucher
2021-12-24  2:54 ` Chen, Guchun
2021-12-24  6:15   ` Alex Deucher
2021-12-24  8:19     ` Chen, Guchun
2021-12-27 17:11 Alex Deucher
2021-12-28  1:54 ` Quan, Evan
2021-12-28  2:43 ` Chen, Guchun

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.