[PATCH 1/4] drm/vgem: Fix vgem_init to get drm device avaliable.

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 28 14:49:50 UTC 2018


Quoting Emil Velikov (2018-03-28 02:24:48)
> From: Deepak Sharma <deepak.sharma at amd.com>
> 
> Modify vgem_init to take platform dev as parent in drm_dev_init.
> This will make drm device available at "/sys/devices/platform/vgem"
> in x86 chromebook.
> 
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Deepak Sharma <deepak.sharma at amd.com>
> Reviewed-by: Sean Paul <seanpaul at chromium.org>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
>  drivers/gpu/drm/vgem/vgem_drv.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
> index 2524ff116f00..636ce32fa945 100644
> --- a/drivers/gpu/drm/vgem/vgem_drv.c
> +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> @@ -472,31 +472,30 @@ static int __init vgem_init(void)
>         if (!vgem_device)
>                 return -ENOMEM;
>  
> -       ret = drm_dev_init(&vgem_device->drm, &vgem_driver, NULL);
> -       if (ret)
> -               goto out_free;

A shame to lose the test coverage this gave us. Care to replace that
with a selftest?
-Chris


More information about the dri-devel mailing list