[PATCH libdrm] amdgpu: don't fail amdgpu_device_initialize if amdgpu.ids missing or unparseable

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

 



On 09/10/17 11:11 AM, Xiaojie Yuan wrote:
> Signed-off-by: Xiaojie Yuan <Xiaojie.Yuan at amd.com>
> ---
>  amdgpu/amdgpu_device.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
> index 2b31c45..72dc6fa 100644
> --- a/amdgpu/amdgpu_device.c
> +++ b/amdgpu/amdgpu_device.c
> @@ -286,10 +286,8 @@ int amdgpu_device_initialize(int fd,
>  	amdgpu_vamgr_init(&dev->vamgr_32, start, max,
>  			  dev->dev_info.virtual_address_alignment);
>  
> -	r = amdgpu_parse_asic_ids(&dev->asic_ids);
> -	if (r) {
> -		fprintf(stderr, "%s: Cannot parse ASIC IDs, 0x%x.",
> -			__func__, r);
> +	if (amdgpu_parse_asic_ids(&dev->asic_ids) < 0) {
> +		fprintf(stderr, "%s: Cannot parse ASIC IDs", __func__);
>  	}
>  
>  	*major_version = dev->major_version;
> 

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


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

  Powered by Linux