Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1635058
| From | Daniel Vetter <daniel@ffwll.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv3 2/3] drm/prime: Introduce drm_gem_prime_import_platform |
| Date | 2017-05-03 17:10 +0200 |
| Message-ID | <tD44G-73B-19@gated-at.bofh.it> (permalink) |
| References | <tCJtg-17y-5@gated-at.bofh.it> <tCJtg-17y-25@gated-at.bofh.it> <tCMAN-33N-5@gated-at.bofh.it> <tCXcS-1YO-7@gated-at.bofh.it> <tD3Lj-6H8-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, May 03, 2017 at 07:40:51AM -0700, Laura Abbott wrote: > On 05/03/2017 12:39 AM, Daniel Vetter wrote: > > On Tue, May 02, 2017 at 09:22:13PM +0100, Chris Wilson wrote: > >> On Tue, May 02, 2017 at 10:02:07AM -0700, Laura Abbott wrote: > >>> /** > >>> + * drm_gem_prime_import_platform - alternate implementation of the import callback > >>> + * @dev: drm_device to import into > >>> + * @dma_buf: dma-buf object to import > >>> + * > >>> + * This is identical to drm_gem_prime_import except the device used for dma_buf > >>> + * attachment is an internal platform device instead of the standard device > >>> + * structure. The use of this function should be limited to drivers that do not > >>> + * set up an underlying device structure. > >>> + */ > >>> +struct drm_gem_object *drm_gem_prime_import_platform(struct drm_device *dev, > >> > >> Simpler soluation will be for the caller to provide the platformdev? > >> > >> That works nicely for the vgem case, I think. > > > > Yeah looking at this again, do we really need this patch? Couldn't we > > instead change patch 1 to first allocate the fake platform device, then > > pass that to drm_dev_alloc (instead of NULL like we do now)? > > > > That was what I proposed in the first version and it was rejected. > It's useful to have at least one driver with a NULL device for testing > edge cases. Oh drat :( I'd say dropping the coverage for NULL testing is ok, there's no other driver than vgem using this. And now that we have vgem dma-buf (or will, soonish) I'd expect that the same will hold for vkms, if it ever happens. -Daniel > > That way no resurrection of drm_device.platform_dev is needed (and I'd > > really like this zombie to stay dead on 2nd thought). > > > > I had a hunch this would be unpopular but I figured it was worth a > shot. I think an even cleaner solution is to allow passing of any > struct device. I'll see about reworking this. > > > Sry about this yet-another-round review :-/ > > -Daniel > > > > Thanks for your patience. > > Laura > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv3 0/3] dma_buf import support for vgem Laura Abbott <labbott@redhat.com> - 2017-05-02 19:10 +0200
[PATCHv3 2/3] drm/prime: Introduce drm_gem_prime_import_platform Laura Abbott <labbott@redhat.com> - 2017-05-02 19:10 +0200
Re: [PATCHv3 2/3] drm/prime: Introduce drm_gem_prime_import_platform Chris Wilson <chris@chris-wilson.co.uk> - 2017-05-02 22:30 +0200
Re: [PATCHv3 2/3] drm/prime: Introduce drm_gem_prime_import_platform Daniel Vetter <daniel@ffwll.ch> - 2017-05-03 09:50 +0200
Re: [PATCHv3 2/3] drm/prime: Introduce drm_gem_prime_import_platform Laura Abbott <labbott@redhat.com> - 2017-05-03 16:50 +0200
Re: [PATCHv3 2/3] drm/prime: Introduce drm_gem_prime_import_platform Daniel Vetter <daniel@ffwll.ch> - 2017-05-03 17:10 +0200
Re: [PATCHv3 2/3] drm/prime: Introduce drm_gem_prime_import_platform Chris Wilson <chris@chris-wilson.co.uk> - 2017-05-03 17:30 +0200
[PATCHv3 3/3] drm/vgem: Enable dmabuf import interfaces Laura Abbott <labbott@redhat.com> - 2017-05-02 19:10 +0200
csiph-web