Skip to contentSkip to conversation

drm/amdgpu: enable S/G display on PCO and RV2

PATCH In review Alex Deucher 5 participants 8 messages Jan 7, 2020 – Jan 8, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu: enable S/G display on PCO and RV2

It should work on all Raven variants, but some users have reported issues with original Raven with IOMMU enabled. So far there have been no issues observed with PCO or RV2.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   | 22 ++++++++++++++-----
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 ++++++++++-----
 2 files changed, 28 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +16 -6
index 4e699071d144..6d520a3eec40 100644
@@ -513,13 +513,23 @@ uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev,
 	 * will not allow USWC mappings.
 	 * Also, don't allow GTT domain if the BO doens't have USWC falg set.
 	 */
-	if (adev->asic_type >= CHIP_CARRIZO &&
-	    adev->asic_type < CHIP_RAVEN &&
-	    (adev->flags & AMD_IS_APU) &&
-	    (bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) &&
+	if ((bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) &&
 	    amdgpu_bo_support_uswc(bo_flags) &&
-	    amdgpu_device_asic_has_dc_support(adev->asic_type))
-		domain |= AMDGPU_GEM_DOMAIN_GTT;
+	    amdgpu_device_asic_has_dc_support(adev->asic_type)) {
+		switch (adev->asic_type) {
+		case CHIP_CARRIZO:
+		case CHIP_STONEY:
+			domain |= AMDGPU_GEM_DOMAIN_GTT;
+			break;
+		case CHIP_RAVEN:
+			/* enable S/G on PCO and RV2 */
+			if (adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
+				domain |= AMDGPU_GEM_DOMAIN_GTT;
+			break;
+		default:
+			break;
+		}
+	}
 #endif
 
 	return domain;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +12 -6
index b998b0382477..05118c8860f9 100644
@@ -906,13 +906,19 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
 	init_data.dce_environment = DCE_ENV_PRODUCTION_DRV;
 
-	/*
-	 * TODO debug why this doesn't work on Raven
-	 */
-	if (adev->flags & AMD_IS_APU &&
-	    adev->asic_type >= CHIP_CARRIZO &&
-	    adev->asic_type < CHIP_RAVEN)
+	switch (adev->asic_type) {
+	case CHIP_CARRIZO:
+	case CHIP_STONEY:
 		init_data.flags.gpu_vm_support = true;
+		break;
+	case CHIP_RAVEN:
+		/* enable S/G on PCO and RV2 */
+		if (adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
+			init_data.flags.gpu_vm_support = true;
+		break;
+	default:
+		break;
+	}
 
 	if (amdgpu_dc_feature_mask & DC_FBC_MASK)
 		init_data.flags.fbc_support = true;
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw

PATCH 2/2 drm/amdgpu: enable S/G display for renoir

Everything is in place so go ahead and enable this for renoir.

---

I don't have a renoir board handy. Can someone test this?

 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c       | 1 +
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -0
index 6d520a3eec40..318605ca9bc3 100644
@@ -519,6 +519,7 @@ uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev,
 		switch (adev->asic_type) {
 		case CHIP_CARRIZO:
 		case CHIP_STONEY:
+		case CHIP_RENOIR:
 			domain |= AMDGPU_GEM_DOMAIN_GTT;
 			break;
 		case CHIP_RAVEN:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
index 05118c8860f9..3be7ab0ce9e3 100644
@@ -909,6 +909,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 	switch (adev->asic_type) {
 	case CHIP_CARRIZO:
 	case CHIP_STONEY:
+	case CHIP_RENOIR:
 		init_data.flags.gpu_vm_support = true;
 		break;
 	case CHIP_RAVEN:
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#2 lore raw

RE: [PATCH 2/2] drm/amdgpu: enable S/G display for renoir

Reviewed & Tested-by: Aaron Liu <[email protected]>

BR,
Aaron Liu

Quoted 50 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, January 8, 2020 5:13 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: enable S/G display for renoir

Everything is in place so go ahead and enable this for renoir.

---

I don't have a renoir board handy. Can someone test this?

 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c       | 1 +
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -0
index 6d520a3eec40..318605ca9bc3 100644
@@ -519,6 +519,7 @@ uint32_t amdgpu_display_supported_domains(struct
 amdgpu_device *adev,
 		switch (adev->asic_type) {
 		case CHIP_CARRIZO:
 		case CHIP_STONEY:
+		case CHIP_RENOIR:
 			domain |= AMDGPU_GEM_DOMAIN_GTT;
 			break;
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
 		case CHIP_RAVEN:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
index 05118c8860f9..3be7ab0ce9e3 100644
@@ -909,6 +909,7 @@ static int amdgpu_dm_init(struct amdgpu_device
 *adev)
 	switch (adev->asic_type) {
 	case CHIP_CARRIZO:
 	case CHIP_STONEY:
+	case CHIP_RENOIR:
 		init_data.flags.gpu_vm_support = true;
 		break;

case CHIP_RAVEN:
--
2.24.1

Quoted 9 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.f
reedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&amp;data=02%7C01%7Caaron.liu%40amd.com%7Cd9cdd08e60a942e97c 6a08d793b67ea1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6 37140284454500549&amp;sdata=TGuS5qqX8siW1sxWUZtQggnk4P2RPjxUiLk dvS1Fcog%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw

RE: [PATCH 2/2] drm/amdgpu: enable S/G display for renoir

[AMD Official Use Only - Internal Distribution Only]

Quoted 10 lines

-----Original Message-----
From: Liu, Aaron <[email protected]>
Sent: Tuesday, January 7, 2020 9:48 PM
To: Alex Deucher <[email protected]>; amd- [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: RE: [PATCH 2/2] drm/amdgpu: enable S/G display for renoir

Reviewed & Tested-by: Aaron Liu <[email protected]>

Did you test with limited vram? E.g, set the carve out to 32 or 64 MB so the driver actually uses gart for display?

Thanks,

Alex

Quoted 62 lines

BR,
Aaron Liu

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t

Quoted 25 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, January 8, 2020 5:13 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: enable S/G display for renoir

Everything is in place so go ahead and enable this for renoir.

---

I don't have a renoir board handy. Can someone test this?

 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c       | 1 +
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
index 6d520a3eec40..318605ca9bc3 100644
@@ -519,6 +519,7 @@ uint32_t

amdgpu_display_supported_domains(struct

Quoted 25 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -0
 amdgpu_device *adev,
 		switch (adev->asic_type) {
 		case CHIP_CARRIZO:
 		case CHIP_STONEY:
+		case CHIP_RENOIR:
 			domain |= AMDGPU_GEM_DOMAIN_GTT;
 			break;
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
 		case CHIP_RAVEN:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
index 05118c8860f9..3be7ab0ce9e3 100644
@@ -909,6 +909,7 @@ static int amdgpu_dm_init(struct amdgpu_device
 *adev)
 	switch (adev->asic_type) {
 	case CHIP_CARRIZO:
 	case CHIP_STONEY:
+	case CHIP_RENOIR:
 		init_data.flags.gpu_vm_support = true;
 		break;

case CHIP_RAVEN:
--
2.24.1

Quoted 7 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
s.f
reedesktop.org%2Fmailman%2Flistinfo%2Famd-

gfx&amp;data=02%7C01%7Caaron.liu%40amd.com%7Cd9cdd08e60a942e97c

Quoted 4 lines
Quoted 2 lines

6a08d793b67ea1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6

37140284454500549&amp;sdata=TGuS5qqX8siW1sxWUZtQggnk4P2RPjxUiLk

Quoted 1 line

dvS1Fcog%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#4 lore raw

RE: [PATCH 2/2] drm/amdgpu: enable S/G display for renoir

Quoted 17 lines

-----Original Message-----
From: Deucher, Alexander <[email protected]>
Sent: Wednesday, January 8, 2020 11:05 AM
To: Liu, Aaron <[email protected]>; Alex Deucher <[email protected]>; [email protected]
Subject: RE: [PATCH 2/2] drm/amdgpu: enable S/G display for renoir

[AMD Official Use Only - Internal Distribution Only]

Quoted 8 lines

-----Original Message-----
From: Liu, Aaron <[email protected]>
Sent: Tuesday, January 7, 2020 9:48 PM
To: Alex Deucher <[email protected]>; amd- [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: RE: [PATCH 2/2] drm/amdgpu: enable S/G display for renoir

Quoted 6 lines
Quoted 2 lines

Reviewed & Tested-by: Aaron Liu <[email protected]>

Did you test with limited vram? E.g, set the carve out to 32 or 64 MB so the driver actually uses gart for display?

Hi Alex,
If I lower the UMA size to 64M.(UMA default is 512M)
For Renoir and with [PATCH 2/2], white screen appears and ubuntu desktop cannot boot up successfully. For Raven, no matter with or without [PATCH 1/2], the system can bootup normally.

Quoted 67 lines

Thanks,

Alex

Quoted 54 lines

BR,
Aaron Liu

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t

Quoted 25 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, January 8, 2020 5:13 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: enable S/G display for renoir

Everything is in place so go ahead and enable this for renoir.

---

I don't have a renoir board handy. Can someone test this?

 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c       | 1 +
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
index 6d520a3eec40..318605ca9bc3 100644
@@ -519,6 +519,7 @@ uint32_t

amdgpu_display_supported_domains(struct

Quoted 25 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -0
 amdgpu_device *adev,
 		switch (adev->asic_type) {
 		case CHIP_CARRIZO:
 		case CHIP_STONEY:
+		case CHIP_RENOIR:
 			domain |= AMDGPU_GEM_DOMAIN_GTT;
 			break;
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
 		case CHIP_RAVEN:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
index 05118c8860f9..3be7ab0ce9e3 100644
@@ -909,6 +909,7 @@ static int amdgpu_dm_init(struct amdgpu_device
 *adev)
 	switch (adev->asic_type) {
 	case CHIP_CARRIZO:
 	case CHIP_STONEY:
+	case CHIP_RENOIR:
 		init_data.flags.gpu_vm_support = true;
 		break;

case CHIP_RAVEN:
--
2.24.1

Quoted 9 lines
Quoted 8 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
st
s.f
reedesktop.org%2Fmailman%2Flistinfo%2Famd-

Quoted 7 lines

gfx&amp;data=02%7C01%7Caaron.liu%40amd.com%7Cd9cdd08e60a942e97c

Quoted 1 line
Quoted 1 line

6a08d793b67ea1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6

Quoted 2 lines
Quoted 1 line

37140284454500549&amp;sdata=TGuS5qqX8siW1sxWUZtQggnk4P2RPjxUiLk

Quoted 1 line
Quoted 1 line

dvS1Fcog%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] drm/amdgpu: enable S/G display for renoir

In reply to Alex Deucher

Series is

Harry

Quoted 30 lines · Alex Deucher

Everything is in place so go ahead and enable this for renoir.

---

I don't have a renoir board handy. Can someone test this?

 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c       | 1 +
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -0
index 6d520a3eec40..318605ca9bc3 100644
@@ -519,6 +519,7 @@ uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev,
 		switch (adev->asic_type) {
 		case CHIP_CARRIZO:
 		case CHIP_STONEY:
+		case CHIP_RENOIR:
 			domain |= AMDGPU_GEM_DOMAIN_GTT;
 			break;
 		case CHIP_RAVEN:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 05118c8860f9..3be7ab0ce9e3 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_init(struct amdgpu_device *adev) · line 915

Quoted 7 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
@@ -909,6 +909,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 	switch (adev->asic_type) {
 	case CHIP_CARRIZO:
 	case CHIP_STONEY:
+	case CHIP_RENOIR:
 		init_data.flags.gpu_vm_support = true;
 		break;
 	case CHIP_RAVEN:

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#6 lore raw
In reply to Alex Deucher

Am 07.01.20 um 22:13 schrieb Alex Deucher:

Quoted 61 lines

It should work on all Raven variants, but some users have reported issues with original Raven with IOMMU enabled. So far there have been no issues observed with PCO or RV2.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   | 22 ++++++++++++++-----
  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 ++++++++++-----
  2 files changed, 28 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +16 -6
index 4e699071d144..6d520a3eec40 100644
@@ -513,13 +513,23 @@ uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev,
  	 * will not allow USWC mappings.
  	 * Also, don't allow GTT domain if the BO doens't have USWC falg set.
  	 */
-	if (adev->asic_type >= CHIP_CARRIZO &&
-	    adev->asic_type < CHIP_RAVEN &&
-	    (adev->flags & AMD_IS_APU) &&
-	    (bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) &&
+	if ((bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) &&
  	    amdgpu_bo_support_uswc(bo_flags) &&
-	    amdgpu_device_asic_has_dc_support(adev->asic_type))
-		domain |= AMDGPU_GEM_DOMAIN_GTT;
+	    amdgpu_device_asic_has_dc_support(adev->asic_type)) {
+		switch (adev->asic_type) {
+		case CHIP_CARRIZO:
+		case CHIP_STONEY:
+			domain |= AMDGPU_GEM_DOMAIN_GTT;
+			break;
+		case CHIP_RAVEN:
+			/* enable S/G on PCO and RV2 */
+			if (adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
+				domain |= AMDGPU_GEM_DOMAIN_GTT;
+			break;
+		default:
+			break;
+		}
+	}
  #endif
 
  	return domain;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -6
index b998b0382477..05118c8860f9 100644
@@ -906,13 +906,19 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
  	init_data.dce_environment = DCE_ENV_PRODUCTION_DRV;
 
-	/*
-	 * TODO debug why this doesn't work on Raven
-	 */
-	if (adev->flags & AMD_IS_APU &&
-	    adev->asic_type >= CHIP_CARRIZO &&
-	    adev->asic_type < CHIP_RAVEN)
+	switch (adev->asic_type) {
+	case CHIP_CARRIZO:
+	case CHIP_STONEY:

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_init(struct amdgpu_device *adev) · line 921

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +9 -0
  		init_data.flags.gpu_vm_support = true;
+		break;
+	case CHIP_RAVEN:
+		/* enable S/G on PCO and RV2 */
+		if (adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
+			init_data.flags.gpu_vm_support = true;
+		break;
+	default:
+		break;
+	}

It might be a good idea to enable gpu_vm_support independent anyway.

Might be even a good idea to do this in a separate patch.

But either way I'm not an expert on how the hardware works in this area, so Acked-by: Christian König <[email protected]> for this series either way.

Regards,
Christian.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_init(struct amdgpu_device *adev) · line 924

Quoted 3 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
  	if (amdgpu_dc_feature_mask & DC_FBC_MASK)
  		init_data.flags.fbc_support = true;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#7 lore raw
Quoted 76 lines · Christian König

Am 07.01.20 um 22:13 schrieb Alex Deucher:

Quoted 61 lines

It should work on all Raven variants, but some users have reported issues with original Raven with IOMMU enabled. So far there have been no issues observed with PCO or RV2.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   | 22 ++++++++++++++-----
  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 ++++++++++-----
  2 files changed, 28 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +16 -6
index 4e699071d144..6d520a3eec40 100644
@@ -513,13 +513,23 @@ uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev,
       * will not allow USWC mappings.
       * Also, don't allow GTT domain if the BO doens't have USWC falg set.
       */
-     if (adev->asic_type >= CHIP_CARRIZO &&
-         adev->asic_type < CHIP_RAVEN &&
-         (adev->flags & AMD_IS_APU) &&
-         (bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) &&
+     if ((bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) &&
          amdgpu_bo_support_uswc(bo_flags) &&
-         amdgpu_device_asic_has_dc_support(adev->asic_type))
-             domain |= AMDGPU_GEM_DOMAIN_GTT;
+         amdgpu_device_asic_has_dc_support(adev->asic_type)) {
+             switch (adev->asic_type) {
+             case CHIP_CARRIZO:
+             case CHIP_STONEY:
+                     domain |= AMDGPU_GEM_DOMAIN_GTT;
+                     break;
+             case CHIP_RAVEN:
+                     /* enable S/G on PCO and RV2 */
+                     if (adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
+                             domain |= AMDGPU_GEM_DOMAIN_GTT;
+                     break;
+             default:
+                     break;
+             }
+     }
  #endif
 
      return domain;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -6
index b998b0382477..05118c8860f9 100644
@@ -906,13 +906,19 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
      init_data.dce_environment = DCE_ENV_PRODUCTION_DRV;
 
-     /*
-      * TODO debug why this doesn't work on Raven
-      */
-     if (adev->flags & AMD_IS_APU &&
-         adev->asic_type >= CHIP_CARRIZO &&
-         adev->asic_type < CHIP_RAVEN)
+     switch (adev->asic_type) {
+     case CHIP_CARRIZO:
+     case CHIP_STONEY:

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_init(struct amdgpu_device *adev) · line 921

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +9 -0
              init_data.flags.gpu_vm_support = true;
+             break;
+     case CHIP_RAVEN:
+             /* enable S/G on PCO and RV2 */
+             if (adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
+                     init_data.flags.gpu_vm_support = true;
+             break;
+     default:
+             break;
+     }

It might be a good idea to enable gpu_vm_support independent anyway.

Quoted 6 lines

Might be even a good idea to do this in a separate patch.

But either way I'm not an expert on how the hardware works in this area, so Acked-by: Christian König <[email protected]> for this series either way.

Yeah, we can probably just always set the .gpu_vm_support flag if the asic supports it. It won't get enabled unless we add GTT as a valid domain.

Alex

Quoted 7 lines

Regards,
Christian.

Quoted 3 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
      if (amdgpu_dc_feature_mask & DC_FBC_MASK)
              init_data.flags.fbc_support = true;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx