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

Luben Tuikov luben.tuikov at amd.com
Wed Mar 25 15:33:35 UTC 2020


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 <Emily.Deng at amd.com>
> ---
>  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 = &adev->vcn.inst->ring_enc[i];
>  		r = amdgpu_ring_test_helper(ring);
> 



More information about the amd-gfx mailing list