[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170504202331.GO24019@nuc-i3427.alporthouse.com>
Date: Thu, 4 May 2017 21:23:31 +0100
From: Chris Wilson <chris@...is-wilson.co.uk>
To: Laura Abbott <labbott@...hat.com>
Cc: Daniel Vetter <daniel.vetter@...ll.ch>,
Sean Paul <seanpaul@...omium.org>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Sumit Semwal <sumit.semwal@...aro.org>,
intel-gfx@...ts.freedesktop.org,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>
Subject: Re: [PATCHv4 1/3] drm/vgem: Add a dummy platform device
On Thu, May 04, 2017 at 11:45:46AM -0700, Laura Abbott wrote:
>
> The vgem driver is currently registered independent of any actual
> device. Some usage of the dmabuf APIs require an actual device structure
> to do anything. Register a dummy platform device for use with dmabuf.
>
> Reviewed-by: Chris Wilson <chris@...is-wilson.co.uk>
> Signed-off-by: Laura Abbott <labbott@...hat.com>
> ---
> v4: Switch from the now removed platformdev to a static platform device.
I was thinking of avoiding the static, i.e.
static struct vgem_device {
struct drm_device drm;
struct device *platform;
} *vgem_device;
vgem_init():
vgem_device = kzalloc(sizeof(*vgem_device), GFP_KERNEEL);
ret = drm_dev_init(&vgem_device->drm, &vgem_drv, NULL);
vgem_device->platform = platform_device_register_simple("vgem");
And then platform_device_unregister() should be done in a new
vgem_drv.release callback.
I'm not going to insist upon it as I can send a patch to move over to
the "modern" drm_device subclassing later.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
Powered by blists - more mailing lists