[PATCH 2/3] drm/vc4: Remove open-coded drm_connector_register_all()
Daniel Vetter
daniel at ffwll.ch
Tue Jun 21 09:48:56 UTC 2016
On Tue, Jun 21, 2016 at 10:28:02AM +0100, Chris Wilson wrote:
> drm_dev_register() will now register all known connectors, so we no
> longer have to do so manually.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: David Airlie <airlied at linux.ie>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Cc: dri-devel at lists.freedesktop.org
> ---
> drivers/gpu/drm/vc4/vc4_drv.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
> index 98cf2c4d622e..1cd6b7b36241 100644
> --- a/drivers/gpu/drm/vc4/vc4_drv.c
> +++ b/drivers/gpu/drm/vc4/vc4_drv.c
> @@ -211,22 +211,10 @@ static int vc4_drm_bind(struct device *dev)
> if (ret < 0)
> goto unbind_all;
>
> - /* Connector registration has to occur after DRM device
> - * registration, because it creates sysfs entries based on the
> - * DRM device.
> - */
> - list_for_each_entry(connector, &drm->mode_config.connector_list, head) {
> - ret = drm_connector_register(connector);
> - if (ret)
> - goto unregister;
> - }
> -
> vc4_kms_load(drm);
Semi-related: This should be called before drm_dev_register, with this
ordering userspace might be able to peak at a not-yet set up drm device.
-Daniel
>
> return 0;
>
> -unregister:
> - drm_dev_unregister(drm);
> unbind_all:
> component_unbind_all(dev, drm);
> gem_destroy:
> --
> 2.8.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list