Re: [PATCH 2/3] drm/amdgpu: convert to UVD IP version checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 24, 2022 at 11:20:41AM +0800, Huang, Tim wrote:
> Use IP versions rather than asic_type to differentiate IP version specific features.
> 
> Signed-off-by: Tim Huang <xiaohu.huang@xxxxxxx>

Reviewed-by: Huang Rui <ray.huang@xxxxxxx>

> ---
>  drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
> index 01c242c5abc3..c5ffb14ba183 100644
> --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
> @@ -50,11 +50,16 @@ static int jpeg_v3_0_early_init(void *handle)
>  {
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>  
> -	if (adev->asic_type != CHIP_YELLOW_CARP) {
> -		u32 harvest = RREG32_SOC15(JPEG, 0, mmCC_UVD_HARVESTING);
> +	u32 harvest;
>  
> +	switch (adev->ip_versions[UVD_HWIP][0]) {
> +	case IP_VERSION(3, 1, 1): 
> +		break;
> +	default:
> +		harvest = RREG32_SOC15(JPEG, 0, mmCC_UVD_HARVESTING);
>  		if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK)
>  			return -ENOENT;
> +		break;
>  	}
>  
>  	adev->jpeg.num_jpeg_inst = 1;
> -- 
> 2.25.1
> 



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux