[Mesa-dev] [PATCH] radv: check driver name before calling amdgpu.

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 11 11:38:49 UTC 2016


On 11 October 2016 at 06:22, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This checks the kernel driver name is amdgpu before calling
> libdrm_amdgpu.
>
> This avoids the following error:
> amdgpu_device_initialize: DRM version is 1.6.0 but this driver is only compatible with 3.x.x
>
Yet the functionality is the same, isn't it ?

Regardless, at a follow-up you can use the drm*Device API rather than
manually probing each node.
You can filter the list of devices by vendor/other.

> +       version = drmGetVersion(fd);
> +       if (!version)

Missing close(fd); ?

-Emil


More information about the mesa-dev mailing list