RE: [PATCH 2/4] SWDEV-227334 - No need support vcn decode

2020-03-25 Thread Liu, Monk
Reviewed-by: Monk Liu 

_
Monk Liu|GPU Virtualization Team |AMD


-Original Message-
From: amd-gfx  On Behalf Of Deng, Emily
Sent: Thursday, March 26, 2020 11:16 AM
To: Deng, Emily ; amd-gfx@lists.freedesktop.org
Subject: RE: [PATCH 2/4] SWDEV-227334 - No need support vcn decode

[AMD Official Use Only - Internal Distribution Only]

Ping.

Best wishes
Emily Deng
>-Original Message-
>From: amd-gfx  On Behalf Of 
>Emily Deng
>Sent: Wednesday, March 25, 2020 4:33 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deng, Emily 
>Subject: [PATCH 2/4] SWDEV-227334 - No need support vcn decode
>
>As no need to support vcn decode feature, so diable the ring.
>
>Signed-off-by: Emily Deng 
>---
> drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>index ec8091a..febd4c2 100644
>--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>@@ -223,6 +223,10 @@ static int vcn_v2_0_hw_init(void *handle)
>   if (r)
>   goto done;
>
>+  //Disable vcn decode for sriov
>+  if (amdgpu_sriov_vf(adev))
>+  ring->sched.ready = false;
>+
>   for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
>   ring = >vcn.inst->ring_enc[i];
>   r = amdgpu_ring_test_helper(ring);
>--
>2.7.4
>
>___
>amd-gfx mailing list
>amd-gfx@lists.freedesktop.org
>https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists
>.free
>desktop.org%2Fmailman%2Flistinfo%2Famd-
>gfxdata=02%7C01%7CEmily.Deng%40amd.com%7Cd7570f695fc64ab688
>b308d7d09733e4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63
>7207220147577735sdata=vTgILeBbCu5CRPs2aEPs4htoiucE3pYMjPiN2B8
>mEBk%3Dreserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfxdata=02%7C01%7Cmonk.liu%40amd.com%7Ca2aeff978efe4cd76a7e08d7d133fee0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637207894223674822sdata=7Bh3wa53N8F0Nt1ofvOT5mLoKoI7izGj7UlewfwxQtA%3Dreserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


RE: [PATCH 2/4] SWDEV-227334 - No need support vcn decode

2020-03-25 Thread Deng, Emily
[AMD Official Use Only - Internal Distribution Only]

Ping.

Best wishes
Emily Deng
>-Original Message-
>From: amd-gfx  On Behalf Of Emily
>Deng
>Sent: Wednesday, March 25, 2020 4:33 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deng, Emily 
>Subject: [PATCH 2/4] SWDEV-227334 - No need support vcn decode
>
>As no need to support vcn decode feature, so diable the ring.
>
>Signed-off-by: Emily Deng 
>---
> drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>index ec8091a..febd4c2 100644
>--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>@@ -223,6 +223,10 @@ static int vcn_v2_0_hw_init(void *handle)
>   if (r)
>   goto done;
>
>+  //Disable vcn decode for sriov
>+  if (amdgpu_sriov_vf(adev))
>+  ring->sched.ready = false;
>+
>   for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
>   ring = >vcn.inst->ring_enc[i];
>   r = amdgpu_ring_test_helper(ring);
>--
>2.7.4
>
>___
>amd-gfx mailing list
>amd-gfx@lists.freedesktop.org
>https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.free
>desktop.org%2Fmailman%2Flistinfo%2Famd-
>gfxdata=02%7C01%7CEmily.Deng%40amd.com%7Cd7570f695fc64ab688
>b308d7d09733e4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63
>7207220147577735sdata=vTgILeBbCu5CRPs2aEPs4htoiucE3pYMjPiN2B8
>mEBk%3Dreserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 2/4] SWDEV-227334 - No need support vcn decode

2020-03-25 Thread Luben Tuikov
On 2020-03-25 04:32, Emily Deng wrote:
> As no need to support vcn decode feature, so diable the
> ring.

"diable" --> "disable"

> 
> Signed-off-by: Emily Deng 
> ---
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c 
> b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> index ec8091a..febd4c2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> @@ -223,6 +223,10 @@ static int vcn_v2_0_hw_init(void *handle)
>   if (r)
>   goto done;
>  
> + //Disable vcn decode for sriov
> + if (amdgpu_sriov_vf(adev))
> + ring->sched.ready = false;
> +

This is really just,

ring->sched.ready = !amdgpu_sriov_vf(adev);

But I think the compiler is already optimizing it.

Regards,
Luben

>   for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
>   ring = >vcn.inst->ring_enc[i];
>   r = amdgpu_ring_test_helper(ring);
> 

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


Re: [PATCH 2/4] SWDEV-227334 - No need support vcn decode

2020-03-25 Thread Alex Deucher
On Wed, Mar 25, 2020 at 4:33 AM Emily Deng  wrote:
>
> As no need to support vcn decode feature, so diable the
> ring.
>
> Signed-off-by: Emily Deng 

Please fix the patch title prefix to drm/amdgpu.  An additional comment below.

> ---
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c 
> b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> index ec8091a..febd4c2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> @@ -223,6 +223,10 @@ static int vcn_v2_0_hw_init(void *handle)
> if (r)
> goto done;
>
> +   //Disable vcn decode for sriov

Please use C style comments.

With those fixed, the patch is:
Reviewed-by: Alex Deucher 


> +   if (amdgpu_sriov_vf(adev))
> +   ring->sched.ready = false;
> +
> for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
> ring = >vcn.inst->ring_enc[i];
> r = amdgpu_ring_test_helper(ring);
> --
> 2.7.4
>
> ___
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx