All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/vce3: only enable 3 rings on new enough firmware
@ 2016-10-25 13:41 Alex Deucher
       [not found] ` <1477402897-9116-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2016-10-25 13:41 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Older firmware versions don't support 3 rings.

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

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
index 5ed2930..55cfc53 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
@@ -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;
-- 
2.5.5

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu/vce3: only enable 3 rings on new enough firmware
       [not found] ` <1477402897-9116-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2016-10-25 13:49   ` Christian König
       [not found]     ` <7d04c8bf-c1e1-dd0f-7ee8-dfc48d64afa0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2016-10-25 13:49 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Am 25.10.2016 um 15:41 schrieb Alex Deucher:
> Older firmware versions don't support 3 rings.
>
> fixes:
> https://bugs.freedesktop.org/show_bug.cgi?id=98016
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
> index 5ed2930..55cfc53 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
> @@ -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 
<christian.koenig@amd.com>.

Regards,
Christian.

> +		adev->vce.num_rings = 2;
> +
>   	r = amdgpu_vce_resume(adev);
>   	if (r)
>   		return r;


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu/vce3: only enable 3 rings on new enough firmware
       [not found]     ` <7d04c8bf-c1e1-dd0f-7ee8-dfc48d64afa0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2016-10-25 13:57       ` Alex Deucher
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2016-10-25 13:57 UTC (permalink / raw)
  To: Christian König; +Cc: Alex Deucher, amd-gfx list

[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]

On Tue, Oct 25, 2016 at 9:49 AM, Christian König
<deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org> wrote:
> Am 25.10.2016 um 15:41 schrieb Alex Deucher:
>>
>> Older firmware versions don't support 3 rings.
>>
>> fixes:
>> https://bugs.freedesktop.org/show_bug.cgi?id=98016
>>
>> Signed-off-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> index 5ed2930..55cfc53 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> @@ -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
> <christian.koenig-5C7GfCeVMHo@public.gmane.org>.

Done.

Alex


>
> Regards,
> Christian.
>
>
>> +               adev->vce.num_rings = 2;
>> +
>>         r = amdgpu_vce_resume(adev);
>>         if (r)
>>                 return r;
>
>
>

[-- Attachment #2: 0001-drm-amdgpu-vce3-only-enable-3-rings-on-new-enough-fi.patch --]
[-- Type: text/x-patch, Size: 1542 bytes --]

From 80b70df140dbaed164831cf523a4d5a18240b539 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
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

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
index 5ed2930..39f03f1 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
@@ -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;
-- 
2.5.5


[-- Attachment #3: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2016-10-25 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-25 13:41 [PATCH] drm/amdgpu/vce3: only enable 3 rings on new enough firmware Alex Deucher
     [not found] ` <1477402897-9116-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-10-25 13:49   ` Christian König
     [not found]     ` <7d04c8bf-c1e1-dd0f-7ee8-dfc48d64afa0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-10-25 13:57       ` Alex Deucher

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.