[PATCH libdrm] amdgpu: don't fail amdgpu_device_initialize if amdgpu.ids missing or unparseable
Michel Dänzer
michel at daenzer.net
Mon Oct 9 10:16:02 UTC 2017
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
More information about the amd-gfx
mailing list