[PATCH libdrm v3 3/5] xf86drm: Add platform and host1x bus support

Emil Velikov emil.l.velikov at gmail.com
Fri Jan 20 14:03:14 UTC 2017


On 18 January 2017 at 09:02, Thierry Reding <thierry.reding at gmail.com> wrote:
> From: Thierry Reding <treding at nvidia.com>
>
> ARM SoCs usually have their DRM/KMS devices on the platform bus, so add
> support for that to enable these devices to be used with the drmDevice
> infrastructure.
>
> NVIDIA Tegra SoCs have an additional level in the hierarchy and DRM/KMS
> devices can also be on the host1x bus. This is mostly equivalent to the
> platform bus.
>
Re the indentation suggestion: either one is fine imho - coding style
in libdrm is messy ;-)


> @@ -3576,6 +3846,20 @@ int drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device)
>
>              break;
>
> +        case DRM_BUS_PLATFORM:
> +            ret = drmProcessPlatformDevice(&d, node, node_type, maj, min, true, flags);
> +            if (ret)
> +                goto free_devices;
> +
> +            break;
> +
> +        case DRM_BUS_HOST1X:
> +            ret = drmProcessHost1xDevice(&d, node, node_type, maj, min, true, flags);
> +            if (ret)
> +                goto free_devices;
> +
> +            break;
> +
>          default:
>              continue;
>          }
> @@ -3716,6 +4000,22 @@ int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices)
>
>              break;
>
> +        case DRM_BUS_PLATFORM:
> +            ret = drmProcessPlatformDevice(&device, node, node_type, maj, min,
> +                                           devices != NULL, flags);
> +            if (ret)
> +                goto free_devices;
> +
> +            break;
> +
> +        case DRM_BUS_HOST1X:
> +            ret = drmProcessHost1xDevice(&device, node, node_type, maj, min,
> +                                         devices != NULL, flags);
> +            if (ret)
> +                goto free_devices;
> +
We want to continue on error - feel free to squash before pushing.
With that the original r-b (for the series) still stands.

Thanks
Emil


More information about the dri-devel mailing list