Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1636019
| From | Chris Wilson <chris@chris-wilson.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv4 1/3] drm/vgem: Add a dummy platform device |
| Date | 2017-05-04 22:30 +0200 |
| Message-ID | <tDvxT-8pV-3@gated-at.bofh.it> (permalink) |
| References | <tDtZ7-7l4-5@gated-at.bofh.it> <tDtZ7-7l4-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@chris-wilson.co.uk>
> Signed-off-by: Laura Abbott <labbott@redhat.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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCHv4 1/3] drm/vgem: Add a dummy platform device Laura Abbott <labbott@redhat.com> - 2017-05-04 20:50 +0200 Re: [PATCHv4 1/3] drm/vgem: Add a dummy platform device Chris Wilson <chris@chris-wilson.co.uk> - 2017-05-04 22:30 +0200
csiph-web