Skip to contentSkip to conversation

drm/amdgpu/vce3: only enable 3 rings on new enough firmware

PATCH In review Alex Deucher 2 participants 3 messages Oct 25, 2016 2 messages not in the archive

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

PATCH 1/1 drm/amdgpu/vce3: only enable 3 rings on new enough firmware

Older firmware versions don't support 3 rings.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=98016

---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +4 -0
index 5ed2930..55cfc53 100644
@@ -382,6 +382,10 @@ static int vce_v3_0_sw_init(void *handle)
 	if (r)
 		return r;
 
+	/* 52.8.3 required for 3 ring support */
+	if (adev->vce.fw_version < 0x34080300)
+		adev->vce.num_rings = 2;
+
 	r = amdgpu_vce_resume(adev);
 	if (r)
 		return r;
Signature · 6 lines
2.5.5

_______________________________________________
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): 1477402897-9116-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 25.10.2016 um 15:41 schrieb Alex Deucher:

Quoted 15 lines

Older firmware versions don't support 3 rings.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=98016

---
  drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -0
index 5ed2930..55cfc53 100644

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c static int vce_v3_0_sw_init(void *handle) · line 386

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -0
@@ -382,6 +382,10 @@ static int vce_v3_0_sw_init(void *handle)
  	if (r)
  		return r;
 
+	/* 52.8.3 required for 3 ring support */
+	if (adev->vce.fw_version < 0x34080300)

Could you add a define like we do in amdgpu_uvd.c for the firmware? 0x34080300 is not so easily readable if you don't know what to look for.

Only nice to have, so either way patch is Reviewed-by: Christian König <[email protected]>.

Regards,
Christian.

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c static int vce_v3_0_sw_init(void *handle) · line 391

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -0
+		adev->vce.num_rings = 2;
+
  	r = amdgpu_vce_resume(adev);
  	if (r)
  		return r;

_______________________________________________
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): 7d04c8bf-c1e1-dd0f-7ee8-dfc48d64afa0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

author Reviewed-by Christian König
#4 lore raw
Quoted 27 lines · Christian König

Am 25.10.2016 um 15:41 schrieb Alex Deucher:

Quoted 17 lines

Older firmware versions don't support 3 rings.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=98016

---
  drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -0
index 5ed2930..55cfc53 100644

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c static int vce_v3_0_sw_init(void *handle) · line 385

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +1 -0
@@ -382,6 +382,10 @@ static int vce_v3_0_sw_init(void *handle)
        if (r)
                return r;
  +     /* 52.8.3 required for 3 ring support */
+       if (adev->vce.fw_version < 0x34080300)

Could you add a define like we do in amdgpu_uvd.c for the firmware? 0x34080300 is not so easily readable if you don't know what to look for.

Quoted 2 lines

Only nice to have, so either way patch is Reviewed-by: Christian König <[email protected]>.

Done.

Alex

Quoted 13 lines

Regards,
Christian.

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -0
+               adev->vce.num_rings = 2;
+
        r = amdgpu_vce_resume(adev);
        if (r)
                return r;

From 80b70df140dbaed164831cf523a4d5a18240b539 Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Tue, 25 Oct 2016 09:37:37 -0400
Subject: [PATCH] drm/amdgpu/vce3: only enable 3 rings on new enough firmware
(v2)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Older firmware versions don't support 3 rings.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=98016

v2: use define for fw version

---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +6 -0
index 5ed2930..39f03f1 100644
@@ -52,6 +52,8 @@
 #define VCE_V3_0_STACK_SIZE	(64 * 1024)
 #define VCE_V3_0_DATA_SIZE	((16 * 1024 * AMDGPU_MAX_VCE_HANDLES) + (52 * 1024))
 
+#define FW_52_8_3	((52 << 24) | (8 << 16) | (3 << 8))
+
 static void vce_v3_0_mc_resume(struct amdgpu_device *adev, int idx);
 static void vce_v3_0_set_ring_funcs(struct amdgpu_device *adev);
 static void vce_v3_0_set_irq_funcs(struct amdgpu_device *adev);
@@ -382,6 +384,10 @@ static int vce_v3_0_sw_init(void *handle)
 	if (r)
 		return r;
 
+	/* 52.8.3 required for 3 ring support */
+	if (adev->vce.fw_version < FW_52_8_3)
+		adev->vce.num_rings = 2;
+
 	r = amdgpu_vce_resume(adev);
 	if (r)
 		return r;
Signature · 1 line
2.5.5

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