From: Laura Abbott <labbott@redhat.com> To: Chris Wilson <chris@chris-wilson.co.uk>, Sean Paul <seanpaul@chromium.org>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sumit Semwal <sumit.semwal@linaro.org>, intel-gfx@lists.freedesktop.org, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Subject: Re: [PATCHv3 2/3] drm/prime: Introduce drm_gem_prime_import_platform Date: Wed, 3 May 2017 07:40:51 -0700 [thread overview] Message-ID: <4d8dc485-2688-d46b-270c-fcb71833e893@redhat.com> (raw) In-Reply-To: <20170503073945.44j65kon3f4xatll@phenom.ffwll.local> 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. > 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
WARNING: multiple messages have this Message-ID (diff)
From: Laura Abbott <labbott@redhat.com> To: Chris Wilson <chris@chris-wilson.co.uk>, Sean Paul <seanpaul@chromium.org>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sumit Semwal <sumit.semwal@linaro.org>, intel-gfx@lists.freedesktop.org, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Subject: Re: [PATCHv3 2/3] drm/prime: Introduce drm_gem_prime_import_platform Date: Wed, 3 May 2017 07:40:51 -0700 [thread overview] Message-ID: <4d8dc485-2688-d46b-270c-fcb71833e893@redhat.com> (raw) In-Reply-To: <20170503073945.44j65kon3f4xatll@phenom.ffwll.local> 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. > 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
next prev parent reply other threads:[~2017-05-03 14:41 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-05-02 17:02 [PATCHv3 0/3] dma_buf import support for vgem Laura Abbott 2017-05-02 17:02 ` [PATCHv3 1/3] drm/vgem: Add a dummy platform device Laura Abbott 2017-05-02 17:02 ` Laura Abbott 2017-05-02 17:02 ` [PATCHv3 2/3] drm/prime: Introduce drm_gem_prime_import_platform Laura Abbott 2017-05-02 17:02 ` Laura Abbott 2017-05-02 20:22 ` Chris Wilson 2017-05-02 20:22 ` Chris Wilson 2017-05-03 7:39 ` Daniel Vetter 2017-05-03 7:39 ` Daniel Vetter 2017-05-03 14:40 ` Laura Abbott [this message] 2017-05-03 14:40 ` Laura Abbott 2017-05-03 15:07 ` Daniel Vetter 2017-05-03 15:07 ` Daniel Vetter 2017-05-03 15:24 ` Chris Wilson 2017-05-03 15:24 ` Chris Wilson 2017-05-02 17:02 ` [PATCHv3 3/3] drm/vgem: Enable dmabuf import interfaces Laura Abbott 2017-05-02 17:02 ` Laura Abbott 2017-05-02 17:20 ` ✓ Fi.CI.BAT: success for dma_buf import support for vgem Patchwork
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4d8dc485-2688-d46b-270c-fcb71833e893@redhat.com \ --to=labbott@redhat.com \ --cc=chris@chris-wilson.co.uk \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=joonas.lahtinen@linux.intel.com \ --cc=linux-kernel@vger.kernel.org \ --cc=seanpaul@chromium.org \ --cc=sumit.semwal@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.