Skip to contentSkip to conversation

drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting

PATCH In review Leo Liu 2 participants 5 messages Nov 1, 2017 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Leo Liu

author
#0 lore raw

PATCH 1/2 drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting

---
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +4 -0
index 7e4de3e6950f..0c01825a8b9e 100644
@@ -371,6 +371,10 @@ static int uvd_v6_0_early_init(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	if (!(adev->flags & AMD_IS_APU) &&
+	    (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK))
+		return -ENOENT;
+
 	uvd_v6_0_set_ring_funcs(adev);
 
 	if (uvd_v6_0_enc_support(adev)) {
Signature · 6 lines
2.14.1

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#2 lore raw

PATCH 2/2 drm/amdgpu: allow harvesting check for Polaris VCE

---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +6 -6
index 90332f55cfba..cf81065e3c5a 100644
@@ -365,15 +365,10 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
 {
 	u32 tmp;
 
-	/* Fiji, Stoney, Polaris10, Polaris11, Polaris12 are single pipe */
 	if ((adev->asic_type == CHIP_FIJI) ||
-	    (adev->asic_type == CHIP_STONEY) ||
-	    (adev->asic_type == CHIP_POLARIS10) ||
-	    (adev->asic_type == CHIP_POLARIS11) ||
-	    (adev->asic_type == CHIP_POLARIS12))
+	    (adev->asic_type == CHIP_STONEY))
 		return AMDGPU_VCE_HARVEST_VCE1;
 
-	/* Tonga and CZ are dual or single pipe */
 	if (adev->flags & AMD_IS_APU)
 		tmp = (RREG32_SMC(ixVCE_HARVEST_FUSE_MACRO__ADDRESS) &
 		       VCE_HARVEST_FUSE_MACRO__MASK) >>
@@ -391,6 +386,11 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
 	case 3:
 		return AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1;
 	default:
+		if ((adev->asic_type == CHIP_POLARIS10) ||
+		    (adev->asic_type == CHIP_POLARIS11) ||
+		    (adev->asic_type == CHIP_POLARIS12))
+			return AMDGPU_VCE_HARVEST_VCE1;
+
 		return 0;
 	}
 }
Signature · 6 lines
2.14.1

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by
#4 lore raw

Re: [PATCH 2/2] drm/amdgpu: allow harvesting check for Polaris VCE

Quoted 1 line · Leo Liu
Quoted 40 lines
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +6 -7
index 90332f55cfba..cf81065e3c5a 100644
@@ -365,15 +365,10 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
 {
        u32 tmp;
 
-       /* Fiji, Stoney, Polaris10, Polaris11, Polaris12 are single pipe */
        if ((adev->asic_type == CHIP_FIJI) ||
-           (adev->asic_type == CHIP_STONEY) ||
-           (adev->asic_type == CHIP_POLARIS10) ||
-           (adev->asic_type == CHIP_POLARIS11) ||
-           (adev->asic_type == CHIP_POLARIS12))
+           (adev->asic_type == CHIP_STONEY))
                return AMDGPU_VCE_HARVEST_VCE1;
 
-       /* Tonga and CZ are dual or single pipe */
        if (adev->flags & AMD_IS_APU)
                tmp = (RREG32_SMC(ixVCE_HARVEST_FUSE_MACRO__ADDRESS) &
                       VCE_HARVEST_FUSE_MACRO__MASK) >>
@@ -391,6 +386,11 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
        case 3:
                return AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1;
        default:
+               if ((adev->asic_type == CHIP_POLARIS10) ||
+                   (adev->asic_type == CHIP_POLARIS11) ||
+                   (adev->asic_type == CHIP_POLARIS12))
+                       return AMDGPU_VCE_HARVEST_VCE1;
+
                return 0;
        }
 }
--

2.14.1

Quoted 4 lines

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

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

Reviewed-by
#5 lore raw
In reply to a message not in the archive
Quoted 10 lines · Leo Liu
---
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +0 -0
index 7e4de3e6950f..0c01825a8b9e 100644

drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c static int uvd_v6_0_early_init(void *handle) · line 376

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +3 -0
@@ -371,6 +371,10 @@ static int uvd_v6_0_early_init(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       if (!(adev->flags & AMD_IS_APU) &&
+           (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK))
+               return -ENOENT;

Is this fuse relevant on fiji as well? If so,

Alex

Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +1 -1
+
        uvd_v6_0_set_ring_funcs(adev);
 
        if (uvd_v6_0_enc_support(adev)) {
--

2.14.1

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

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

A message that is not in the archive (sent off-list or not yet received): CADnq5_Mot7htOULjtfO2L+PFxjmEAG6ujGzTXMC4Tk9kEivTDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

author
#7 lore raw
Quoted 14 lines · Alex Deucher
Quoted 13 lines · Leo Liu
---
  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +0 -0
index 7e4de3e6950f..0c01825a8b9e 100644
@@ -371,6 +371,10 @@ static int uvd_v6_0_early_init(void *handle)
  {
         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
Quoted 4 lines

drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c static int uvd_v6_0_early_init(void *handle) · line 376

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +3 -0
+       if (!(adev->flags & AMD_IS_APU) &&
+           (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK))
+               return -ENOENT;

Is this fuse relevant on fiji as well? If so,

It applies to FIJI as well accordingly. Just haven't heard any FIJI harvesting part yet.

Quoted 1 line

Thanks for the reviews.

Leo

Quoted 14 lines

Alex

Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +1 -1
+
         uvd_v6_0_set_ring_funcs(adev);
 
         if (uvd_v6_0_enc_support(adev)) {
--

2.14.1

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

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