[PATCH 2/2] drm/amdgpu/vcn3.0: remove extra asic type check

Christian König ckoenig.leichtzumerken at gmail.com
Fri Jul 24 07:19:37 UTC 2020


Acked-by: Christian König <christian.koenig at amd.com> for both.

Am 23.07.20 um 21:28 schrieb Liu, Leo:
> These 2 patches are:
>
> Reviewed-by: Leo Liu <leo.liu at amd.com>
>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of James Zhu
> Sent: July 23, 2020 12:10 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhu, James <James.Zhu at amd.com>
> Subject: [PATCH 2/2] drm/amdgpu/vcn3.0: remove extra asic type check
>
> vcn ip block is already selected based on ASIC type during set_ip_blocks.
>
> Signed-off-by: James Zhu <James.Zhu at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 29 +++++++++++++----------------
>   1 file changed, 13 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
> index 910a4a3..4edd5c4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
> @@ -88,23 +88,20 @@ static int vcn_v3_0_early_init(void *handle)
>   		adev->vcn.num_enc_rings = 1;
>   
>   	} else {
> -		if (adev->asic_type == CHIP_SIENNA_CICHLID) {
> -			u32 harvest;
> -			int i;
> -
> -			adev->vcn.num_vcn_inst = VCN_INSTANCES_SIENNA_CICHLID;
> -			for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
> -				harvest = RREG32_SOC15(VCN, i, mmCC_UVD_HARVESTING);
> -				if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK)
> -					adev->vcn.harvest_config |= 1 << i;
> -			}
> +		u32 harvest;
> +		int i;
> +
> +		adev->vcn.num_vcn_inst = VCN_INSTANCES_SIENNA_CICHLID;
> +		for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
> +			harvest = RREG32_SOC15(VCN, i, mmCC_UVD_HARVESTING);
> +			if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK)
> +				adev->vcn.harvest_config |= 1 << i;
> +		}
>   
> -			if (adev->vcn.harvest_config == (AMDGPU_VCN_HARVEST_VCN0 |
> -						AMDGPU_VCN_HARVEST_VCN1))
> -				/* both instances are harvested, disable the block */
> -				return -ENOENT;
> -		} else
> -			adev->vcn.num_vcn_inst = 1;
> +		if (adev->vcn.harvest_config == (AMDGPU_VCN_HARVEST_VCN0 |
> +					AMDGPU_VCN_HARVEST_VCN1))
> +			/* both instances are harvested, disable the block */
> +			return -ENOENT;
>   
>   		adev->vcn.num_enc_rings = 2;
>   	}



More information about the amd-gfx mailing list